Jfrye
Mapper, trying to learn scripting
I cant seem to get the quest log to update. I have been able to get the quest to show up in the log, but once you click on the quest, it is just empty inside. See the image below.

Here is the part from quests.xml
I have the NPC storage value set to 20001.
Npc File

Here is the part from quests.xml
Code:
<quest name="The Lost Ring" startstorageid="20001" startstoragevalue="1">
<mission name="Finding the Ring" storageid="20002" startvalue="0" endvalue="1">
<missionstate id="1" description="You are trying to help find a lost ring." />
</mission>
<mission name="Returning the Ring" storageid="20003" startvalue="0" endvalue="1">
<missionstate id="1" description="You have found the ring. You should return it to the NPC." />
</mission>
</quest>
I have the NPC storage value set to 20001.
Npc File
Code:
local storage = 20001
function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, "mission") then
if getPlayerStorageValue(cid, storage) == -1 then
selfSay("My wife lost her ring while swimming in the town swimming area. Do you think you can help me find it?", cid)
talkState[talkUser] = 1
elseif getPlayerStorageValue(cid, storage) == 1 then
selfSay("Did you find the ring?", cid)
talkState[talkUser] = 1
else
selfSay("Thanks again for finding the ring.", cid)
end
elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
if getPlayerStorageValue(cid, storage) == -1 then
selfSay("Great! I saw a water vortex. Maybe you should check near that first.", cid)
setPlayerStorageValue(cid, storage, 1)
else
if(doPlayerRemoveItem(cid, 24333, 1)) then
selfSay("That's great, my wife will be really happy, thanks.", cid)
doPlayerAddItem(cid, 2148, 300)
setPlayerStorageValue(cid, storage, 2)
else
selfSay("You don't have it.", cid)
end
end
talkState[talkUser] = 0
elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then
selfSay("Ok then.", cid)
talkState[talkUser] = 0
end
return true
end