Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. local DIRECTIONS = {
  2. {$posx, $posy, $posz}, -- C
  3. {$posx, $posy-1, $posz}, -- N
  4. {$posx+1, $posy-1, $posz}, -- NE
  5. {$posx+1, $posy, $posz}, -- E
  6. {$posx+1, $posy+1, $posz}, -- SE
  7. {$posx, $posy+1, $posz}, -- S
  8. {$posx-1, $posy+1, $posz}, -- SW
  9. {$posx-1, $posy, $posz}, -- W
  10. {$posx-1, $posy-1, $posz} -- NW
  11. }
  12.  
  13. auto(500)
  14. local CAP = 40
  15. local BP = "red backpack"
  16. local GOLD_COUNT, HEAVY_COUNT = {0,0}, {0,0}
  17.  
  18. if $cap >= CAP then
  19. GOLD_COUNT[1] = itemcount("gold coin")
  20. for _, DIR in ipairs(DIRECTIONS) do
  21. moveitems("gold coin", BP, ground(DIR[1],DIR[2],DIR[3]), 100)
  22. end
  23. GOLD_COUNT[2] = itemcount("gold coin")
  24.  
  25. if (GOLD_COUNT[2] > GOLD_COUNT[1]) then
  26. increaseamountlooted("gold coin", GOLD_COUNT[2]-GOLD_COUNT[1])
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement