Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. local AmmoUse = "Assassin Star"
  2.  
  3. local AmmoMax = 300
  4.  
  5. local AmmoBp = "Blue Backpack"
  6.  
  7. ----------------------
  8.  
  9.  
  10.  
  11. registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
  12.  
  13. function onWalkerSelectLabel(labelName)
  14.  
  15. if (labelName == "AS") then
  16.  
  17. Self.ItemCount(Item.GetID(AmmoUse) < AmmoMax)
  18.  
  19. AmmoToWithdraw = (AmmoMax - Self.ItemCount(AmmoUse))
  20.  
  21. Self.WithdrawItems(0, {Item.GetID(AmmoUse), AmmoBp, AmmoToWithdraw}) -- 0, Is the spot of bp on Depot.
  22.  
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement