Zashalio
04-21-2014, 09:44 PM
if(labelName == "KeepHunt") then
gotoLabel ("Hunt")
end
doesn't work can somone help me ? :P
Nakuu
04-21-2014, 09:45 PM
Can't see any problem here, post whole code.
Zashalio
04-21-2014, 09:48 PM
--Mana Pots--
local MinMana = 30
local MaxMana = 170
local ManaId = 268
local ManaCost = 50
local MinCap = 50
--Stealth Ring--
local StealthID = 3049
local MaxStealth = 5
local MinStealth = 2
StealthBP = 2872
--[[Label Manager]]--
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
local func = loadstring(labelName)
if(func)then func()
end
end
--[[GetPotionMoney]]--
function AtBank()
Walker.Stop()
local PriceMana = ((MaxMana - Self.ItemCount(ManaId)) * ManaCost)
Self.SayToNpc({"hi", "deposit all", "yes", "withdraw " .. (PriceMana + 200), "yes", "balance"}, 65)
Walker.Start()
end
--[[GetStealthRing]]--
function WithdrawRing()
Self.WithdrawItems(2, {StealthID, 0, MaxStealth - Self.ItemCount(StealthID)})
wait(1000,2000)
end
--[[GetManaPotions]]--
function BuyPotions()
Walker.Stop()
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItemsUpTo(ManaId, MaxMana)
wait(1000,2000)
Walker.Start()
end
--[[CheckSupplies]]--
function CheckStuff()
delayWalker(3000)
if ((Self.ItemCount(ManaId) <= MinMana) or (Self.Cap() <= MinCap) or (Self.ItemCount(StealthID) <= MinStealth)) then
gotoLabel("Refill")
end
end
--[[GotoYalahar]]--
function ToYalahar()
delayWalker(3000)
Self.SayToNpc({"Hi", "Yalahar", "Yes"}, 65)
wait(1000,2000)
end
--[[GotoMistrock]]--
function ToMistrock()
delayWalker(3000)
Self.SayToNpc({"Hi", "Mistrock", "Yes"}, 65)
wait(1000,2000)
end
--[[EnoughSupplies]]--
if(labelName == "KeepHunt") then
gotoLabel ("Hunt")
end
--[[LastOfFunctions]]--
Module('MoveStealthRings', function(mod) if (#Container.GetAll() >= 1) then
if (Container(0):CountItemsOfID(StealthID) >=1) then
for spot = Container(0):ItemCount()-1, 0, -1 do
local item = Container(0):GetItemData(spot)
if (item.id == StealthID) then
Container(0):MoveItemToContainer(spot, Container.GetByName(StealthBP):Index(), 0)
break
end
end
end
end
mod:Delay(1000)
end)
local config = {
["ringNormal"] = 3049,
["ringEquipped"] = 3086
}
Module.New('equip ring', function(module)
if (Self.Ring().id ~= config.ringEquipped) then
Self.Equip(config.ringNormal, "ring")
module:Delay(1000)
end
end)
Nakuu
04-21-2014, 09:51 PM
You need to use Event Listener.
Example:
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if(labelName == "KeepHunt") then
gotoLabel ("Hunt")
end
end
DarkstaR
04-21-2014, 09:53 PM
He is using an event listener, it is calling a function with the name of the label.
He should just do this
function KeepHunt()
gotoLabel ("Hunt")
end
Nakuu
04-21-2014, 09:56 PM
Oh yea, didn't notice. Just looked into that one conditional and it was so randomly in the code :P
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.