QFunction/Variables Problem

Mu online season 21 - grand opening

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
Basically, im trying to make it so when a Heaven Member kills a Hell member, after 20 kills they will instantly move to hell.

Heaven members get -10 GamePoints deducted on kill
Hell members get +10 GamePoints added on kill
(But these also don't work)

Heres the M2 Errors:

[16/02/2010 22:18:41] [QuestAction] Variable not found:Murder Command:CALCVAR NPC:QFunction Map:0(0:0) Param1:HUMAN Param2:Murder Param3:+ Param4:1 Param5: Param6:
[16/02/2010 22:18:41] [QuestAction] Variable not found:Murder Command:SAVEVAR NPC:QFunction Map:0(0:0) Param1:HUMAN Param2:Murder Param3:..\QuestDiary\Variables\Integral.txt Param4: Param5: Param6:
[16/02/2010 22:18:41] [Npc Condition Error] Cmd:CHECKVAR NPC:QFunction Map:0 (0:0) Param1:HUMAN Param2:Murder Param3:= Param4:10 Param5:


QFunction Script:

[@OnMurder]
#IF
CHECKNAMELIST ..\Npc_def\Hell.txt
#ACT
PKPOINT - 100
GAMEPOINT + 10
SENDMSG 6 " Jigoku=> You Have Commited murder my child! You will be rewarded with 10 GamePoints!"
#ELSEACT
Goto @Heaven
[@Heaven]
#IF
CHECKNAMELIST ..\Npc_def\Heaven.txt
#ACT
CalcVar HUMAN Murder + 1
SaveVar HUMAN Murder ..\QuestDiary\Variables\Integral.txt
GAMEPOINT - 10
SENDMSG 6 "Tengoku=> Your such an evil person! For Murdering, 10 GamePoints have been removed! And 10 Murder Points Have Been Added"
Goto @KillCount
[@KillCount]
#IF
CheckVar HUMAN Murder = 20
#ACT
DELNAMELIST ..\Npc_def\Heaven.txt
ADDNAMELIST ..\Npc_def\Hell.txt
SENDMSG 6 "You have now killed 20 people you evil person! You will now be moved to the Jigoku Side!"

Also M2 is rejecting the Goto @Heaven command for some reason when a heaven member kills a hell.

Heres QManage:

[@Login]
#ACT
Var Integer HUMAN Murder 0


Any help appreciated, cheers
 
Last edited:

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
Bons managed to fix this.
Now i just need to figure out how to get the killcounts working.

What I'm after is;

When a Heaven member kills another player 20 times, they instantly get put onto the Hell side.
But for some reason the kills just aint adding/counting

MirServer > M2Server > Envir > QuestDiary > Variables > Intergal.txt

[Tatsunuko]
Murder=0

Says 0 when ive killed 21+ times.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,745
346
330
Kent, UK
Code:
[@OnMurder]
#IF
CheckVar HUMAN Murder = 20
#ACT
DELNAMELIST ..\Npc_def\Heaven.txt
ADDNAMELIST ..\Npc_def\Hell.txt
SENDMSG 6 "You have now killed 20 people you evil person! You will now be moved to the Jigoku Side!"


#IF
CHECKNAMELIST ..\Npc_def\Hell.txt
#ACT
PKPOINT - 100
GAMEPOINT + 10
SENDMSG 6 " Jigoku=> You Have Commited murder my child! You will be rewarded with 10 GamePoints!"
break

#IF
CHECKNAMELIST ..\Npc_def\Heaven.txt
#ACT
sendmsg 6 "[debug msg]  kill count : <$Human(murder)>"
CalcVar HUMAN Murder + 1
SaveVar HUMAN Murder ..\QuestDiary\Variables\Integral.txt
GAMEPOINT - 10
SENDMSG 6 "Tengoku=> Your such an evil person! For Murdering, 10 GamePoints have been removed! And 10 Murder Points Have Been Added"
break


use that........ are you sure ur names in the heaven list? is it saying

"Tengoku=> Your such an evil person! For Murdering, 10 blah balh"?

need to tell me wot msgs ur getin...
 
Upvote 0

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
Yep names definately add.
And im just waiting on boothy to come back onto MSN and i'll let you know what messages are coming up.
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,202
65
135
uk
Don't you want that to add a variable also ?
Code:
[@OnMurder]
#IF
CHECKNAMELIST ..\Npc_def\Hell.txt
#ACT
PKPOINT - 100
GAMEPOINT + 10
[COLOR="Red"]CalcVar HUMAN Murder + 1
SaveVar HUMAN Murder ..\QuestDiary\Variables\Integral.txt[/COLOR]
SENDMSG 6 " Jigoku=> You Have Commited murder my child! You will be rewarded with 10 GamePoints!"
#ELSEACT
Goto @Heaven
[@Heaven]
#IF
CHECKNAMELIST ..\Npc_def\Heaven.txt
#ACT
CalcVar HUMAN Murder + 1
SaveVar HUMAN Murder ..\QuestDiary\Variables\Integral.txt
GAMEPOINT - 10
SENDMSG 6 "Tengoku=> Your such an evil person! For Murdering, 10 GamePoints have been removed! And 10 Murder Points Have Been Added"
Goto @KillCount
[@KillCount]
#IF
CheckVar HUMAN Murder = 20
#ACT
DELNAMELIST ..\Npc_def\Heaven.txt
ADDNAMELIST ..\Npc_def\Hell.txt
SENDMSG 6 "You have now killed 20 people you evil person! You will now be moved to the Jigoku Side!"
 
Upvote 0

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
Copied bons script, cheers it all works fine now with messages appearing and gamegold adding and deducting :)

Cheers bon
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,202
65
135
uk
you could also add that so people no how many kills they got.

SENDMSG 6 " Jigoku=> You Have Commited murder my child! <$HUMAN(Murder)> /20 Kills, You will be rewarded with 10 GamePoints!"
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,745
346
330
Kent, UK
btw [debug message] is just something i do lol.. its not actually a debug msg so to speak.

but ye if u want it to say how many kills.. just copy the "<$Human(murder)>" bit... that will show the number of the variable murder
 
Upvote 0

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
It shows that anyway really, each time you murder it shows how many kills you've got.

Now I just need to figure out how to add +10 gamepoints on bosskill for heaven members only,
Is there a way to do this or is it only applyable for the whole server?

EDIT:

Ive just thought, Hell members will be able to kill anybody and gain the gamepoints.
(Basically exploitable)
Is there a way to make it so they only receive the points when they kill heaven members?
 
Last edited:
Upvote 0