Advertisement
Guest User

Untitled

a guest
May 25th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
  2.  
  3.  
  4. local sqm = Position(33296, 32140, 8)
  5. local tile = Tile(Position(target:getPosition()))
  6.  
  7. if not player then
  8. return true
  9. end
  10.  
  11. if (isInArray({1826, 1835, 1814, 1809, 1825}, item:getId())) then
  12. -- Quadro fake
  13. if player:getItemCount(28667) >= 1 and target:getPosition() == sqm and player:getStorageValue(Storage.CultsOfTibia.MotA.Mission) == 8 then
  14. target:getPosition():sendMagicEffect(CONST_ME_POFF)
  15. player:setStorageValue(Storage.CultsOfTibia.MotA.Mission, 9)
  16. player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is it. It looks like it was painted by a child!")
  17. elseif player:getItemCount(28667) >= 1 and target:getPosition() == sqm and player:getStorageValue(Storage.CultsOfTibia.MotA.Mission) > 8 then
  18. player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already reported to Gareth about this fake picture.")
  19. target:getPosition():sendMagicEffect(CONST_ME_POFF)
  20. end
  21. -- Quadros comuns
  22. else
  23. player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Nothing special. This picture looks genuine.")
  24. target:getPosition():sendMagicEffect(CONST_ME_POFF)
  25. end
  26.  
  27.  
  28. return true
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement