Advertisement
RoksasNunes

Z

Apr 14th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local config = {
  2. time = 60,
  3. arvorescut = {2767, 2768, 2785, 2786, 2708},
  4. residuos = 6219,
  5. Madeira = {0, 1, 2, 3, 4, 5, 6},
  6. messages = {"cuting", "Cortando", "tak tak tak"},
  7. }
  8.  
  9. function onUse(cid, item, frompos, item2, topos) -- By Lancellott @junior2b
  10.  
  11. if not isInArray(config.arvorescut, item2.itemid) then
  12. doPlayerSendTextMessage(cid, 27, "You only can cut threes!")
  13. return true
  14. end
  15.  
  16. doCreatureSay(cid, config.messages[math.random(#config.messages)], TALKTYPE_ORANGE_1)
  17. doSendMagicEffect(getCreaturePosition(cid), 3)
  18. doTransformItem(item2.uid, config.residuos[math.random(#config.residuos)])
  19. doPlayerAddItem (cid, 5901, config.Madeira[math.random(#config.Madeira)])
  20. doSendAnimatedText(getCreaturePosition(cid), "CUTED!", math.random(1, 255))
  21. addEvent(doCreateItem, time*60*1000, item2.itemid, 1, getThingPos(item2.uid))
  22. return true
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement