Jump to content

Quests?


Crusador

Recommended Posts

Hello,

 

I'm very noob in scenario making, so I have a very silly question. I'm not used to scripting, so I'm having some troubles in my scenario. So far, I've done a little boring conversation and a shop. Thanks to basicnpc, warriorgrove and all that noob stuff, by the way.

 

Now I'm trying to make a quest. It's very simple: a wizard ask you to kill a ghast. When you're done, he gives you a few coins and... that's it.

 

That's what I've done in order to make that simple quest:

 

I've placed a ghast in a room and gave to it the basicnpc script. In its second memory cell I've put "2" and in its third cell I've put "3". So, when the ghast dies, he set the SDF(2,3) to 1. I guess, at least.

 

Then, I wrote a dialogue for the wizard. It's something like that:

 

Quote:
begintalknode 13;

state = 9;

nextstate = 8;

question = "Can I help you?";

text1 = "_Yes, kill the ghast._";

code =

toggle_quest(1,1);

break;

 

begintalknode 14;

state = 8;

nextstate = 8;

condition = get_flag(2,3) == 1;

question = "I've done it!";

text1 = "_Thanks._";

code =

toggle_quest(1,0);

change_coins(30);

play_sound(68);

set_flag(2,3,0);

break;

action = END_TALK;

 

I will improve that dialogue, for sure. But now I want to make the quest work.

The problem is that the wizard keeps saying "kill the ghast", even when it's already dead. That's the only problem I've found in the quest, but it's driving me crazy!

Can someone help me?

Link to comment
Share on other sites

The reason that this is happening is simple: The game sees no reason not to show that node any time dialogue reaches state 9.

 

Probably the best way to solve this is to allocate another SDF to keep track of whether the party has been given the quest or not. Then, alter node 13 so that: 1) It has a condition that it should only be shown when the new flag is zero, and 2) At the same time as the toggle_quest call to start the quest it also sets the flag so that you have a record of the quest being started.

Link to comment
Share on other sites

Originally Posted By: Niemand
The reason that this is happening is simple: The game sees no reason not to show that node any time dialogue reaches state 9.

Probably the best way to solve this is to allocate another SDF to keep track of whether the party has been given the quest or not. Then, alter node 13 so that: 1) It has a condition that it should only be shown when the new flag is zero, and 2) At the same time as the toggle_quest call to start the quest it also sets the flag so that you have a record of the quest being started.

Aaah, thank you very much!
It's working now!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...