Quest help?

noisound

Golden Oldie
Golden Oldie
Jul 23, 2004
1,335
10
175
hey as u probs know im workin on a 2.3 server and i know how to code quests but for example at the end of the quest i want to give say quest points how would i be able to make this possible?

EDIT: also how do i add a killcount quest that gives a pop up once completed?

/noisound
 
Last edited:

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
85
The way i'd do it would be with Variables.

At the end of your quest NPC code just have somthing like this:
Code:
[@complete]
#ACT
[COLOR="Red"]CalcVar Human QuestPoint + 1
SaveVar Human QuestPoint Integral.txt[/COLOR]
ADDNAMELIST Complete.txt
GIVE Prize 1
#SAY
Congratulations you have completed the quest. \ \
<Exit/@exit>

Then you will need to go to Envir->MapQuest->QManage and add:
Code:
[@login]
#IF
#ACT
Var Integer Human QuestPoint 0
LoadVar Human QuestPoint Integral.txt


Then if you ever want to read the number of point use the below lines:
Code:
#IF
CheckVar Human QuestPoint = 1
CheckVar Human QuestPoint > 1
CheckVar Human QuestPoint < 1

You will also need to go to Envir->QuestDiary->Variables and make sure there is a text (.txt) document in there called Integral.txt.

You can obviously change the "+ 1, < 1, etc" to whatever you like, thats just to get you started and give you some ideas.


=========================================

As for kill count quest i would again use Variables (assuming this is a mob kill count quest and not a human kill count quest).


Quest Starter NPC:
Code:
[@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
#ELSESAY
Hi would you like to take the quest? \ \
<Yes/@accept> || <No/@exit>

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

Then add the map quest in: Envir->MapQuest.txt
Code:
0	[101]	1	Deer	*	DeerQuest

Then create a new txt document: Envir->MapQuest->DeerQuest.txt
Code:
[@main]
#IF
CheckVar Human KillCount = 5
#ACT
BREAK
#IF
CheckVar Human KillCount = 4
#ACT
GOTO @finish
BREAK
#IF
CheckVar Human KillCount < 4
#ACT
CalcVar Human KillCount + 1
SaveVar Human KillCount Integral.txt
BREAK
#ELSEACT
BREAK

[@finish]
#ACT
CalcVar Human KillCount + 1
SaveVar Human KillCount Integral.txt
ADDNAMELIST DeerComplete.txt
#SAY
You have killed enough Deer to finish the quest. Return to the NPC for you \
prize. \ \
<Exit/@exit>

Then you need to add the below lines to: Envir->MapQuests->QManage
Code:
[@login]
#IF
#ACT
Var Integer Human KillCount 0
LoadVar Human KillCountIntegral.txt

Again you will need to go to Envir->QuestDiary->Variables and make sure there is a text (.txt) document in there called Integral.txt.

That should work, took me 2 mins to put that together though so might be a few errors. Plus i have been using a different files set for a while so some of the commands might be a little out. But it's enough to get on with :P

p
 
Last edited:
  • Like
Reactions: TravisW
Upvote 0