Reply to Re: Friends Beyond trilogy
If you don't have an account, just leave the password field blank.
April 6th 2020, 08:32 PM
CrisiusXIII
Like i said before 'its not finished'
I found a very fine example for this.
btw, i hardly programed any C nor C++ etc
if you are in the weapom store where the 'blue guy' has nothing to sell and the 'greybrwon' guy want to BUY your stuff.
So if
srune == 1
means if the amont of rune sword equal 1 then
add some money AND DO NOT reduce the AMOUNT OFF RUNE SWORDS...
tatda! i sold my sword 50 times !! i have my 'stolen' money BACK ...arf.
sell.c contains serevall bugs by MISSING codeing:
;----------------------
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
}
;----------------------
the item is removed from the BACKPACK but the counter is stil ONE, if i add srune = 0
it should work, aint it ??:
;----------------------
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
&srune = 0 ;
}
;----------------------
and if the counter DOES have 0, then there is 'loop'
which means WALK in dutch.
DINK AINT WALKING anymore after trying to sell a 0 count sword.
then its moved to 'loop'
should that be a RETURN ??? or a jump to UNFREEZE ??
i should point to the repository by just a copy/paste of the file is easier
;---------------------------------------------------------------
void main( void )
{
int &sshort = count_item("item-ssw");
int &slong = count_item("item-lsw");
int &srune = count_item("item-rsw");
}
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
if (&z5-ax == 3)
{
say_stop("Do you have some pliers that I could have.", 1);
wait(250);
say_stop("`3Yeah, I have more pliers than I know what to do with.", ¤t_sprite);
wait(250);
say_stop("`3Here you go. Since you saved my life, you can have 'em for free.", ¤t_sprite);
wait(250);
say_stop("Thanks a lot.", 1);
&z5-ax = 5;
}
say_stop("`3Would you like to sell some weapons?", ¤t_sprite);
wait(250);
choice_start();
set_y 120;
title_start();
What do you want to sell?
title_end();
"Short Sword - 175"
"Long Sword - 800"
"Rune Sword - 900"
"Nothing"
choice_end();
if (&result == 1)
{
if (&sshort == 1)
{
&gold += 175;
kill_this_item("item-ssw");
}
if (&sshort == 0)
{
say_stop("`3Ok, hey wait, you don't have a short sword.", ¤t_sprite);
goto loop;
}
}
if (&result == 2)
{
if (&slong == 0)
{
say_stop("`3I can give you 800 gold for that.", ¤t_sprite);
wait(250);
say_stop("`3What's that, you don't have a long sword? Well then I will give you 0 gold.", ¤t_sprite);
goto loop;
}
if (&slong == 1)
{
&gold += 800;
kill_this_item("item-lsw");
}
}
if (&result == 3)
{
if (&srune == 0)
{
say_stop("`3I'm gonna have to see the sword before I give you the money.", ¤t_sprite);
wait(250);
say_stop("Can't you just give me the money and I will bring the sword in later.", 1);
wait(250);
say_stop("`3I'm not even going to dignify that with an answer.", ¤t_sprite);
goto loop;
}
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
}
}
if (&result == 4)
{
say_stop("`3Have a nice day.", ¤t_sprite);
}
unfreeze(¤t_sprite);
unfreeze(1);
}
I found a very fine example for this.
btw, i hardly programed any C nor C++ etc
if you are in the weapom store where the 'blue guy' has nothing to sell and the 'greybrwon' guy want to BUY your stuff.
So if
srune == 1
means if the amont of rune sword equal 1 then
add some money AND DO NOT reduce the AMOUNT OFF RUNE SWORDS...
tatda! i sold my sword 50 times !! i have my 'stolen' money BACK ...arf.
sell.c contains serevall bugs by MISSING codeing:
;----------------------
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
}
;----------------------
the item is removed from the BACKPACK but the counter is stil ONE, if i add srune = 0
it should work, aint it ??:
;----------------------
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
&srune = 0 ;
}
;----------------------
and if the counter DOES have 0, then there is 'loop'
which means WALK in dutch.
DINK AINT WALKING anymore after trying to sell a 0 count sword.
then its moved to 'loop'
should that be a RETURN ??? or a jump to UNFREEZE ??
i should point to the repository by just a copy/paste of the file is easier
;---------------------------------------------------------------
void main( void )
{
int &sshort = count_item("item-ssw");
int &slong = count_item("item-lsw");
int &srune = count_item("item-rsw");
}
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
if (&z5-ax == 3)
{
say_stop("Do you have some pliers that I could have.", 1);
wait(250);
say_stop("`3Yeah, I have more pliers than I know what to do with.", ¤t_sprite);
wait(250);
say_stop("`3Here you go. Since you saved my life, you can have 'em for free.", ¤t_sprite);
wait(250);
say_stop("Thanks a lot.", 1);
&z5-ax = 5;
}
say_stop("`3Would you like to sell some weapons?", ¤t_sprite);
wait(250);
choice_start();
set_y 120;
title_start();
What do you want to sell?
title_end();
"Short Sword - 175"
"Long Sword - 800"
"Rune Sword - 900"
"Nothing"
choice_end();
if (&result == 1)
{
if (&sshort == 1)
{
&gold += 175;
kill_this_item("item-ssw");
}
if (&sshort == 0)
{
say_stop("`3Ok, hey wait, you don't have a short sword.", ¤t_sprite);
goto loop;
}
}
if (&result == 2)
{
if (&slong == 0)
{
say_stop("`3I can give you 800 gold for that.", ¤t_sprite);
wait(250);
say_stop("`3What's that, you don't have a long sword? Well then I will give you 0 gold.", ¤t_sprite);
goto loop;
}
if (&slong == 1)
{
&gold += 800;
kill_this_item("item-lsw");
}
}
if (&result == 3)
{
if (&srune == 0)
{
say_stop("`3I'm gonna have to see the sword before I give you the money.", ¤t_sprite);
wait(250);
say_stop("Can't you just give me the money and I will bring the sword in later.", 1);
wait(250);
say_stop("`3I'm not even going to dignify that with an answer.", ¤t_sprite);
goto loop;
}
if (&srune == 1)
{
&gold += 900;
kill_this_item("item-rsw");
}
}
if (&result == 4)
{
say_stop("`3Have a nice day.", ¤t_sprite);
}
unfreeze(¤t_sprite);
unfreeze(1);
}