k so read through the variable guide, and understood it all mostly
everything works fine, like checks how many u killed, and when u killed them it gives prize etc. if i complete the quest then log in and out npc is all fine etc
however..... if im half way through the quest, and i log in and out, then refer back to the NPC, it says 'variable not found'
and m2 server says this
[03/03/2008 11:43:21] [Npc Condition Error] Cmd:CHECKVAR NPC:PetTamer Map:0 (321:274) Param1:Human Param2:SCKilled Param3:> Param4:19 Param5:
this is the npc script im usin...
so the
#IF
CheckVar Human SCKilled > 19
isnt workin properly... right?
yet if i check the variables it says...
[PureOldSkool]
SCKilled=29
have i gotta put soemthing for the Param5:? i tried this
#IF
CheckVar Human SCKilled > 19 ..\QuestDiary\Variables\Integral.txt
but still wasnt workin
also qmanage has this
and qfunction has this
any ideas/help please and tys!!!
i thought if icant find a solution... maybe add a custom comand like @resetquest to qfunc that does something liek this
[@restartquest]
#ACT
Var Integer Human SCKilled
SaveVar Human SCKilled ..\QuestDiary\Variables\Integral.txt
that basically resets it back to 0 so u start over again right? :x
everything works fine, like checks how many u killed, and when u killed them it gives prize etc. if i complete the quest then log in and out npc is all fine etc
however..... if im half way through the quest, and i log in and out, then refer back to the NPC, it says 'variable not found'
and m2 server says this
[03/03/2008 11:43:21] [Npc Condition Error] Cmd:CHECKVAR NPC:PetTamer Map:0 (321:274) Param1:Human Param2:SCKilled Param3:> Param4:19 Param5:
this is the npc script im usin...
[@main]
#IF
checknamelist CompleteSCQuest.txt
#SAY
You have already completed this quest
#ELSEACT
goto @main1
[@main1]
#IF
checknamelist SCquest.txt
#ACT
goto @quest1
#ELSESAY
Hello <$USERNAME> welcome to the beginners quest. \
To complete this quest you need to kill 20 scarecrows. \\
<Attempt the quest/@attempt> \
<Not now thanks/@exit>
[@attempt]
#IF
#ACT
addnamelist SCquest.txt
SET [300] 1
Var Integer Human SCKilled
#SAY
Good luck, come back to me to check \
how many scarecrows you have killed. \\
<Exit/@exit>
[@quest1]
#IF
CheckVar Human SCKilled > 19
#ACT
give ShortSword 1
addnamelist CompleteSCQuest.txt
#SAY
Well done, you have killed enough scarecrows! \
Take this reward. \\
<Exit/@exit> \
#ELSESAY
Number of scarecrows killed : <$HUMAN(SCKilled)> \\
<Exit/@exit>
so the
#IF
CheckVar Human SCKilled > 19
isnt workin properly... right?
yet if i check the variables it says...
[PureOldSkool]
SCKilled=29
have i gotta put soemthing for the Param5:? i tried this
#IF
CheckVar Human SCKilled > 19 ..\QuestDiary\Variables\Integral.txt
but still wasnt workin
also qmanage has this
[@Login]
#ACT
Var Integer Human SCKilled
LoadVar Human SCKilled ..\QuestDiary\Variables\Integral.txt
and qfunction has this
[@onKillMob(Scarecrow)]
#ACT
CalcVar Human SCKilled + 1
SaveVar Human SCKilled ..\QuestDiary\Variables\Integral.txt
any ideas/help please and tys!!!
i thought if icant find a solution... maybe add a custom comand like @resetquest to qfunc that does something liek this
[@restartquest]
#ACT
Var Integer Human SCKilled
SaveVar Human SCKilled ..\QuestDiary\Variables\Integral.txt
that basically resets it back to 0 so u start over again right? :x
Last edited:
