Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Lua Tutorial
- -- Brought to you by Alpha Scripts
- -- 2.1
- -- Labels
- -- This will make the connection between Injected Tibia and the Script :
- function onWalkerSelectLabel(label) -- Creating the Label Function (Xeno will check it everytime the walker hits a label)
- if label == "Label Test" then -- First label
- print('It works! this calls for celebration')
- -- Let's dance
- for i = 0, 10 do
- Self.Turn(math.random(0,3))
- wait(400,700)
- end
- elseif label == 'Test2' then -- Another label
- print('Checking Supplies')
- if Self.ItemCount('health potion') < 5 then
- Walker.Goto('Leave Hunt')
- end
- end -- Ending the nested ifs
- end -- Ending the Label Function
- -- Hooking the Label Function to an Event Listener(in this case, the walker) :
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement