Little Mapquest quest guide

Play Now

Weikster

LOMCN Veteran
Veteran
Jan 21, 2009
421
11
44
36th chamber
Thought I would make a tiny guide on using mapquest for quests instead of Qfunction for 2.3 files, as using Qfunction a lot makes M2 thrown down it's best dolly.
This can be used for killcounts, item collection, almost anything.

First we will start off with the NPC. Make a folder inside Market_Def folder called namelists. This will hold all namelists for all your quests.
Inside make 2 new text docs for this quest named, omaquest and omadone

Code:
[@main]
#IF
CHECKNAMELIST namelists/omadone.txt
#ACT
goto @did
#ELSEACT
goto @check
 
[@did]
Thanks <$USERNAME> but I don't need\
any more Omas killed for me just yet...\ \ \
< Close/@exit>
 
[@check]
#IF
CHECKNAMELIST namelists/omaquest.txt
#ACT
goto @oma2
#ELSESAY
Hello <$USERNAME>, have you ever seen an Oma?\
Well they are all pissed at me because i stole\
a chest of their gold and shared it amongst the people\
of this village. Show them I am not afraid and slay 50\
of them in my name!! <Reward>-100k and 10,000 EXP.\
<OK, I will kill them for you!/@start >
<Defend your own dishonor!/@exit >
 
[@start]
#ACT
ADDNAMELIST namelists/omaquest.txt
SET [20] 1
Var Integer Human omakills
#SAY
Good luck during your adventure, and tell\
the Oma's I did it for the good of the community!\ \
< Close/@exit>
 
[@oma2]
#IF
CHECKVAR HUMAN omakills > 49
#ACT
ADDNAMELIST namelists/omadone.txt
DELNAMELIST namelists/omaquest.txt
GIVE GOLD 100000
CHANGEEXP + 10000
SENDMSG 6 "100k Gold and 10k Experience Points recieved."
#SAY
Thank you very much <$USERNAME>! Maybe\
now I can sleep at night...\ \ \
< Close/@exit>
#ELSESAY
Number of Omas killed : <$HUMAN(omakills)>/50\ \
< Close/@exit>

Now for this all to work, you need to go to M2Server/Envir/QuestDiary/ and add a new folder named Variables and then inside the variables folder make a new text doc named Integral. (If they are not already there.)


To load this quest variable for when people log on in the middle of doing the quest you must add this bit to Envir/Mapquest_Def/QManage.txt;under the [@Login], only use one [@Login] for everything in Qmanage.
Code:
#IF
CHECKNAMELIST ..\Market_Def\namelists\omaquest.txt
#ACT
Var Integer Human omakills
LoadVar Human omakills ..\QuestDiary\Variables\Integral.txt

Next, goto M2Server/Envir/Mapquest_Def and make a new text doc
named omakills. This text will be triggered when a player kills an Oma during the quest and when they've killed enough it will tell them plus turn the quest off as far as the killing part goes. (turns flag 20 off)

Code:
[@main]
#IF
CHECK [20] 1
#ACT
CalcVar Human omakills + 1
SaveVar Human omakills ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Omas Killed: <$Human(omakills)>/50."
goto @next
[@next]
#IF
CheckVar Human omakills > 49
#ACT
SET [20] 0
sendmsg 6 "You have killed enough Omas, come get your reward!"
break
#ELSEACT
break

To trigger the above script, go to M2Server/Envir/MapQuest.txt and add this below the last entry;
Code:
[COLOR=darkorange]0[/COLOR]  [COLOR=blue][20] 1[/COLOR]  [COLOR=purple]Oma[/COLOR]  [COLOR=red]*[/COLOR] [COLOR=darkred]omakills[/COLOR]

0 = Map name where quest mob will be killed, in this case Bichon.
[20] 1 = means this flag must be on to trigger script.
Oma = Mob being killed.
* = If an item is required to trigger the script.(item in bag) you would put that here, in this quest no item so it will be left as a *
omakills = script to run from MapQuest_def folder above.


It should all work from here and should be damn easy to make numerous quests by following this outline.

Preacher and others have made a guide like this also-
But seeing as people hate to use search function, thought I would redo it so it's up front, plus I was bored. :blush:
 
Last edited:

SabreMir

Dedicated Member
Dedicated Member
Jul 21, 2012
114
2
45
Make sure you are killing the required monsters on the correct map.
have tested it by spawning omas and killing the in bw and is set for map 0 which is bichon province so that parts all correct as far as i know
 
Upvote 0

hershire

LOMCN Veteran
Veteran
Loyal Member
Sep 5, 2004
427
10
45
This is an incredible system, someone on my server told me however that using vars causes items to dissapear. I find it very unlikely since the only thing it touches in db is the charinfo/questflags

Just curious if he knows what hes talking about because this would beat using flags for each kill!
 
Upvote 0