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

How to make all quests appear in the quest log.

Status
Not open for further replies.

Jeremgod

New Member
Joined
Aug 9, 2007
Messages
93
Reaction score
3
Location
Quebec City, Canada
Hello,

I'm currently making quests and I want them to appear in the quest log from the beginning

in other words when you create a character and you open quest log you will see the available quests and it will say something like go speak to NPC for more information and well when they are completed, well completed will appear

Can anyone explain to me how that's done with examples if possible.

Thanks in advance

Sincerely, Jeremgod
 
There's an Example inside Your server Folder/Data/Xml/quests.xml.
Just open it with NotePad or whatever editor you use, and read the example :p, it's well explained.
 
Hehe I noticed that and I did look at it before posting, the problem is, it doesnt appear right away in the quest log, what I really want is those quests to appear in the new player's quest log automatically so the player knows where to go therefore the quest log is available with all quests without speaking to a NPC or opening a chest no action required its going to be already there that's the part I'm blocked on hehe

Thanks in advance =)
 
It is possible but I can tell you this, it's going to take forever, depending on how many quests you have.
In the quests.xml, there is a storage value, the player has to have that for it to appear in the quest log (I think).

But all I'm going to say is that it is going to take DAYS to do.
Good luck.
 
It's what I was thinking I'm going to try it out to see since I only have 2 quests in there and around 10 characters so I'll check it out and repost here if I hit a dead end
 
I'm thinking about making a tutorial for quest log, you got me wondering too.
 
k so dead end hit already lol what if I could edit the account manager so that every new character is created with the storage id of the quest wouldnt that make it appear in the quest log? If so how do I edit the account manager?


Ps if you could make a tutorial that would be awesome!! I would greatly appreciate that
 
k so dead end hit already lol what if I could edit the account manager so that every new character is created with the storage id of the quest wouldnt that make it appear in the quest log? If so how do I edit the account manager?


Ps if you could make a tutorial that would be awesome!! I would greatly appreciate that

Just give them an object in the beginning or use onLogin to give them all the storageIDs :)
I will make a tutorial, I just need to figure out how it works first.
 
Please do not double post unless 24 hours have passed.
Also, you could try by adding all those storages at login.
 
Try
Code:
	<quest name="QUEST NAME" startstorageid="XXXXXX" startstoragevalue="-1">
		<mission name="Reward" storageid="XXXXXX" startvalue="-1" endvalue="1">
		<missionstate id="0" description="TEXT"/>
		</mission>
	</quest>
 
Last edited:
Nope does not work thing is I believe the storage ID must be in the character's storage but I don't know how to make that every created character has all the storage ID from the beginning :/
 
Nope does not work thing is I believe the storage ID must be in the character's storage but I don't know how to make that every created character has all the storage ID from the beginning :/
Lua:
local k = {
      [1] = 1000, -- the storages must be added from lowest storage to highest storage.
      [2] = 1001,
      [3] = 1002,
      [4] = 1003,
      [5] = 1004
      }
function onLogin(cid)
	for i = k[1], #k do
		if getPlayerStorageValue(cid, i) == -1 then
			setPlayerStorageValue(cid, i, 1)
		end
	end
return true
end
 
Nope didn't work either here's what I have if I did something wrong let me know

I have in data\creaturescripts\creaturescripts.xml

Code:
<event type="login" name="QuestLog" script="QuestLog.lua"/>

in data\creaturescripts\scripts\QuestLog.lua

Code:
Lua Code:
local k = {
      [1] = 1000, -- the storages must be added from lowest storage to highest storage.
      [2] = 1001,
      [3] = 1002,
      [4] = 1003,
      [5] = 1004
      }
function onLogin(cid)
	for i = k[1], #k do
		if getPlayerStorageValue(cid, i) == -1 then
			setPlayerStorageValue(cid, i, 1)
		end
	end
return true
end

And in data\XML\quests.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<quests>
	<quest name="Example Quest I" startstorageid="30031" startstoragevalue="1">
		<mission name="The head of Kiper" storageid="1000" startvalue="1" endvalue="3">
			<missionstate id="1" description="Kill Kiper!"/>
			<missionstate id="2" description="Give his head to Talaturen!"/>
			<missionstate id="3" description="Take the medal you got from Talaturen to Ruly!"/>
		</mission>
		<mission name="Ruly's Revenge" storageid="30031" startvalue="4" endvalue="6">
			<missionstate id="4" description="You received a document with instructions from Ruly, follow them."/>
			<missionstate id="5" description="Go back to Ruly and tell him that you followed his instructions to the end."/>
			<missionstate id="6" description="You got a reward from Ruly, he was very thankful with that you helped him to take his revenge."/>
		</mission>
	</quest>
	<quest name="QUEST NAME 1" startstorageid="30038" startstoragevalue="-1">
		<mission name="Reward" storageid="1001" startvalue="-1" endvalue="1">
		<missionstate id="0" description="TEXT 1 "/>
		</mission>
	</quest>
	<quest name="QUEST NAME 2" startstorageid="30044" startstoragevalue="-1">
		<mission name="Reward" storageid="1002" startvalue="-1" endvalue="1">
		<missionstate id="0" description="TEXT 2"/>
		</mission>
	</quest>
	<quest name="QUEST NAME 3" startstorageid="30048" startstoragevalue="-1">
		<mission name="Reward" storageid="1003" startvalue="-1" endvalue="1">
		<missionstate id="0" description="TEXT 3"/>
		</mission>
	</quest>
	<quest name="QUEST NAME 4" startstorageid="30052" startstoragevalue="-1">
		<mission name="Reward" storageid="1004" startvalue="-1" endvalue="1">
		<missionstate id="0" description="TEXT 4"/>
		</mission>
	</quest>
</quests>

P.s. I'm running TFS 0.2.11pl2
 
Last edited:
I figured it out! I run 0.4 now and I entered that script that Bogart gave and played around in the storage values and I got it to work, I'm going to make a tutorial for this and give credits to Bogart for the Lua code but I do not know which version it's compatible with though Anyway thanks I'll make a new thread soon to explain this better

Edit: I removed the lua script and it still works so script is unnecessary
 
Last edited:
Status
Not open for further replies.
Back
Top