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

TFS 1.x Set quest completed on login

Degus

Member
Joined
Feb 20, 2013
Messages
50
Reaction score
6
Location
Sweden
I would like some help with creating a lua script for having quests like, wrath, inq, yalahar quest etc being completed upon login just untill the point where you have to kill bosses in wrath or inq or yalahar etc.
Would be very grateful for any help! :) PM or post here :D
 
Greets!

If you begin to simply search what you are looking for, "questlog", you'll find a nice tutorial on the spot:
https://otland.net/threads/configuration-how-to-make-a-working-quest-log.143683/
(Try different keywords if you don't find what you are looking for on the first 5-10 pages when searching)

I'll provide you with a small and fast solution and copy code anyway.

First have a look at your quests or create one:

quests.xml
Code:
<mission name="Treasure Seeker" storageid="10580" startvalue="0" endvalue="1">
<missionstate id="0" description="Search the Rat Caves underneath the City - Follow the Treasure Mark on the Map!"/>
<missionstate id="1" description="Complete - Reward: 200 Gold"/>
</mission>

Now add it to your login:

creaturescripts/login
Code:
if getPlayerStorageValue(cid, 10580) == -1 then
  setPlayerStorageValue(cid, 10580, 0)
  end

By doing so, the quest will start at the wanted "missionstate" as seen in the first "code".
In my case above I wanted the player to go from not knowing anything about the quest ( -1 ) to missionstate 0, you can also see in the example that my mission starts with a quest text at 0 and ends on 1 once the chest is clicked.

Another example that I found by going to search, advance, tutorial, Word "quest":
TFS 1.2 Questlog Tutorial
https://otland.net/threads/how-to-make-a-quest-and-have-it-show-in-the-quest-log.238172/

Good luck and have a nice day!

Kind Regards,
Eldin.
 
Last edited:
Greets!

If you begin to simply search what you are looking for, "questlog", you'll find a nice tutorial on the spot:
https://otland.net/threads/configuration-how-to-make-a-working-quest-log.143683/
(Try different keywords if you don't find what you are looking for on the first 5-10 pages when searching)

I'll provide you with a small and fast solution and copy code anyway.

First have a look at your quests or create one:

quests.xml
Code:
<mission name="Treasure Seeker" storageid="10580" startvalue="0" endvalue="1">
<missionstate id="0" description="Search the Rat Caves underneath the City - Follow the Treasure Mark on the Map!"/>
<missionstate id="1" description="Complete - Reward: 200 Gold"/>
</mission>

Now add it to your login:

creaturescripts/login
Code:
if getPlayerStorageValue(cid, 10580) == -1 then
  setPlayerStorageValue(cid, 10580, 0)
  end

By doing so, the quest will start at the wanted "missionstate" as seen in the first "code".
In my case above I wanted the player to go from not knowing anything about the quest ( -1 ) to missionstate 0, you can also see in the example that my mission starts with a quest text at 0 and ends on 1 once the chest is clicked.

Another example that I found by going to search, advance, tutorial, Word "quest":
TFS 1.2 Questlog Tutorial
https://otland.net/threads/how-to-make-a-quest-and-have-it-show-in-the-quest-log.238172/

Good luck and have a nice day!

Kind Regards,
Eldin.
Thank you thats all I needed! :)
 
Back
Top