Little Mapquest quest guide

smoochy boys on tour

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:

Madman

LOMCN Veteran
Veteran
Jan 16, 2010
490
17
44
Nice guide, will have to get round to learning more about variables. As it seems the best way to do things. Cheers :)
 
Upvote 0

Skyline

LOMCN Admin
Staff member
Administrator
Mar 26, 2003
7,151
566
380
Sheffield
Quite a nice guide, and easy to follow.

This is something I always wanted to learn, but never got round to it.
 
Upvote 0

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
when you do your call file from mapquest def

you add alil more like counters or a msg to say when its over

[@main]
#IF
CHECK [456] 1
#ACT
CalcVar Human MultiKill6 + 1
SaveVar Human MultiKill6 ..\QuestDiary\Variables\Integral.txt
LineMSG 6 "Quest: <$Human(MultiKill6)>/20 monsters killed!"
GOTO @w1

[@w1]
#IF
CheckVar Human MultiKill6 > 20
#ACT
sendmsg 6 "You have killed 20 Dungs go see Tim"
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
[@main]
#IF
CheckVar Human Ether1 > 298
#ACT
CalcVar Human Ether1 + 1
SaveVar Human Ether1 ../QuestDiary/Variables/Integral.txt
LineMSG 10 "Ethereal Temple Monsters Killed <$Human(Ether1)>/300"
LineMSG 6 "Hany (265:80) LithiumGlades : You have completed my Quest! Come see me!"
SET [717] 0 ;stops the mapquest flag running
ADDNAMELIST ../Market_Def/Namelists/EtherealQuest/Q1Priz.txt ; <- whatever namelist u want it to be called
BREAK
#ELSEACT
CalcVar Human Ether1 + 1
SaveVar Human Ether1 ../QuestDiary/Variables/Integral.txt
LineMSG 10 "Ethereal Temple Monsters Killed <$Human(Ether1)>/300"
BREAK



personally id do it like this, that way your only using up 1 flag per quest, and u just use namelists to check if u completed it/got prize etc....



for ppl that dont know the below:

MESSAGEBOX "You have killed enough Omas!"

this is just a pop up box... its a good idea, but it also makes ur screen freeze until u presse OK on the box.

for example u might just finish teh quest, and it pops up, and at that moment ud be low health/some1 might be pkin u wotever.. u are 2 slow clickin the box and die.. blame host..

easier to use linemsg really
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
I'm having trouble with this.

Ive done it word for word, yet my NPC wont get past the first page where you accept the quest. Any help?

I have tried adding a close @exit bit, to test where the problems occuring. Neither option works, you just click them and they do nothing, the script just sits there.

All Im doing outside of the guide is adding the NPC script to a file in NPC Def 'Oldman-0' Do I need to be changing the paths for the namelists etc to their full directories?
 
Last edited:
Upvote 0

Weikster

LOMCN Veteran
Veteran
Jan 21, 2009
421
11
44
36th chamber
when you do your call file from mapquest def

you add alil more like counters or a msg to say when its over

[@main]
#IF
CHECK [456] 1
#ACT
CalcVar Human MultiKill6 + 1
SaveVar Human MultiKill6 ..\QuestDiary\Variables\Integral.txt
LineMSG 6 "Quest: <$Human(MultiKill6)>/20 monsters killed!"
GOTO @w1

[@w1]
#IF
CheckVar Human MultiKill6 > 20
#ACT
sendmsg 6 "You have killed 20 Dungs go see Tim"

Yes thank you, I forgot to add the check in there!

[@main]
#IF
CheckVar Human Ether1 > 298
#ACT
CalcVar Human Ether1 + 1
SaveVar Human Ether1 ../QuestDiary/Variables/Integral.txt
LineMSG 10 "Ethereal Temple Monsters Killed <$Human(Ether1)>/300"
LineMSG 6 "Hany (265:80) LithiumGlades : You have completed my Quest! Come see me!"
SET [717] 0 ;stops the mapquest flag running
ADDNAMELIST ../Market_Def/Namelists/EtherealQuest/Q1Priz.txt ; <- whatever namelist u want it to be called
BREAK
#ELSEACT
CalcVar Human Ether1 + 1
SaveVar Human Ether1 ../QuestDiary/Variables/Integral.txt
LineMSG 10 "Ethereal Temple Monsters Killed <$Human(Ether1)>/300"
BREAK



personally id do it like this, that way your only using up 1 flag per quest, and u just use namelists to check if u completed it/got prize etc....



for ppl that dont know the below:

MESSAGEBOX "You have killed enough Omas!"

this is just a pop up box... its a good idea, but it also makes ur screen freeze until u presse OK on the box.

for example u might just finish teh quest, and it pops up, and at that moment ud be low health/some1 might be pkin u wotever.. u are 2 slow clickin the box and die.. blame host..

easier to use linemsg really

Very true, thanks for helping, will edit script. =)

I'm having trouble with this.

Ive done it word for word, yet my NPC wont get past the first page where you accept the quest. Any help?

