Hello.
I dont get this with storage id.
If i have get it right then it checks if the quest have been made before?
Becuse i have one npc quest, and the players can do it over and over again.
I want to have it so the players just can do the quest one time.
Heres my script
I dont get this with storage id.
If i have get it right then it checks if the quest have been made before?
Becuse i have one npc quest, and the players can do it over and over again.
I want to have it so the players just can do the quest one time.
Heres my script
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if msgcontains(msg, 'yes') and doPlayerRemoveItem(cid, 2813, 2) == TRUE then
npcHandler:say('Good work! Here is your reward!', cid)
doPlayerAddExp(cid,100)
else
npcHandler:say('come back when You have them!', cid)
end
return TRUE
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())