Quest Help (var)

™blade™

Golden Oldie
Golden Oldie
Oct 31, 2004
799
1
125
Npc
Code:
[@main]
#IF
CHECKNAMELIST ..\MapQuest_def\Quests\OmaComplete1.txt
#SAY
Thanks you for you help <$USERNAME>. \ \
<Exit/@exit>
#ACT
BREAK
#IF
CHECKNAMELIST ..\MapQuest_def\Quests\OmaComplete.txt
#SAY
Thanks you for you help <$USERNAME>. Please take this reward. \ \
<Exit/@exit>
#ACT
ADDNAMELIST ..\MapQuest_def\Quests\OmaComplete1.txt
GIVE Gold  10000
Give Smalldcstone 1
BREAK
#IF
CHECKNAMELIST ..\MapQuest_def\Quests\OmaStart.txt
#SAY
You have killed <$Human(BoneFighter)>/10 BoneFighter. \
You have killed <$Human(CaveMaggot)>/10 CaveMaggot. \
You have killed <$Human(CaveBat)>/10 CaveBat. \
Please come back when you have killed all Ten. \ \
<Exit/@exit>
#ACT
BREAK
#ELSESAY
Hi would you like to take the quest? \ \
<Yes/@accept> || <No/@exit>
[@accept]
#SAY
Sweet. Come back when you've killed 10 BoneFighter, \ 
10 CaveMaggot & 10 CaveBat\
#ACT
ADDNAMELIST ..\MapQuest_def\Quests\OmaStart.txt
SET [101] 1
Var Integer Human BoneFighter 0
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
Var Integer Human CaveMaggot 0
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
Var Integer Human CaveBat 0
SaveVar Human CaveBat ..\QuestDiary\Variables\Integral.txt

MapQuest_def
Code:
[@main]
#IF
CheckVar Human BoneFighter = 10
CheckVar Human CaveMaggot = 10
CheckVar Human CaveBat = 10
#ACT
BREAK
#IF
CheckVar Human BoneFighter = 9
CheckVar Human CaveMaggot = 9
CheckVar Human CaveBat = 9
#ACT
GOTO @finish
BREAK
#IF
CheckVar Human BoneFighter < 9
CheckVar Human CaveMaggot < 9
CheckVar Human CaveBat < 9
#ACT
CalcVar Human BoneFighter + 1
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveMaggot + 1
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveBat + 1
SaveVar Human CaveBat ..\QuestDiary\Variables\Integral.txt
BREAK
#ELSEACT
BREAK
[@finish]
#ACT
SET [101] 0
CalcVar Human BoneFighter + 1
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveMaggot + 1
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveBat + 1
SaveVar Human CaveBat ..\QuestDiary\Variables\Integral.txt
ADDNAMELIST ..\MapQuest_def\Quests\OmaComplete.txt
#SAY
You have killed enough Monster to finish the quest. Return to the NPC for you \
prize. \ \
<Exit/@exit>

MapQuest.txt
Code:
D001 [101] 1 BoneFighter * omacave
D001 [101] 1 CaveMaggot * omacave
D001 [101] 1 CaveBat  * omacave

Qmange
Code:
[@login]
#IF
#ACT
Var Integer Human BoneFighter
LoadVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
Var Integer Human CaveMaggot
LoadVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
Var Integer Human CaveBat
LoadVar Human CaveBat ..\QuestDiary\Variables\Integral.txt
break

i have a bit of trouble with this for some reason it dont work for the other mobs only the bonefighter you kill ten bonefighter and it says you have killed Ten cavemaggots, cavebats. what have i done wrong plz!
 

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
Heres one of mine.
Make sure your on the rite map and your useing the rite name like in the db.

Qman
Code:
[@Login]
#IF
CHECK [446] 1
#ACT
Var Integer Human MultiKill10 0
LoadVar Human MultiKill10 ..\QuestDiary\Variables\Integral.txt
#IF
CHECK [447] 1
#ACT
Var Integer Human MultiKill11 0
LoadVar Human MultiKill11 ..\QuestDiary\Variables\Integral.txt
#IF
CHECK [448] 1
#ACT
Var Integer Human MultiKill12 0
LoadVar Human MultiKill12 ..\QuestDiary\Variables\Integral.txt
#IF
CHECK [449] 1
#ACT
Var Integer Human MultiKill13 0
LoadVar Human MultiKill13 ..\QuestDiary\Variables\Integral.txt
#IF
CHECK [450] 1
#ACT
Var Integer Human MultiKill14 0
LoadVar Human MultiKill14 ..\QuestDiary\Variables\Integral.txt

MapQuest Txt

Code:
D404      [446]    1      Zombie1              *               Zb1
D404      [446]    1      Zombie10             *               Zb10
D405      [446]    1      Zombie1              *               Zb1
D405      [446]    1      Zombie10             *               Zb10
D406      [446]    1      Zombie1              *               Zb1
D406      [446]    1      Zombie10             *               Zb10
D401      [447]    1      Zombie2              *               Zb2
D401      [447]    1      Zombie20             *               Zb20
D402      [447]    1      Zombie2              *               Zb2
D402      [447]    1      Zombie20             *               Zb20
D403      [447]    1      Zombie2              *               Zb2
D403      [447]    1      Zombie20             *               Zb20
D406      [447]    1      Zombie2              *               Zb2
D406      [447]    1      Zombie20             *               Zb20

MapQuest Def
Zb1.txt
Code:
[@main]
#IF
RANDOM 5
CHECK [446] 1
#ACT
CalcVar Human MultiKill10 + 1
SaveVar Human MultiKill10 ..\QuestDiary\Variables\Integral.txt
LineMSG 6 "Quest: <$Human(MultiKill10)>/20 items found!"
GOTO @w1

[@w1]
#IF
CheckVar Human MultiKill10 > 19
#ACT
sendmsg 6 "You have found 20 Zombie eye go see Sam."

Npc goes in market def

Code:
[@main]
#IF
checknamelist MultiKill/30.txt
#ACT
goto @done
break

#IF
checknamelist MultiKill/29.txt
#ACT
goto @5
break

#IF
checknamelist MultiKill/28.txt
#ACT
goto @main5
break

#IF
checknamelist MultiKill/27.txt
#ACT
goto @4
break

#IF
checknamelist MultiKill/26.txt
#ACT
goto @main4
break

#IF
checknamelist MultiKill/25.txt
#ACT
goto @3
break

#IF
checknamelist MultiKill/24.txt
#ACT
goto @main3
break

#IF
checknamelist MultiKill/23.txt
#ACT
goto @2
break

#IF
checknamelist MultiKill/22.txt
#ACT
goto @main2
break

#IF
checknamelist MultiKill/21.txt
#ACT
goto @1
break

#ELSEACT
goto @main1


;; Main output

[@main1]
<Hello, my name is Jim!>\ \
Welcome, you have now found me! I am new to the Venheance\
Mir and I have many many many challanges for you, if\
you wish to accept these challanges, let me know at any\
time!\ \

<Begin Quest 1/@quest1> -- <Exit/@exit>


;; Quest 1


[@quest1]
#ACT
addnamelist MultiKill/21.txt
SET [446] 1
Var Integer Human MultiKill10 0
SaveVar Human MultiKill10 ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Kill 20 CaveBats! Come back when you have!"
close

[@1]
#IF
CheckVar Human MultiKill10 > 19
#ACT
goto @1.1
#ELSEACT
goto @1.2

[@1.1]
#ACT
delnamelist MultiKill/21.txt
addnamelist MultiKill/22.txt
goto @1.3
sendmsg 6 "Congratulations, Quest 1 Complete!"
give gold 8000
CHANGEEXP + 115