I have tried adding a close @exit bit, to test where the problems occuring. Neither option works, you just click them and they do nothing, the script just sits there.

All Im doing outside of the guide is adding the NPC script to a file in NPC Def 'Oldman-0' Do I need to be changing the paths for the namelists etc to their full directories?

Try putting the NPC in Market_Def not NPC_Def
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
Right so after messing around with this trying to sort myself with various edits to the paths to tht txt file and trying to put the scripts in diff places I give up lol.

So, I started from step 1. Followed the guide exactly. M2server gives me an error saying it cant locate the npc script in npc_def. So, I make a copy and stick it in NPC_def.

Then when i try to accept the quest m2server says [22/08/2010 11:10:42] file not found => .\Envir\MapQuest_def\..\Market_Def\namelists\omaquest.txt
[22/08/2010 11:10:47] file not found => .\Envir\Npc_def\..\namelists\omadone.txt

Like I say I have already messed around with the paths a fair bit and i never get past the first npc dialogue.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
lol... post the script uve messed up the paths so much

and tell me where u want the namelists to actually be

im assumin in market_def/namelists/omaquest.txt
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
lol... post the script uve messed up the paths so much

and tell me where u want the namelists to actually be

im assumin in market_def/namelists/omaquest.txt

I tried tweaking it gave up and followed the first post word for word.

I dont mind where namelists are as long as server finds them. Like I say the m2server seemed to be looking in npc_def so the first tweak I made was to put everything in there.

The way I cant get past the first bit of the script, and the way when I click it m2server produces an error, suggests its simply a case of the server not being able to locate my namefiles. It cant get past that prt of the script hence it doesnt even bother displaying the text after.

I copy pasted weiksters first npc script. I get the error in m2server

Code:
[23/08/2010 18:55:58] file not found => .\Envir\MapQuest_def\..\Market_Def\namelists\omaquest.txt
[23/08/2010 18:56:30] file not found => .\Envir\Npc_def\..\namelists\omadone.txt

So I move the npc script and namelists to market def, npc stops speaking, move just npc script back to npc_def and he speaks but wont go to second screen

Even just had an idea just now of putting the NPC in the merchant npc list in sql, made no diff. The problem is the server cant find my namelists.

I need to know;

What paths for the namelists
Where to put the namelists
Where I need to stick the npc script
Where do I set NPC in sql, npc or nerchant
 
Last edited:
Upvote 0

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
i think if the npc is in npc def the namelist needs to be there.
would be the same for market def too.

i make folders to keep track of my namelists.

like in market def a npc calls for this txt from a folder in market def

checknamelist MultiKill/10.txt
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
I now have the npc spawing from merchant in sql
I have market_def which the npc script is in
I also have in there /namelists omaquest.txt and omadone.txt

M2 server still cant locate these two files. Could I say, not need these files and just use flags, and just keep a log of which flags I use? I there any limit to flags IE can only use from 1-999?

Like instead of omadone id have flag 2 set, if its set to 1 (on) it means youve done quest and wont let you again and flag 3 is for if youre already on the quest. I could still keep the integer and killcount files that way.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
just change it to

addnamelist omaquest.txt

etc


then inside market_def... just create a text file called omaquest.txt

maybe u aint creating the text file.... or ur fkin with the paths 2 much

but like i said, u wont post the script ur using so i cant help u
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
Its alright I sorted it. For some weird reason using weiksters text was causing the problem.

Code:
<OK/@start>\
<Defend your own dishonor/@exit>

I dont think it liked the exclaimation marks/spaces..
 
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
Got this working now. Only bit that doesnt is when it notifies you when you complete it, or notify you of your progress.

Code:
[@main]
#IF
CheckVar Human omakills > 49
#ACT
CalcVar Human omakills + 1
SaveVar Human omakills ../QuestDiary/Variables/Integral.txt
SendMSG 1 "Oma Killed <$Human(omakills)>/50"
SendMSG 1 "OldMan In gingko has something in his front pocket for you"
SET [20] 0 ;stops the mapquest flag running
BREAK
#ELSEACT
CalcVar Human omakills + 1
SaveVar Human omakills ../QuestDiary/Variables/Integral.txt
sendmsg 10 "Oma Killed <$Human(omakills)>/50"
BREAK

Have tried using linemsg and sendmsg neither work.

Edit: Sorted, thanks Weikster Ice and Ben (Never thought id say the last one)
 
Last edited:
Upvote 0

pwnage

Golden Oldie
Golden Oldie
Feb 17, 2006
598
5
124
cheers mate nice guide , if any1 has problems with this not working just take the spaces out of the first button you come across (Y) x
 
Upvote 0

SabreMir

Dedicated Member
Dedicated Member
Jul 21, 2012
114
2
45
i know this is an old post but has helped me alot but having 1 problem, when im killing the mobs for quest its not adding them to kill count just keeps telling me ive killed 0/50 etc any help witrh this pls ???
 
Upvote 0