Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Check Money

  1. #1
    Free User
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    10
    Rep Power
    0

    Check Money

    Hi everyone is there a way to logout if you dont have enough cash at bank? but without withdrawing cash from bank i mean in a situation like this one:

    Last edited by krokzie; 11-18-2016 at 01:27 AM.

  2. #2
    Free User
    Join Date
    May 2014
    Location
    Nebraska
    Posts
    4
    Reputation
    10
    Rep Power
    0
    i want to know if is possible too

  3. #3
    Moderator Josh's Avatar
    Join Date
    Dec 2013
    Posts
    1,394
    Reputation
    183
    Rep Power
    24
    You can check your balance using $balance - not sure but I believe this is updated when you open the trade window.
    Interested in software development and/or programming for Tibia?
    Check out the new Tibia Programming Forums (TibiaPF) by clicking the image below.

    Looking for a bot for the MMORPG, Medivia?
    Check out MediviaBotter, a powerful, injected bot by clicking the link below.


  4. #4
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by krokzie View Post
    Hi everyone is there a way to logout if you dont have enough cash at bank? but without withdrawing cash from bank i mean in a situation like this one:

    Check $balance in bank then....action...

    --check after Bank
    local useAmmo = true
    local useRune = true
    local useMP = true
    local useHP = true
    local ammoType = 'crystalline arrow'
    local runeType = 'great fireball rune'
    local manaType = 'strong mana potion'
    local hpType = 'great spirit potion'
    local ammoBuy = 500
    local runeBuy = 500
    local manaBuy = 500
    local hpBuy = 500

    --------------------------------------------------------------

    local CostAmmo = iteminfo(ammoType).buyprice*ammoBuy
    local CostRune = iteminfo(runeType).buyprice*runeBuy
    local CostMana = iteminfo(manaType).buyprice*manaBuy
    local CostHP = iteminfo(hpType).buyprice*hpBuy

    local CostTotal = (useAmmo and CostAmmo) and (useRune and CostRune) and (useMP and CostMana) and (useHP and CostHP)

    if islocation(3) then
    if ((useAmmo and itemcount(ammoType) < ammoBuy) and (useRune and itemcount(runeType) < runeBuy) and (useMP and itemcount(manaType) < manaBuy) and (useHP and itemcount(hpType) < hpBuy)) then
    if $balance < CostTotal then
    printerror('Your character is TrainerOffline because little money', $balance)
    gotolabel('Start', 'TrainerOffline')
    end
    end
    end


    When you are shopping for supplements and want to check if everything has been purchased ... remembering that you need $ balance in the bank before.

    Buy Sup example: Stand (near the npc) + action (your buying action at npc) + action (This action below to check if add-ins were purchased) = Stand+action+action, near the npc.

    --check after buy sup
    local useAmmo = true
    local useRune = true
    local useMP = true
    local useHP = true
    local ammoType = 'crystalline arrow'
    local runeType = 'great fireball rune'
    local manaType = 'strong mana potion'
    local hpType = 'great spirit potion'
    local ammoBuy = 500
    local runeBuy = 500
    local manaBuy = 500
    local hpBuy = 500

    --------------------------------------------------------------

    local CostAmmo = iteminfo(ammoType).buyprice*ammoBuy
    local CostRune = iteminfo(runeType).buyprice*runeBuy
    local CostMana = iteminfo(manaType).buyprice*manaBuy
    local CostHP = iteminfo(hpType).buyprice*hpBuy

    local CostTotal = (useAmmo and CostAmmo) and (useRune and CostRune) and (useMP and CostMana) and (useHP and CostHP)

    if islocation(3) then
    if ((useAmmo and itemcount(ammoType) < ammoBuy) and (useRune and itemcount(runeType) < runeBuy) and (useMP and itemcount(manaType) < manaBuy) and (useHP and itemcount(hpType) < hpBuy)) then
    if $balance >= CostTotal then
    gotolabel($wptid-3, $wptsection)
    end
    end
    end


    Edit:
    local useAmmo = true
    local useRune = true
    local useMP = true
    local useHP = true

    According to your needs in every action.

  5. #5
    Free User
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by XtrmJosh View Post
    You can check your balance using $balance - not sure but I believe this is updated when you open the trade window.
    It seems to work bro, i'll keep testing it

    @Cisco

    it seems that windbot detect $balance without asking for it at bank i mean only opening trade with an npc, so i think i just need the second action to check if my character got all supplies right?

  6. #6
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by krokzie View Post
    It seems to work bro, i'll keep testing it

    @Cisco

    it seems that windbot detect $balance without asking for it at bank i mean only opening trade with an npc, so i think i just need the second action to check if my character got all supplies right?
    yes, your $balance will be updated when you open the market.
    Helped you? REP+

  7. #7
    Free User
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Borges View Post
    yes, your $balance will be updated when you open the market.
    So you think that action can work for me?

  8. #8
    Free User
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    10
    Rep Power
    0
    @Cisco

    Bro your action will go to the npc to buy supplies again if they aren't complete and have enough cash right? i can add just a simple logout if not right?

  9. #9
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by krokzie View Post
    @Cisco

    Bro your action will go to the npc to buy supplies again if they aren't complete and have enough cash right? i can add just a simple logout if not right?
    To work correctly you need to have the backpacks open, so the bot can count how many items it has.

    The action will verify that you have all the supplements you wanted to buy. If you have not bought everything, it checks $ balance if you have money even to buy. If you have money it goes back to the "stand" buy and returning to your npc purchase action, otherwise the script will follow normally.

    The action objective is to check if you have bought all the sup and to avoid that during the purchase some other player drags him and he has to make the whole course again.

    But if you want a logout, no problem too.

    --check after buy sup
    local useAmmo = true
    local useRune = true
    local useMP = true
    local useHP = true
    local ammoType = 'crystalline arrow'
    local runeType = 'great fireball rune'
    local manaType = 'strong mana potion'
    local hpType = 'great spirit potion'
    local ammoBuy = 500
    local runeBuy = 500
    local manaBuy = 500
    local hpBuy = 500

    local Logout = true
    --------------------------------------------------------------

    local CostAmmo = iteminfo(ammoType).buyprice*ammoBuy
    local CostRune = iteminfo(runeType).buyprice*runeBuy
    local CostMana = iteminfo(manaType).buyprice*manaBuy
    local CostHP = iteminfo(hpType).buyprice*hpBuy

    local CostTotal = (useAmmo and CostAmmo) and (useRune and CostRune) and (useMP and CostMana) and (useHP and CostHP)

    if islocation(3) then
    if ((useAmmo and itemcount(ammoType) < ammoBuy) and (useRune and itemcount(runeType) < runeBuy) and (useMP and itemcount(manaType) < manaBuy) and (useHP and itemcount(hpType) < hpBuy)) then
    if Logout then
    --desable auto reconnect if there is...example: setsetting('Persistent/Scripts/Auto Reconnect/Enabled', 'no')
    printerror('Your character is logout, no buy sup')
    logout()
    beep()
    else
    if $balance >= CostTotal then
    gotolabel($wptid-3, $wptsection)
    end
    end
    end
    end

  10. #10
    Free User
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    10
    Rep Power
    0
    @Cisco

    Don't know why your action didn't work but thanks to you i find the way to do it, thanks a lot i used this action and it seems that it works as you mentioned:



    local AmmoName = 'crystalline arrow'
    local AmmoMax = 500

    local Ammo = math.positive(AmmoMax - itemcount(AmmoName)) * itemcost(AmmoName)

    Total = math.ceil(Ammo)

    if itemcount(AmmoName) < AmmoMax then
    if $balance <= Total then
    gotolabel($wptid-3, $wptsection)
    elseif $balance >= Total then
    logout()

    end
    end


    i prefer to avoid going to bank, is a waste of time now at days
    Last edited by krokzie; 11-18-2016 at 12:27 PM.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •