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:
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.
i want to know if is possible too
You can check your balance using $balance - not sure but I believe this is updated when you open the trade window.
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.
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?
@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
@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.