View difference between Paste ID: rzXvP88d and u4MUFRmL
SHOW: | | - or go back to the newest paste.
1
--[[ 
2
	StartHunting:
3
		walk
4
		through
5
		cave
6
		nodes
7
	CheckCap:
8
	GotoDepot:
9
		walk
10
		to
11
		depot
12
		nodes
13
	DepositItems:
14
		stand backwards one tile to clear windows
15
	WithdrawItems:
16
	GotoHunt:
17
		walk
18
		back
19
		to
20
		hunt
21
]]
22
23
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
24
function onWalkerSelectLabel(labelName)
25
	if (labelName == 'CheckCap') then
26-
        if (Self.Cap() < 720) then
26+
   	 	if (Self.Cap() < 720) then
27-
            gotoLabel("GotoDepot")
27+
       	 		gotoLabel("GotoDepot")
28-
        else
28+
      		else
29-
            gotoLabel("StartHunting")
29+
        		gotoLabel("StartHunting")
30-
        end
30+
		end
31
	elseif (labelName == 'DepositItems') then
32
		-- itemid or {itemid, depot backpack}
33
		Self.DepositItems(3031, {3035, 0})
34
	elseif (labelName == 'WithdrawItems') then
35
		-- slot, item1, item2, etc. (item can be a table like {itemid, backpack slot, count} or just itemid)
36
		Self.WithdrawItems(0, 3507, {3350, 1, 4})
37
		gotoLabel("StartHunting")
38
	end
39
end