Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to create a new quest.

the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Hello there!

I will now show you how to create a new quest, we will make it pretty standard, but you can edit so much as you want it too.
I do give support for those that can't 100% follow this guide, but im not giving support for people that have other problem's.

This guide seems to be long, but its not, because the most steps you can either skip or you do them within a second. Its verrry easy to do and I explained every little detail, so you shouldn't have any problems.

Lets get started.
Open up your propQuest.inc wich is located in your Server File's Resource folder. In there are all the quests. Lets take a example, we will take the quest you get at level 5 from the NPC Losha, to find the quest:
Press CTRL+F and search for
Code:
QUEST_NEWPETYORN
Then you will copy that whole quest into a new notepad file. The quest begins at QUEST_NEWPETORN and ends with "}".
So this is what we will have in a clean notepad file:


Lets start making our own quest.
Change QUEST_NEWPETYORN to QUEST_YOURNAME . This will be the code name of your quest. Next you will see SetTitle. I will come to those IDS_PROPQUEST things in a minute. Lets continue at the following:
Code:
 SetCharacter( "MaFl_Loyah" );
This is the NPC that will give you the quest when you are the required level. You can change that to any NPC you want.
Next is the SetEndCondCharacter tab. This is the quest that you will return to when you are ready to complete the quest. Behind the name of the NPC, will be a vew numbers. Those are the coordinates of where the NPC is. You can change this to where-ever you want, I will not explain this any further tho.

The following important tab is:
Code:
SetBeginCondLevel( 5, 15 );
The first number, "5", is the level you can accept the quest at. The second number, "15", is the maximum level you can accept the quest at. You can change those to whatever you want.

The next important thing is this code:
Code:
SetBeginCondJob( JOB_VAGRANT );
This is the required job you need to be to accept the quest. To get other job names, just CTRL+F for example Elementor, wich is JOB_ELEMENTOR.

The next things is:
Code:
   SetEndCondItem( -1, 0, -1, II_SYS_SYS_QUE_YORN, 1, 7068, 4125, QUEST_DESTINATION_ID_0000
This is pretty self-explaining. the II_SYS_SYS_QUE_YORN is the item that you will need to farm in order to complete the quest. the "1" after II_SYS is the amount of, in this case, Yorn's you need to get. After that you have 7068 and 4125, wich again, are the coordinates on your map. The numbers before II_SYS I did not test yet, but you can play around with that too.

After changing this, we will change the name ingame-name of the quest and what the NPC says about the quest. For this, keep propQuest.inc open and also open propQuest.txt.txt.
As you saw on the top of the quest, is this:
Code:
                IDS_PROPQUEST_INC_001327
This is the title of the quest. Scroll down allllll the way till the bottom of the propQuest.txt.txt file. Create a new line and put in it:
Code:
IDS_TEST_INC_000001		YourName
Change YourName to your desired Quest Name. Now in the propQuest.inc, replace IDS_PROPQUEST_INC_001327 to IDS_TEST_INC_000001

Next we will change what the NPC actually SAYS.
It is very similar to changing the quest name. You can see IDS_PROPQUEST_INC_001328 at SetDialog. This is the first thing the NPC says when you click on the quest. So again see propQuest.txt.txt, scroll down all the way to the bottom, create a new line, and just do the EXACT same as for the Quest Name, but change 000001 to 000002. Replace 001328 with 000002 and you are done with that.

There are 5 things he will say till you can accept or decline the quest, QSAY_BEGIN1 till QSAY_BEGIN5. After that there is QSAY_BEGIN_YES and QSAY_BEGIN_NO. Those are the things he will say if you either accept or decline the quest.

Next there is QSAY_END_COMPLETE1 and QSAY_END_FAILURE1. This is what the NPC says when you are ready to complete the quest or when you are not.

Final there is State 0 and State 14. State 0 seems to be the thing he says when you finished the quest ans State 14 is just empty.

When you are done editing everything, make a blank line beneath between the end of QUEST_NEWPETYORN and the beginning of QUEST_PUMPKINCHILD. Save the two files. Now use RESEditor to replace the two files inside DataSub1.res.

Credits go to me for creating this guide and finding it out on my own I guess..

Any questions? Post them here.
Dont forget to like!
 
Last edited by a moderator:
Elite Diviner
Joined
Feb 10, 2011
Messages
416
Reaction score
99
Looks good, and not long at all :p
Will use it for sure.
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Thanks :]
 
1/11/1995 ~ 23/11/2011
Loyal Member
Joined
Nov 23, 2010
Messages
2,310
Reaction score
460
Not bad, some detail explaination missing though, but good job .
 
Newbie Spellweaver
Joined
Apr 17, 2010
Messages
6
Reaction score
0
nice guide ^^

can i have some question .... ?

1. How to set Quest to be repeatable or unrepeatable ?

and

2. How to give "reset skill" or "reset status" or "Change job" to the quest reward
i not mean item but mean reset skill instantly when quest finish


