Advertisement
Cavitt

Untitled

Apr 26th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | None | 0 0
  1. local config = {
  2.     depotBackpack = 0, -- which depot backpack to deposit spears in (default is the first slot in depot)
  3.     capacityLimit = 100, -- when capacity is below this it will trigger the walk to the bank and depot
  4.     moneyLimit = 1000, -- having gold above this amount will trigger a walk to the bank and depot even if the other limits aren't exceeded
  5.     spearLimit = 30 -- having spears above this limit will trigger a walk to the bank even if the other limits aren't exceeded
  6. }
  7.  
  8. registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
  9. function onWalkerSelectLabel(labelName)
  10.     if (labelName == 'CutGrass1') then
  11.         Self.CutGrass(32968, 32174, 7)
  12.         print('Cutting jungle grass...')
  13.     elseif (labelName == 'CutGrass2') then
  14.         Self.CutGrass(32967, 32178, 7)
  15.         print('Cutting jungle grass...')
  16.     elseif (labelName == 'CutGrass3') then
  17.         Self.CutGrass(32978, 32215, 7)
  18.         print('Cutting jungle grass...')
  19.     elseif (labelName == 'CheckStatus') then
  20.         if((Self.Cap() < config.capacityLimit) or (Self.Money() > config.moneyLimit) or (Self.ItemCount(3277) > config.spearLimit)) then
  21.             print('Walking to town to deposit spears and gold...')
  22.         else
  23.             gotoLabel('ContinueHunt')
  24.         end
  25.     elseif (labelName == 'Depot') then
  26.         Self.DepositItems({3277, config.depotBackpack})
  27.     elseif (labelName == 'Bank') then
  28.         Self.DepositMoney('all')
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement