Advertisement
Skymagnum

Untitled

Apr 29th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.  
  3.     if isContainer(item.uid) then
  4.        for slot = 1, getContainerSize(item.uid) do
  5.            local container = getContainerItem(item.uid, slot).uid
  6.            if isPokeball(container) then
  7.               if getItemAttribute(container, "fainted") then
  8.                   doTransformItem(container, icons[getItemAttribute(container, "poke")].off)
  9.                       else
  10.                   doTransformItem(container, icons[getItemAttribute(container, "poke")].on)
  11.               end
  12.            end
  13.        end
  14.     end
  15.  
  16.     return true
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement