• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

blank questlog

almirtibiaalmir

New Member
Joined
Jan 9, 2010
Messages
48
Reaction score
3
Hello,

i tryed the questlog step by step tutorial -> [Configuration] How to make a working Quest Log (https://otland.net/threads/configuration-how-to-make-a-working-quest-log.143683/)

tfs 1.5 nekiros downgrade.

the quest works now, and the quest update appears, but the questlog is still empty. here are the codes:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<quests>
    <quest name="prisoner" startstorageid="42005" startstoragevalue="1">
        <mission name="unlock the door" storageid="5205" startvalue="0" endvalue="2" ignoreendvalue="true">
            <missionstate id="1" description="use the lever" />
            <missionstate id="2" description="return to nelly" />
            <missionstate id="3" description="you get a reward" />
        </mission>
    </quest>
</quests>

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                npcHandler:onThink()                    end

-- QUEST --
function Task1(cid, message, keywords, parameters, node)

local stor1 = 5205 -- this is the same STOR1 from quests.xml

    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    local player = Player(cid)

    if       player:getStorageValue(stor1) < 0 then
                npcHandler:say('I will be waiting here, I guess. Please hurry up!',cid)
             player:setStorageValue(stor1, 0)
    elseif   player:getStorageValue(stor1) == 0 then
                npcHandler:say('I am still waiting for you to unlock this room.',cid)
    elseif   player:getStorageValue(stor1) == 1 then
                npcHandler:say('Thank you, the room is unlocked!! I must reward you somehow.. Here, take my money.',cid)
            doPlayerAddItem(cid, 2152, 25)
            player:setStorageValue(stor1, 2)
                 doSendMagicEffect(getCreaturePosition(cid), 13)
    elseif   player:getStorageValue(stor1) == 2 then
                npcHandler:say('You already unlocked the room, thank you!',cid)
    end
end

local node1 = keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Some bastards forced me into entering here then locked the room by pulling a lever around here somewhere. Would you please find it and unlock me?'})
      node1:addChildKeyword({'yes'}, Task1, {})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Seems like you are no better than them.', reset = true})

npcHandler:addModule(FocusModule:new())

did someone know what to do? thanks.
 

Attachments

I followed the steps from the Tutorial. For example, there is the startstorageid 80012 at the quest.xml but i didnt see that he add the Storage on another place too. But at the comments seems Nobody has the Problem.
 
Resolved. The startstorage id need to be the same with the storage id also in all missions. I dont know why in the tutorial used 2 difference storage ids. Maybe different tfs version.
 
Back
Top