thx
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
1. Beneath SetBeginCondLevel put
SetRepeat( 1 );
If you want it repeatable.
Change 1 to 0 for not repeatable.

2. I am not out of these yet, ill post later when I know how to.
 
Joined
Jan 15, 2010
Messages
1
Reaction score
0
Great guide! Useful for adding basic quests.

In order to change jobs or reset stats you need to work with WorldDialog in the source.
As seen in the code snippet from NpcScript.cpp

Take a look at "void CNpcScript::masa_lopaze_8()"
Three conditions for the reward. 1. Have quest "QUEST_VOCMAG_TRN3" completed. 2. The player is a vagrant. 3. The player is level 15. If all three are valid it will change the players job and reset stats.

Code:
void CNpcScript::masa_lopaze_0()
{
	Speak( NpcId(), 782 );	
	SetScriptTimer( 15 );
}

void CNpcScript::masa_lopaze_1()
{
	LaunchQuest();
}

void CNpcScript::masa_lopaze_2()
{
	AddKey( 9 );
	AddKey( 10 );		
}

void CNpcScript::masa_lopaze_3()
{
	Say( 107 );
}

void CNpcScript::masa_lopaze_4()
{
	Say( 783 );
}

void CNpcScript::masa_lopaze_5()
{
	
}

void CNpcScript::masa_lopaze_6()
{
	
}

void CNpcScript::masa_lopaze_8()
{
	if( GetQuestState(QUEST_VOCMAG_TRN3) == QS_END && GetPlayerJob() == 0 && GetPlayerLvl() == 15 )
	{
		ChangeJob(4);
		InitStat();
	}

	else
	{
		Exit();
	}
}

void CNpcScript::masa_lopaze_9()
{
	Say( 784 );	
}

void CNpcScript::masa_lopaze_10()
{
	Speak( NpcId(), 785 );
	Exit();
}

If I have spare time, I'll try and write a complete guide.
 
Last edited:
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
Great guide! Useful for adding basic quests.

In order to change jobs or reset stats you need to work with WorldDialog in the source.
As seen in the code snippet from NpcScript.cpp

Take a look at "void CNpcScript::masa_lopaze_8()"
Three conditions for the reward. 1. Have quest "QUEST_VOCMAG_TRN3" completed. 2. The player is a vagrant. 3. The player is level 15. If all three are valid it will change the players job and reset stats.

Code:
void CNpcScript::masa_lopaze_0()
{
	Speak( NpcId(), 782 );	
	SetScriptTimer( 15 );
}

void CNpcScript::masa_lopaze_1()
{
	LaunchQuest();
}

void CNpcScript::masa_lopaze_2()
{
	AddKey( 9 );
	AddKey( 10 );		
}

void CNpcScript::masa_lopaze_3()
{
	Say( 107 );
}

void CNpcScript::masa_lopaze_4()
{
	Say( 783 );
}

void CNpcScript::masa_lopaze_5()
{
	
}

void CNpcScript::masa_lopaze_6()
{
	
}

void CNpcScript::masa_lopaze_8()
{
	if( GetQuestState(QUEST_VOCMAG_TRN3) == QS_END && GetPlayerJob() == 0 && GetPlayerLvl() == 15 )
	{
		ChangeJob(4);
		InitStat();
	}

	else
	{
		Exit();
	}
}

void CNpcScript::masa_lopaze_9()
{
	Say( 784 );	
}

void CNpcScript::masa_lopaze_10()
{
	Speak( NpcId(), 785 );
	Exit();
}

If I have spare time, I'll try and write a complete guide.

Thanks for contributing!;)
 
Junior Spellweaver
Joined
Nov 9, 2010
Messages
114
Reaction score
2
What if I wanted to make a quest that changes your job? For example from a vagrant to second or third job straight away? Or just simply add a new quest/1 click job quest for 3rd jobs? I can't figure it out. D:
 
the sound's resound echo
Loyal Member
Joined
Jun 14, 2009
Messages
932
Reaction score
156
What if I wanted to make a quest that changes your job? For example from a vagrant to second or third job straight away? Or just simply add a new quest/1 click job quest for 3rd jobs? I can't figure it out. D:

Sorry for the late answer, but that would be a job for the source (worlddialog.dll).
 
Junior Spellweaver
Joined
Jan 22, 2011
Messages
105
Reaction score
0
I've this error:
2012/ 6/25 20:20:15 FileName propQuest.inc(30134) : QUEST_TEST Not Found. : QUEST_TEST

{

SetTitle

(

IDS_TEST_INC_000001

);



setting

{

Set
 
One word! Im Fawkin Pro!
Loyal Member
Joined
Jul 1, 2010
Messages
1,254
Reaction score
359
I've this error:
2012/ 6/25 20:20:15 FileName propQuest.inc(30134) : QUEST_TEST Not Found. : QUEST_TEST

{

SetTitle

(

IDS_TEST_INC_000001

);



setting

{

Set

open definequest.h and add the quest name "QUEST_TEST" followed by the number that comes after the last quest added.
 
Back
Top