[@1.2]
<Hello, my name is Jim!>\ \
You have currently killed <$HUMAN(MultiKill10)> 20 CaveBats, come back when\
you have killed 20!.\
<exit/@exit>

[@1.3]
<Hello, my name is Jim!>\ \
That was just a warm up, there is no reward for that, but least I\
now know you are worthy to continue, talk to me at any other time\
to begin more quests!\
<exit/@exit>


;; Quest 2

[@main2]
<Hello, my name is Jim!>\ \
So, you want another challange huh! Well, this one will be of\
course much harder, so, if you think you have what it takes then\
this one is made for endurance, think you have what it takes? If\
you can complete this one, I will grant you a reward!\
<Begin Quest 2/@quest2> -- <Exit/@exit>


[@quest2]
#ACT
delnamelist MultiKill/22.txt
addnamelist MultiKill/23.txt
reset [446] 1
SET [447] 1
Var Integer Human MultiKill11 0
SaveVar Human MultiKill11 ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Kill 30 CaveMaggots! Come back when you have!"
close

[@2]
#IF
CheckVar Human MultiKill11 > 29
#ACT
goto @2.1
#ELSEACT
goto @2.2

[@2.1]
#IF
checkjob wizard
#ACT
goto @2.11
break
#IF
checkjob taoist
#ACT
goto @2.22
break
#IF
checkjob warrior
#ACT
goto @2.33
break
#IF
checkjob assassin
#ACT
goto @2.33
break



[@2.11]
#ACT
delnamelist MultiKill/23.txt
addnamelist MultiKill/24.txt
CHANGEEXP + 2000000
give gold 10000
goto @2.3
sendmsg 6 "Congratulations, Quest 2 Complete!"


[@2.22]
#ACT
delnamelist MultiKill/23.txt
addnamelist MultiKill/24.txt
CHANGEEXP + 2000000
give gold 10000
goto @2.3
sendmsg 6 "Congratulations, Quest 2 Complete!"


[@2.33]
#ACT
delnamelist MultiKill/23.txt
addnamelist MultiKill/24.txt
CHANGEEXP + 200000
give gold 1000000
goto @2.3
sendmsg 6 "Congratulations, Quest 2 Complete!"


[@2.2]
<Hello, my name is Jim!>\
You have currently killed <$HUMAN(MultiKill11)> CaveMaggots, come back when\
you have killed 30!.\
<exit/@exit>

[@2.3]
<Hello, my name is Jim!>\
Congratulations, 30 CaveMaggots is a very long process, as for that I gave\
you a small reward, I am sure you will find a use for these items!!!\
<exit/@exit>

;; Quest 3

[@main3]
<Hello, my name is Jim!>\
So so so, so, you are back for more huh! Well, wise guy! This one will\
require strengh, not just on you're own, muahah!! Oh and i must stress\
that, this is not for the weak, Best of luck, muaha!\
<Begin Quest 3/@quest3> -- <Exit/@exit>


[@quest3]
#ACT
delnamelist MultiKill/24.txt
addnamelist MultiKill/25.txt
reset [447] 1
SET [448] 1
Var Integer Human MultiKill12 0
SaveVar Human MultiKill12 ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Kill 40 Skeletons around OmasCaves! Good luck!"
close

[@3]
#IF
CheckVar Human MultiKill12 > 39
#ACT
goto @3.1
#ELSEACT
goto @3.2

[@3.1]
#ACT
delnamelist MultiKill/25.txt
addnamelist MultiKill/26.txt
give gold 1200000
CHANGEEXP + 215000
goto @3.3
sendmsg 6 "Congratulations, Quest 3 Complete!"


[@3.2]
<Hello, my name is Jim!>\ \
You have currently killed <$HUMAN(MultiKill12)> Skeletons, come back when\
you have killed 40!.\
<exit/@exit>

