Advertisement
Skymagnum

Untitled

Jun 20th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. function onAddItem(moveitem, tileitem, position, cid)
  2.  
  3. local laranja = getTileItemById(position, 2675)
  4. local batata = getTileItemById(position, 8838)
  5.  
  6.     local counter = laranja.type - batata.type == 0 and laranja.type or 1
  7.     if(moveitem.itemid == 2693) then
  8.         doTransformItem(moveitem.uid, 2689)
  9.     elseif(moveitem.itemid == 2671) then
  10.         doTransformItem(moveitem.uid, 2666)
  11.     elseif(laranja.uid > 0) and (batata.uid > 0) then
  12.         doRemoveItem(laranja.uid, counter)
  13.         doRemoveItem(batata.uid, counter)
  14.         doCreateItem(2666, counter, position)
  15.     end
  16.  
  17.     return doSendMagicEffect(position, CONST_ME_HITBYFIRE)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement