The Dink Network

help making quest scripts!

May 22nd 2003, 02:19 PM
anon.gif
See i havent used the board in like amonth and i have been wqorking on a D-mod for a long time all i need now is how to make the sotry scripts like lets say i talked to some guy and he asked me to get something for him. and then i grabbed that item!
How do make it after i grab the item to have him say something after? like change what he says me and Kory would like to know that please help us well me thanks alot!
May 22nd 2003, 04:00 PM
old.gif
Here is an example:

global_int = &story;
&story = 1;

ITEM:

void main(void)
{
if (&story == 1) sp_kill(&current_sprite, 1);
}

void talk(void)
{
say("Hey a broom", 1);
&story = 3;
sp_kill(&current_sprite, 1);
}

MAN:

void talk(void)
{

if (&story == 3) goto after;
if (&story == 4) goto done;

BEFORE:
say_stop("Can you find my broom?", &current_sprite);
&story = 2;
goto end;

AFTER:
say_stop("Hey, its my broom!", &current_sprite);
&story = 4;
goto end;

DONE:
say_stop("You already found it", &current_sprite);

END:
}
May 22nd 2003, 04:01 PM
old.gif
STRANGE:

The board automaticly changes current_sprite into ampcurrent_sprite
May 23rd 2003, 08:06 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
First of all, it should be:

make_global_int("&story", 0);

in main.c

Then, you should use

kill_cur_item();

instead of sp_kill(&current_sprite, 1);

And, you could also do it like this:

void talk(void)
{
if (&story == 1)
{
//conversation
&story = 2;
}
if (&story == 0)
{
//conversation
&story = 1;
}
}
May 23rd 2003, 09:04 AM
old.gif
[b] First of all, it should be:

make_global_int("&story", 0);

in main.c[/b]

DUH I said that, you should use the global &story, because global &story already exists.... you dont need to recreate that.

And the item script I made was for the item on the floor smartass not in your inventory. And when you pick it up it disappears and its not in your inventory but you still have it ( &story is 3 )
May 23rd 2003, 12:28 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Ok, but you still can't do this :

global_int = &story;
May 23rd 2003, 03:48 PM
old.gif
I know, but I didnt say it was a command because it isnt in a procedure
May 23rd 2003, 04:00 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
I think he meant it this.

//&story = global varible;

just for show so you know what the varible is and how it is defined.