[@3.3]
<Hello, my name is Jim!>\ \
Congratulations, 40 Skeleton's not on you're own must have been a challange\
especially when they are real, anyways!!! Hope you enjoyed your reward\
<exit/@exit>

;; Quest 4

[@main4]
Well your back for more i see,lets what i have for you!\
Lets go back to OmaCaves and kill 50 BoneWarriors!\
<Begin Quest 4/@quest4> -- <Exit/@exit>


[@quest4]
#ACT
delnamelist MultiKill/26.txt
addnamelist MultiKill/27.txt
reset [448] 1
SET [449] 1
Var Integer Human MultiKill13 0
SaveVar Human MultiKill13 ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Kill 50 BoneWarriors around OmaCaves! Good luck!"
close

[@4]
#IF
CheckVar Human MultiKill13 > 49
#ACT
goto @4.1
#ELSEACT
goto @4.2

[@4.1]
#ACT
delnamelist MultiKill/27.txt
addnamelist MultiKill/28.txt
give gold 1250000
CHANGEEXP + 230000
goto @4.3
sendmsg 6 "Congratulations, Quest 4 Complete!"


[@4.2]
<Hello, my name is Jim!>\ \
You have currently killed <$HUMAN(MultiKill13)> BoneWarriors, come back when\
you have killed 50!.\
<exit/@exit>

[@4.3]
<Hello, my name is Jim!>\ \
Congratulations, 50 BoneWarrior's not on you're own must have been a challange\
especially when they are real, anyways!!! Hope you enjoyed your reward\
<exit/@exit>


[@main5]
Well your back for more i see,lets what i have for you!\
Lets go deep into OmaCaves and kill 3 BoneElites!\
<Begin Quest 5/@quest5> -- <Exit/@exit>


[@quest5]
#ACT
delnamelist MultiKill/28.txt
addnamelist MultiKill/29.txt
reset [449] 1
SET [450] 1
Var Integer Human MultiKill14 0
SaveVar Human MultiKill14 ..\QuestDiary\Variables\Integral.txt
sendmsg 6 "Kill 3 BoneElite deep in the OmaCaves! Good luck!"
close

[@5]
#IF
CheckVar Human MultiKill14 > 2
#ACT
goto @5.1
#ELSEACT
goto @5.2

[@5.1]
#ACT
delnamelist MultiKill/29.txt
addnamelist MultiKill/30.txt
give gold 1300000
CHANGEEXP + 2450000
goto @5.3
sendmsg 6 "Congratulations, Quest 5 Complete!"


[@5.2]
<Hello, my name is Jim!>\ \
You have currently killed <$HUMAN(MultiKill14)> BoneElites, come back when\
you have killed 20!.\
<exit/@exit>

[@5.3]
<Hello, my name is Jim!>\ \
Congratulations, 3 BoneElite's not on you're own must have been a challange\
especially when they are real, anyways!!! Hope you enjoyed your reward\
<exit/@exit>

[@done]
There will be more to come....\
<Exit/@exit>

Then make a folder called MultiKill in market def with txt 21-30 in it.
 
Last edited:
Upvote 0

Anonlol

LOMCN Veteran
Veteran
Feb 25, 2010
574
14
104
See this http://www.lomcn.co.uk/forum/showthread.php?67356-Little-Mapquest-quest-guide

You're making it too complicated, copy the above and you can either make it so you have to kill 30 omacave mobs (So set up the kill trigger for each 3 mobs to add to the same count) Or you can do them seperately just have a SEPERATE script file for each mob ie

D001 [101] 1 BoneFighter * omacave
D001 [101] 1 CaveMaggot * omacave1
D001 [101] 1 CaveBat * omacave2
 
Upvote 0

™blade™

Golden Oldie
Golden Oldie
Oct 31, 2004
799
1
125
im useing the script above but for some reason when u kill a bonefighter it thinks u have killed 2 when u only killed one
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
you'll have to have 3 different text files...

