Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(player, item, fromPosition, target, toPosition, isHotkey)
- local sqm = Position(33296, 32140, 8)
- local tile = Tile(Position(target:getPosition()))
- if not player then
- return true
- end
- if (isInArray({1826, 1835, 1814, 1809, 1825}, item:getId())) then
- -- Quadro fake
- if player:getItemCount(28667) >= 1 and target:getPosition() == sqm and player:getStorageValue(Storage.CultsOfTibia.MotA.Mission) == 8 then
- target:getPosition():sendMagicEffect(CONST_ME_POFF)
- player:setStorageValue(Storage.CultsOfTibia.MotA.Mission, 9)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is it. It looks like it was painted by a child!")
- elseif player:getItemCount(28667) >= 1 and target:getPosition() == sqm and player:getStorageValue(Storage.CultsOfTibia.MotA.Mission) > 8 then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already reported to Gareth about this fake picture.")
- target:getPosition():sendMagicEffect(CONST_ME_POFF)
- end
- -- Quadros comuns
- else
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Nothing special. This picture looks genuine.")
- target:getPosition():sendMagicEffect(CONST_ME_POFF)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement