Advertisement
Guest User

quiver

a guest
Oct 19th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. QUIVER_ITEMS = {12425}
  2. ARROW_ITEMS = {
  3. [2543] = 1, -- bolt
  4. [2544] = 2, -- arrow
  5. [2545] = 5, -- poison arrow
  6. [2546] = 6, -- burst arrow
  7. [2547] = 13, -- power bolt
  8. [6529] = 15, -- infernal bolt
  9. [7364] = 21, -- sniper arrow
  10. [7365] = 22, -- onyx arrow
  11. [7363] = 23, -- piercing bolt
  12. [7838] = 32, -- flash arrow
  13. [7840] = 33, -- flaming arrow
  14. [7839] = 34, -- shiver arrow
  15. [7850] = 39, -- earth arrow
  16. [15648] = 43, -- tarsal arrow
  17. [15649] = 44, -- vortex bolt
  18. [18435] = 47, -- prismatic bolt
  19. [18304] = 48, -- crystalline arrow
  20. [18436] = 49, -- drill bolt
  21. [18437] = 50, -- envenomed arrow
  22. }
  23.  
  24.     <event type="moveitem" name="onThrow" event="script" value="throw.lua"/>
  25.  
  26. function onMoveItem(cid, item, count, toContainer, fromContainer, fromPosition, toPosition)
  27.     if toContainer and isInArray(QUIVER_ITEMS, toContainer.itemid) then
  28.         if not ARROW_ITEMS[item.itemid] then
  29.             return false
  30.         end
  31.     end
  32.     return true
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement