• 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!

[Request] How to use Quest Log

Sportacus

Intermediate OT User
Joined
Aug 3, 2008
Messages
718
Reaction score
100
Hello, I am wondering if anyone could take the time to write out a tutorial on how to use quest log properly.

What I want to know is what I need to write in quests.xml, and what I need to write in my quest npcs/etc to make it show up in my quest log.
 
Code:
	<quest name="Quests Pack" startstorageid="[COLOR="Red"]20000[/COLOR]" startstoragevalue="1"> 
       
	   <mission name="Whiskej's explanation" storageid="[COLOR="RoyalBlue"]30000[/COLOR]" startvalue="[COLOR="Green"]1[/COLOR]" endvalue="[COLOR="Green"]3[/COLOR]"> 
            <missionstate id="[COLOR="RoyalBlue"]1[/COLOR]" description="Ask Whiskej what's hard about this quest log thing." /> 
            <missionstate id="[COLOR="RoyalBlue"]2[/COLOR]" description="You've agreed that it's not. Bring 100 gold tribute to Whiskej." />
            <missionstate id="[COLOR="RoyalBlue"]3[/COLOR]" description="Quest completed. Everyone is happy now." />			
        </mission>

        </quest>

red - It's the storage id of a whole quest pack (you can gather all missions from one town to it, or from one npc) this storage can be anything you want, unique of course. You should put it whenever the quest begins (for example in npc lua script - setPlayerStorageValue(cid, 20000, 1), if you don't know from which mission the whole thing starts, just put it everywhere...)

blue - This, my friend is a storage id of the specific quest. Unique id of the quest chest or in the npc code (npc/script/your npc code) usually formed in line - local quest = 30000 or something like that. The continuous numbers (0,1,2,3 and so on) are the actual state of a quest. To put is simply, somewhere in npc code you can find something like this - setPlayerStorageValue(cid, 30000, 1) - it is usually the beginning of your quest. So, in description of missionstate id="1" you should write what to do, what did you get, ble ble in this state of a quest.

green - If you have three missionstates the numbers should be - 1 (or 0) to 3 (or 2). If you've more, then put higher numbers (mister obvious)

It's that easy. Really.

#edit - Oh, and the storage id of a quest and mission can be the same number (of course, if you don't plan to do more missions in this quest).
 
Back
Top