The Dink Network

Reply to Re: script riddle

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 22nd 2005, 01:27 PM
wizardg.gif
Paul
Peasant He/Him United States
 
That's the riddle script from Lyna's Story. Rather cleaver if I do say so myself. It does have a bug in it though... Not major, but since it seems to be a popular script to reuse I guess I should point it out.

If you enter more than six(? I forget) or so letters the number "wraps" to negative. Most of the script still works fine after that but not the delete command (LEFT ARROW). If you want to fix this, replace the "next" and "prev" sections with the code below:

next:
sp_strength(&rtext, &rv);
sp_defense(&rtext, &trv);
&trv *= 26;
&trv += &rv;
&rv = 1;
&rx += 15;
sp_x(&rcur, &rx);
<ext = &rtext;
&rtext = say_xy("A", &rx, 225);
sp_kill(&rtext, 0);
sp_gold(&rtext, <ext);
goto mainloop;

prev:
if (<ext == 0)
{
Playsound(19, 22050, 0, 0, 0);
goto mainloop;
}
&rx -= 15;
sp_x(&rcur, &rx);
sp_active(&rtext, 0);
&rtext = <ext;
<ext = sp_gold(&rtext, -1);
&rv = sp_strength(&rtext, -1);
&trv = sp_defense(&rtext, -1);
goto mainloop;