D001 [101] 1 BoneFighter * omacave1
D001 [101] 1 CaveMaggot * omacave2
D001 [101] 1 CaveBat * omacave3

Code:
[@omacave1] bit
[@main]
[COLOR="cyan"]#IF
CheckVar Human BoneFighter = 10
CheckVar Human CaveMaggot = 10
CheckVar Human CaveBat = 10
#ACT
sendmsg 6 "You have completed this task, go see the NPC for prize!"
BREAK[/COLOR] ----------- [COLOR="red"]remove this bit as u alrdy got it to turn the flag off when its complete ne way...[/COLOR]

#IF
CheckVar Human BoneFighter = 9
CheckVar Human CaveMaggot = 10
CheckVar Human CaveBat = 10
#ACT
GOTO @finish
BREAK

#IF
CheckVar Human BoneFighter < 10 [COLOR="red"];U need this to be 10, because if it goes to  = 9, but u havnt killed 10 of the other mobs, its forever gonna stay at 9 all of them.. so if the other 2 are not finished, it goes bk to this bit, and makes it = 10[/COLOR]#ACT
CalcVar Human BoneFighter + 1
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
[COLOR="red"]This text file is only for the fighter.. so in the others ud just change it to cavebat etc...[/COLOR]
BREAK
#ELSEACT
BREAK

[@finish]
#ACT
SET [101] 0
CalcVar Human BoneFighter = 10
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveMaggot = 10
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveBat = 10
SaveVar Human CaveBat ..\QuestDiary\Variables\Integral.txt
[COLOR="red"];dont rly need to set maggot+bat to 10 as should alrdy be set at that, but no harm rly[/COLOR]
ADDNAMELIST ..\MapQuest_def\Quests\OmaComplete.txt
#SAY
You have killed enough Monster to finish the quest. Return to the NPC for you \
prize. \ \
<Exit/@exit>




then the other npcs would be same but just changing the bits about
Code:
[COLOR="red"]Cavemaggot npc[/COLOR]
[@main]
#IF
CheckVar Human BoneFighter = 10
CheckVar Human CaveMaggot = 9 [COLOR="red"];so obviously just changing this bit to cavemaggot[/COLOR]
CheckVar Human CaveBat = 10 
#ACT
GOTO @finish
BREAK

#IF
CheckVar Human CaveMaggot < 10
#ACT
CalcVar Human CaveMaggot + 1
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
[COLOR="red"]again just changin the variable name to correct 1..[/COLOR]
BREAK
#ELSEACT
BREAK

[@finish]
#ACT
SET [101] 0
CalcVar Human BoneFighter = 10
SaveVar Human BoneFighter ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveMaggot = 10
SaveVar Human CaveMaggot ..\QuestDiary\Variables\Integral.txt
CalcVar Human CaveBat = 10
SaveVar Human CaveBat ..\QuestDiary\Variables\Integral.txt
[COLOR="red"];dont rly need to set maggot+bat to 10 as should alrdy be set at that, but no harm rly[/COLOR]
ADDNAMELIST ..\MapQuest_def\Quests\OmaComplete.txt
#SAY
You have killed enough Monster to finish the quest. Return to the NPC for you \
prize. \ \
<Exit/@exit>


you can do the last npc urself, hope this helps
 
Upvote 0

™blade™

Golden Oldie
Golden Oldie
Oct 31, 2004
799
1
125
thx i will give this a try :D also like i said above ive done a quest usein icemans script but when i kill the mobs it thinks ive killed 2 lol
 
Upvote 0

™blade™

Golden Oldie
Golden Oldie
Oct 31, 2004
799
1
125
i made this script
Code:
[@main]
#IF
CHECKNAMELIST Quests/4.txt
#ACT
goto @done

#IF
checknamelist Quests/3.txt
#ACT
goto @2
break

#IF
checknamelist  Quests/2.txt
#ACT
goto @main2
break

