Kill Count Quest Help

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
Hi Im trying to get a script that will give you a popup msg once you have killed X amount of mobs e.g 10 Hens,

Now i have search'ed and a lot of people have been havein the probs with this for a long time i have allso seen the Guide here... http://www.lomcn.co.uk/forum/showthread.php?t=57958

But i followed this to the letter but is isent working i kill 5 Deer go back to the npc & it tell's me i have killed 0/5, allso after i log out & in i get this from the npc ??

Any why id just like to see if any one has a simple script i could see to get me going.


ty
 

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,202
65
135
uk
Yeh using variables can be a **** at first but when you understand them better it's quite easy, also i wouldn't script it like preachers post says as it's dated but it's up to you on how you do it.
This how i do mine,

Npc
Code:
[@main]
Hello <$USERNAME> welcome to the beginners quest. \
To complete this quest you need to kill 5 HookingCat,\
and 5 RakingCat. \\
<Attempt the quest/@attempt> \
<Not now thanks/@exit>

[@attempt]
#IF
#ACT
addnamelist Quests/catquest.txt
SET [302] 1
Var Integer Human catKilled
Var Integer Human cat1Killed
#SAY
Good luck, come back to me to check \
how many Hooking & RakingCats you have killed. \\
<Exit/@exit>

[@quest1]
#IF
CheckVar Human catKilled > 4
CheckVar Human cat1Killed > 4
#SAY
Well done, you have killed enough Hooking & RakingCats! \
Pick your reward. Go see Jim for more quests \\
<Ok/@2.0> thanks\
<Exit/@exit>
#ELSESAY
Number of HookingCat killed : <$HUMAN(catKilled)>/5 \
Number of RakingCat killed : <$HUMAN(cat1Killed)>/5 \
<Exit/@exit>

[@2.0]
Congratulations here's your reward.\
#ACT
GIVE GOLD 5000
RESET [302] 0
BREAK
QManage
Code:
#IF
#ACT
Var Integer Human catKilled
LoadVar Human catKilled ..\QuestDiary\Variables\Integral.txt
break
#IF
#ACT
Var Integer Human cat1Killed
LoadVar Human cat1Killed ..\QuestDiary\Variables\Integral.txt
break
QFuntion
Code:
[@onkillmob(HookingCat)]
#IF
CHECK [302] 1
#ACT
CalcVar Human catKilled + 1
SaveVar Human catKilled ..\QuestDiary\Variables\Integral.txt
break


[@onkillmob(RakingCat)]
#IF
CHECK [302] 1
#ACT
CalcVar Human cat1Killed + 1
SaveVar Human cat1Killed ..\QuestDiary\Variables\Integral.txt
break
 
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
@Gezza

This is what i get in the m2 when i run yours...




[28/09/2009 20:25:16] [QuestAction] Command:LOADVAR NPC:QManage Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:25:16] [QuestAction] Command:LOADVAR NPC:QManage Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:25:50] saving fail.... => .\Envir\Npc_def\Quests/catquest.txt
[28/09/2009 20:25:50] [QuestAction] ±äÁ¿catKilledÒÑ´æÔÚ£¬±äÁ¿ÀàÐÍ:Human Command:VAR NPC:ChiMaster Map:hell00(55:228) Param1:Integer Param2:Human Param3:catKilled Param4: Param5: Param6:
[28/09/2009 20:25:50] [QuestAction] ±äÁ¿cat1KilledÒÑ´æÔÚ£¬±äÁ¿ÀàÐÍ:Human Command:VAR NPC:ChiMaster Map:hell00(55:228) Param1:Integer Param2:Human Param3:cat1Killed Param4: Param5: Param6:
[28/09/2009 20:25:58] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:25:59] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:00] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:01] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:02] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:03] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:cat1Killed Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:04] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:05] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:09] saving fail.... => .\Envir\Npc_def\Quests/catquest.txt
[28/09/2009 20:26:09] [QuestAction] ±äÁ¿catKilledÒÑ´æÔÚ£¬±äÁ¿ÀàÐÍ:Human Command:VAR NPC:ChiMaster Map:hell00(55:228) Param1:Integer Param2:Human Param3:catKilled Param4: Param5: Param6:
[28/09/2009 20:26:09] [QuestAction] ±äÁ¿cat1KilledÒÑ´æÔÚ£¬±äÁ¿ÀàÐÍ:Human Command:VAR NPC:ChiMaster Map:hell00(55:228) Param1:Integer Param2:Human Param3:cat1Killed Param4: Param5: Param6:
[28/09/2009 20:26:26] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:26] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:28] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:29] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:30] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:31] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:32] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:33] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:34] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:36] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:38] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:39] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:40] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:41] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:42] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[28/09/2009 20:26:43] [QuestAction] Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:Human Param2:catKilled Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,202
65
135
uk
in Quest diary you got the Variables folder and Integral.txt yeh? also need folder called Quests in either the npc_def or market, in a min i'll post you another more simple one. I'll test it first too check it works. although that quest works fine on my mess around server.

try this iceman posted it not long ago.

Npc txt
Code:
[@main]
#IF
checknamelist Quests/CompleteomaQuest.txt
#SAY
You have already completed this quest
#ELSEACT
goto @main3

[@main3]
#IF
checknamelist Quests/omaquest.txt
#ACT
goto @quest1
#ELSESAY
Hello <$USERNAME> welcome to the beginners quest. \
To complete this quest you need to kill 20 Omas. \\
<Attempt the quest/@attempt> \
<Not now thanks/@exit>

[@attempt]
#IF
#ACT
addnamelist Quests/omaquest.txt
SET [303] 1
Var Integer Human omaKilled
#SAY
Good luck, come back to me to check \
how many Oma you have killed. \\
<Exit/@exit>

[@quest1]
#IF
CheckVar Human omaKilled > 19
#ACT
addnamelist Quests/CompleteomaQuest.txt
#SAY
Well done, you have killed enough Oma! \
Take this reward. \\
\
<Here/@male>
\
<Exit/@exit> \
#ELSESAY
Number of Omas killed : <$HUMAN(omaKilled)> \\
<Exit/@exit>

[@male]
#if
GENDER MAN
#act
Give LightArmourQ(M) 1
RESET [303] 0
#elseact
Give LightArmourQ(F) 1
RESET [303] 0

QFuntion
Code:
[@onkillmob(Oma)]
#IF
CHECK [303] 1
#ACT
CalcVar Human omaKilled + 1
SaveVar Human omaKilled ..\QuestDiary\Variables\Integral.txt
break

Code:
#IF
#ACT
Var Integer Human omaKilled
LoadVar Human omaKilled ..\QuestDiary\Variables\Integral.txt

Add this to QuestDiary A folder named Variables
in the variables folder put a new text file called Integral
 
Last edited:
  • Like
Reactions: -Luke-
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
in Quest diary you got the Variables folder and Integral.txt yeh? also need folder called Quests in either the npc_def or market, in a min i'll post you another more simple one. I'll test it first too check it works. although that quest works fine on my mess around server.

try this iceman posted it not long ago.


Add this to QuestDiary A folder named Variables
in the variables folder put a new text file called Integral

I Added the Foulder for Variables & the . txt ther other days dose anything go in the .txt ?


I dont have a quest foulder npc_def or market thow.

I have a foulder called quests in QuestDiray
 
Last edited:
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
Useing thepreacher's scripts i get this in m2, Im doing thin on Infco's 2.6 files.



[29/09/2009 23:01:53] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:01:53] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
[29/09/2009 23:01:55] [QuestAction] Command:SAVEVAR NPC:ChiMaster Map:hell00(55:228) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:01:57] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:01:57] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
[29/09/2009 23:02:04] [QuestAction] Command:SAVEVAR NPC:DeerQuest Map:0(0:0) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:02:06] [QuestAction] Command:SAVEVAR NPC:DeerQuest Map:0(0:0) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:02:06] [QuestAction] Command:SAVEVAR NPC:DeerQuest Map:0(0:0) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:02:08] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:02:08] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
[29/09/2009 23:02:14] [QuestAction] Command:SAVEVAR NPC:DeerQuest Map:0(0:0) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:02:21] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:02:21] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
[29/09/2009 23:02:23] [QuestAction] Command:SAVEVAR NPC:DeerQuest Map:0(0:0) Param1:Human Param2:KillCount Param3:Integral.txt Param4: Param5: Param6:
[29/09/2009 23:02:26] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:02:26] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
[29/09/2009 23:02:29] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt
[29/09/2009 23:02:29] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete.txt
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,741
342
330
Kent, UK
[29/09/2009 23:02:26] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt

means the file isnt there...... so go make it, it will auto add it after a while ne way tho


all the errors are cause u havnt setup the quest properly
 
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
[29/09/2009 23:02:26] ÎļþδÕÒµ½ => .\Envir\Npc_def\DeerComplete1.txt

means the file isnt there...... so go make it, it will auto add it after a while ne way tho


all the errors are cause u havnt setup the quest properly


I added the DeerComplete1.txt but still get all the erroe's iv set it up how iv been told just carnt get it >.<
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,202
65
135
uk
Using any of the above i posted just add a folder called Quests in where the npc your using are, so if adding a quest to a merchant put Quests folder in market_def or if not put in npc_def or put in both. As bon said it adds the txt but your get that error first time around untill it saves it self there, always best to add them before hand. Try reading the npc script and understand it all abit better, it takes time sometimes but that way your learn rather than just copying etc.
 
Last edited:
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
180
Chorley
I followed this....


http://www.lomcn.co.uk/forum/showthread.php?t=57958



i added this to the npc in npc_def

[@main]
#IF
CHECKNAMELIST DeerComplete1.txt
#SAY
Thanks you for you help <$USERNAME>. \ \
<Exit/@exit>
#ACT
BREAK
#IF
CHECKNAMELIST DeerComplete.txt
#SAY
Thanks you for you help <$USERNAME>. Please take this reward. \ \
<Exit/@exit>
#ACT
GIVE Prize 1
ADDNAMELIST DeerComplete1.txt
BREAK
#IF
CHECKNAMELIST DeerStart.txt
#SAY
You have killed <$Human(KillCount)>/5 Deer. Please come back \
when you have killed all five. \ \
<Exit/@exit>
#ACT
BREAK
#ELSESAY
Hi would you like to take the quest? \ \
<Yes/@accept> || <No/@exit>

[@accept]
#ACT
Var Integer Human KillCount 0
SaveVar Human KillCount Integral.txt
ADDNAMELIST DeerStart.txt
SET [101] 1
#SAY
Sweet. Come back when you've killed 5 deer. \ \
<Exit/@exit>
 
Upvote 0