yes, just tried both ways.. even calling a variable GLOBAL
Printable View
yes, just tried both ways.. even calling a variable GLOBAL
yes i have no idea what is going on over here
i'm using windows 7 and runing bot as admin right now:
my .lua file:
lua code:
leaveHP = 10 -- set how much healths to leave
BuyHP = 40 -- set how much healths to buy
prieceHP = 100 -- set the priece of the potion [45 normal, 100 strong, 190 great, 310 ultimate]
itemHP = 236 -- set the item ID of the potion [266 to normal, 236 to strong]
--Mana potions
leaveMP = 20 -- set how much manas to leave
BuyMP = 100 -- set how much manas to buy
prieceMP = 50 -- set the priece of the potion [50 normal, 80 strong]
itemMP = 268 -- set the item ID of the potion [238 to normal]
--General
LeaveCap = 20 -- set the cap to leave the cave
also i have these one liners for the instance:
lua code:lua code:
Self.SayToNpc({'hi', 'ticket', 'yes', 'deposit all', 'yes'}, 65) wait(1700) Self.SayToNpc({'withdraw'.. ((BuyHP-Self.ItemCount(itemHP))*prieceHP)+((BuyMP-Self.ItemCount(itemMP))*prieceMP)}) wait(500) Self.SayToNpc({'yes'}, 65)
]lua code:
Walker.Stop() Creature.Follow('Sigurd') wait(4000) Self.SayToNpc({'hi', 'vials', 'yes', 'trade'}, 65) wait(2000) Self.ShopBuyItemsUpTo(itemMP, buyMP) wait(1600) Self.ShopBuyItemsUpTo(itemHP, buyHP) wait(1600) Walker.Start()
dofile('forgee.lua') Self.ReachDepot() wait(500) Self.DepositItems(9689,8031,10275,9692,5894,11485,5880)
btw everytime i load the kazzsetings.lua it auto closes itself. its happening to every file i make. but if i copy the settings with the same text from a file made from other it work. i'm using sublime.
i'm gettin really mad a this lol been working on this like 3 hours before the ss
yes i did it, sorry i just sent you the older scripts, but even with the dofile in the front it wasn't working :/
i will try to reinstall the bot because i switched to "label way" to make things happen and this is what i have
this is not working to me. when i load the script it closes automatic and i don't get any bug error.
lua code:
-- Buy Potions?
local BuyPots = true -- Set to false if you don't want to buy potions.
-- Potion Config
local MinPotion = 5 -- Potions to deposit on.
local MaxPotion = 30 -- Amount of Potions to buy.
local PotionID = 266 -- ID of Potions.
local PotionPrice = 45 -- How much Potions cost.
--General
local MinCap = 20 -- Cap to deposit.
-----------
dofile('forgee.lua')
function onWalkerSelectLabel(labelName)
if (labelName == "Bank") then
Self.SayToNpc({"hi", "ticket", "yes", "deposit all", "yes"}, 65)
wait(1700)
Self.SayToNpc({"withdraw".. ((BuyHP-Self.ItemCount(itemHP))*prieceHP)+((BuyMP-Self.ItemCount(itemMP))*prieceMP)}) wait(500) Self.SayToNpc({'yes'}, 65)
elseif (labelName == "depot") then
Self.ReachDepot()
wait(500)
Self.DepositItems(9689,8031,10275,9692,5894,11485,5880)
elseif (labelname == "BuyPots") then
Walker.Stop()
Creature.Follow("Sigurd")
wait(4000) Self.SayToNpc({"hi", "vials", "yes", "trade"}, 65)
wait(2000) Self.ShopBuyItemsUpTo(itemMP, buyMP)
wait(1600) Self.ShopBuyItemsUpTo(itemHP, buyHP)
wait(1600) Walker.Start()
end
end
Where is "BuyHp" declared? Is it a built in function?
Is it really supposed to be "priece" or instead price?
It seems as if you need to add lua code:registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")after the original dofile.
so the
lua code:registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
kept the .lua file open. and working on LABEL MODE.
if i want to work on one-liner script mode how do i make to keep this open? \/
lua code:
-- Buy Potions?
BuyPots = true -- Set to false if you don't want to buy potions.
-- Potion Config
MinPotion = 5 -- Potions to deposit on.
MaxPotion = 30 -- Amount of Potions to buy.
PotionID = 266 -- ID of Potions.
PotionPrice = 45 -- How much Potions cost.
--General
MinCap = 20 -- Cap to deposit.