First Quest NPC

firstheroo

Dedicated Member
Dedicated Member
Sep 16, 2007
72
1
54
So i have made my first quest NPC, the basic idea is that its a gather quest, but i dont want it to be repeatable. I will explain how the script runs before i explain the problem, the quest is called smuggler

First it runs a name check on file smuggler1quest.txt
if the name flags it says "thanks for your help" (they have completed it)

no flag it moves on to check smuggler1quest1.txt
this list is populated with peoples names who have started the quest

If the name flags up in smuggler1quest1.txt it then asks for the required items etc and dishes out a reward if they have them.



The frustrating thing is im falling down at the last hurdle lol!

If i manually add my name to Smuggler1Quest1.txt i am able to hand in the items it takes them and gives me a reward if i dont have them it exits. So all is good!!

The problem is without adding my name to the list i dont see the quest text i have written to start the quest.

So if it goes

[@Main]

#IF
CHECKNAMELIST Smugler1Quest.txt

#IF
CHECKNAMELIST Smugler1Quest1.txt

<Exit/@exit>
[@exit]
Close

Upto here all works perfect but its the next bit doesnt trigger if no names are in either list. maybe ELSESAY is incorrect?

#ELSESAY
{FCOLOR/10}I'm busy what do you want!{FCOLOR/12}\

<I have been sent to help./@cont>\

<Sorry to disturb you./@exit>\
 
Last edited:

mapadale

Guest
So i have made my first quest NPC, the basic idea is that its a gather quest, but i dont want it to be repeatable. I will explain how the script runs before i explain the problem, the quest is called smuggler

First it runs a name check on file smuggler.txt
if the name flags it says "thanks for your help" (they have completed it)

no flag it moves on to check smuggler1.txt
this list is populated with peoples names who have started the quest

If the name flags up in smuggler1.txt it then asks for the required items etc and dishes out a reward if they have them.



The frustrating thing is im falling down at the last hurdle lol!

If i manually add my name to smuggler1.txt i am able to hand in the items it takes them and gives me a reward if i dont have them it exits. So all is good!!

The problem is without adding my name to the list i dont see the quest text i have written to start the quest.

So if it goes

#IF
CHECKNAMELIST Smugler.txt
........

#IF
CHECKNAMELIST Smugler1.txt
........
#ACT
GIVE ProtectionRing
ADDNAMELIST Smugler1Quest.txt
BREAK

#ACT
<Exit/@exit>
[@exit]
Close

What should i put next to trigger the text if the name does not flag in either list, atm i have

#ELSEACT
#SAY
{FCOLOR/10}I'm busy what do you want!{FCOLOR/12}\

<I have been sent to
First you can't check name list without first add to name list, other wise you will pull out a blank .txt file. As you need to check if only name is added, then if not to add name in.

#IF
!CheckNameList newplayers.txt ;if the name isnt in the newplayers list
#ACT
AddNameList newplayers.txt ;then we add the name to the list
SaveValue "QuestDiary\newplayermessage.txt" Main %USERNAME noob ;notice we use a new text file to save this data. name searching must be in a seperate
text file from the data entry. Notice the format of saving. Main tell's the category
Username tell's us the player name, noob is the message.
goto @@changemessage
#ELSEACT
LoadValue A1 "QuestDiary\newplayermessage.txt" Main %USERNAME
#SAY
Welcome back <$OUTPUT(A1)>\
<Change Message/@@changemessage>\
<Close/@Exit>\

[@@changemessage]
#ACT
Mov A2 %INPUTSTR
SaveValue A2 "QuestDiary\newplayermessage.txt" Main %USERNAME
#SAY
Next time you login, your welcome message will say\\
Welcome back <$OUTPUT(A1)>\\
<Close/@Exit>\

Try to remember that for a script to work in the intentional way you want it to, it has to have all the fetch and carry commands in order for it to work.
 
Upvote 0

firstheroo

Dedicated Member
Dedicated Member
Sep 16, 2007
72
1
54
The adding names to the text files and the names flagging up works perfect.

The problem is that if its a new person starting the quest clicks the npc obviously there name is in neither the started or completed quest files so i want it to go to the quest start, but it doesnt.

I have found a work around
 
Last edited:
Upvote 0