Advertisement
poxipox

Untitled

Nov 5th, 2023
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.     local questTabTemp = configQuest.Quest[item.actionid]
  3.     if questTabTemp then
  4.    
  5.         if getPlayerStorageValue(cid, questTabTemp.storage) == -1 then
  6.             local creatPos = getCreaturePosition(cid)
  7.             setPlayerStorageValue(cid, questTabTemp.storage) == 1   -- lasttrans
  8.             doSendAnimatedText(creatPos, "~ Quest ~", math.random(1,200))
  9.             doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, questTabTemp.text)
  10.             doSendMagicEffect(creatPos, 1016)  
  11.         else
  12.             return doPlayerSendCancel(cid, "Sorry, you have already won an award..")
  13.         end
  14.     end
  15.     return true
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement