Quote:
EVENT_SAY {
if ($1- =~ "Hail") {
say(Hmm...Hello there. I'm sorry but I can't talk right now, I'm sort of in a [dilemma].);
}
if ($1- =~ "dilemma") {
say(Sorry friend, but this is really Guard business only. If you can provide me with proof of past services to the Guard, then maybe I'd be able to discuss the matter with you.);
}
if ($1- =~ "willing") {
say(Anval gave me this piece of torn silk that he fished up from the waters. It's made of some expensive imported silk, the only people who could afford such luxory is a noble. I should [take it back] for further inspection but I can't leave my post.);
}
if ($1- =~ "take it back") {
flagcheck(flag,1);{
say(I don't have much choice. Please take this back to Lieutenant Emorn, he'll know what to do.);
summonitem(20016,0);
flagnpc(flag,0);
}
}
}
EVENT_ITEM {
if ($itemcount(2001 > 0) {
say(Oh, I see you've helped us in the past. Perhaps we could use your help again, if you're [willing].);
summonitem(20018,0);
flagnpc(flag,1);
}
}
EVENT_ATTACK {
say(That was a mistake.);
}
|
The player is showing proof of completion for a previous quest through an item. This sets "flag" to 1.
Then the person says the trigger phrase to recieve a quest item. If "flag" is 1 then the NPC gives them the item. If "flag" is 0 then the NPC shouldn't do anything. After the PC says the trigger phrase the NPC sets "flag" back to 0, so they can't resay the phrase at a later point to get the quest item again (forcing them to do the hand in for the flag).
Did I code it correctly in .qst?
-Z