#IF
checknamelist  Quests/1.txt
#ACT
goto @1
break

#ELSEACT
goto @main1


[@main1]
<Hello, my name is John!>\ \
Welcome,nice to see you have  found me!\
For this quest you will need to go and slay me\
5 hen's and i will reward you with an prize\

<Begin Quest 1/@quest1> -- <Exit/@exit>


;; Quest 1


[@quest1]
#ACT
addnamelist  Quests/1.txt
SET [106] 1
Var Integer Human Hen 0
SaveVar Human Hen ..\QuestDiary\Variables\Integral.txt
sendmsg 7 "Kill 5 Hen's! Come back when you have!"
close

[@1]
#IF
CheckVar Human Hen > 4
#ACT
goto @1.1
#ELSEACT
goto @1.2

[@1.1]
#ACT
delnamelist  Quests/1.txt
addnamelist  Quests/2.txt
goto @1.3
sendmsg 7 "Congratulations, Quest 1 Complete!"
give gold 2000
CHANGEEXP + 1001



[@1.2]
<Hello, my name is John!>\ \
You have currently killed <$HUMAN(Hen)>/5 Hen, come back when\
you have killed 5!.\
<exit/@exit>

[@1.3]
<Hello, my name is John!>\ 
hope you like your prize, talk to me at any other time\
to begin more quests!\
<exit/@exit>


;; Quest 2

[@main2]
<Hello, my name is John!>\ \
For the next part of this quest you will need to kill\
10 deer's for me and then I will grant you a reward!\
<Begin Quest 2/@quest2> -- <Exit/@exit>


[@quest2]
#ACT
delnamelist  Quests/2.txt
addnamelist  Quests/3.txt
SET [107] 1
reset [106] 1
Var Integer Human Deer 0
SaveVar Human Deer ..\QuestDiary\Variables\Integral.txt
sendmsg 7 "Kill 10 Deer's! Come back when you have!"
close

[@2]
#IF
CheckVar Human Deer > 9
#ACT
goto @2.1
#ELSEACT
goto @2.2

[@2.1]
#ACT
delnamelist  Quests/3.txt
addnamelist  Quests/4.txt
CHANGEEXP + 2001
give gold 5000
reset [107] 1
goto @2.3
sendmsg 7 "Congratulations, Quest 2 Complete!"



[@2.2]
<Hello, my name is John!>\
You have currently killed <$HUMAN(Deer)>/ Deer, come back when\
you have killed 10!.\
<exit/@exit>

[@2.3]
<Hello, my name is John!>\
Congratulations, 10 You killed Deer I gave you a small reward\
<exit/@exit>\

[@done]
#Say
Thats all i can offer you sorry....\\\

but it wont let me do quest too it just keeps saying error on the npc
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,201
61
155
uk
edit, nvm..

Instead of using reset [106] 1 use set [106] 1 or set [106] 0 ..... 1 sets it on and 0 sets if off as you probably aware of but using reset [106] 1 dont work, well i never got it to work how i wanted so just use the set [106] 0 or 1.

Example..

[@quest2]
#ACT
delnamelist Quests/2.txt
addnamelist Quests/3.txt
SET [107] 1
SET [106] 0
Var Integer Human Deer 0
SaveVar Human Deer ..\QuestDiary\Variables\Integral.txt
sendmsg 7 "Kill 10 Deer's! Come back when you have!"
close
 
Last edited:
Upvote 0

™blade™

Golden Oldie
Golden Oldie
Oct 31, 2004
799
1
125
tried that but im still gett the msg error on the npc after clickin begin quest it just dont work for there the npc stops work and when you close it and reopen it just says error
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,201
61
155
uk
Well rather than complicate things get 1 variable quest working first, theres lots of guides on here on them. Once you got one working 100% perfectly then add others to it. Then it's easier for yourself to know where and why its going wrong.
 
Upvote 0