hey ehasl, ive fixed the shop script with merchant skill
look, ive fixed it.
//easy shop script made by martijn
void main(void)
{
say_stop("'3Good day, how can I help you?", ¤t_sprite);
}
void hit(void)
{
say("'4Please dont wreck this place, thank you", ¤t_sprite);
}
void talk(void)
{
if (&merchant == 1)
{
goto merchan;
}
freeze(1);
say_stop("Good day", 1);
say_stop("'3Good day", ¤t_sprite);
start:
choice_start();
title_start();
Wanna buy something?
title_end();
"Yes"
"No"
choice_end();
if (&result == 1)
{
buy();
}
if (&result == 2)
{
goto endid;
}
endid:
unfreeze(1);
say("'3bye", ¤t_sprite);
}
void buy( void )
{
mainloop:
choice_start()
set_y 240
set_title_color 6
title_start();
"These longswords are the best in the whole world"
title_end();
"Longsword - $400"
"Leave"
choice_end()
if (&result == 1)
{
buys1();
}
unfreeze(1);
goto start;
}
void buys1( void)
{
int &junk = free_items();
if (&junk < 1)
{
choice_start()
set_y 240
title_start();
You are carrying too much.
title_end();
"Ok"
choice_end()
return;
}
if (&gold < 400)
{
choice_start()
set_y 240
title_start();
You don't have enough gold to buy this sword. Awk!
title_end();
"Ok"
choice_end()
return;
}
&gold -= 400;
add_item("item-sw1",438, 7);
goto start;
}
merchan:
freeze(1);
say_stop("Let's go down to business", 1);
say_stop("'3Damn, a merchant", ¤t_sprite);
start2:
choice_start();
title_start();
What do you want, merchant?
title_end();
"Buy"
"Nothing"
choice_end();
if (&result == 1)
{
buy();
}
if (&result == 2)
{
goto endid2;
}
endid2:
unfreeze(1);
say("'3bye", ¤t_sprite);
}
void buy( void )
{
mainloop2:
choice_start()
set_y 240
set_title_color 6
title_start();
"These longswords are the best in the whole world"
title_end();
"Longsword - $200"
"Looks like s**t"
choice_end()
if (&result == 1)
{
buys2();
}
unfreeze(1);
goto start2;
}
void buys2( void)
{
int &junk = free_items();
if (&junk < 1)
{
choice_start()
set_y 240
title_start();
You are carrying too much.
title_end();
"Ok"
choice_end()
return;
}
if (&gold < 200)
{
choice_start()
set_y 240
title_start();
You don't have enough gold to buy this sword. Awk!
title_end();
"Ok"
choice_end()
return;
}
&gold -= 200;
add_item("item-sw1",438, 7);
goto start2;
}
//easy shop script made by martijn
void main(void)
{
say_stop("'3Good day, how can I help you?", ¤t_sprite);
}
void hit(void)
{
say("'4Please dont wreck this place, thank you", ¤t_sprite);
}
void talk(void)
{
if (&merchant == 1)
{
goto merchan;
}
freeze(1);
say_stop("Good day", 1);
say_stop("'3Good day", ¤t_sprite);
start:
choice_start();
title_start();
Wanna buy something?
title_end();
"Yes"
"No"
choice_end();
if (&result == 1)
{
buy();
}
if (&result == 2)
{
goto endid;
}
endid:
unfreeze(1);
say("'3bye", ¤t_sprite);
}
void buy( void )
{
mainloop:
choice_start()
set_y 240
set_title_color 6
title_start();
"These longswords are the best in the whole world"
title_end();
"Longsword - $400"
"Leave"
choice_end()
if (&result == 1)
{
buys1();
}
unfreeze(1);
goto start;
}
void buys1( void)
{
int &junk = free_items();
if (&junk < 1)
{
choice_start()
set_y 240
title_start();
You are carrying too much.
title_end();
"Ok"
choice_end()
return;
}
if (&gold < 400)
{
choice_start()
set_y 240
title_start();
You don't have enough gold to buy this sword. Awk!
title_end();
"Ok"
choice_end()
return;
}
&gold -= 400;
add_item("item-sw1",438, 7);
goto start;
}
merchan:
freeze(1);
say_stop("Let's go down to business", 1);
say_stop("'3Damn, a merchant", ¤t_sprite);
start2:
choice_start();
title_start();
What do you want, merchant?
title_end();
"Buy"
"Nothing"
choice_end();
if (&result == 1)
{
buy();
}
if (&result == 2)
{
goto endid2;
}
endid2:
unfreeze(1);
say("'3bye", ¤t_sprite);
}
void buy( void )
{
mainloop2:
choice_start()
set_y 240
set_title_color 6
title_start();
"These longswords are the best in the whole world"
title_end();
"Longsword - $200"
"Looks like s**t"
choice_end()
if (&result == 1)
{
buys2();
}
unfreeze(1);
goto start2;
}
void buys2( void)
{
int &junk = free_items();
if (&junk < 1)
{
choice_start()
set_y 240
title_start();
You are carrying too much.
title_end();
"Ok"
choice_end()
return;
}
if (&gold < 200)
{
choice_start()
set_y 240
title_start();
You don't have enough gold to buy this sword. Awk!
title_end();
"Ok"
choice_end()
return;
}
&gold -= 200;
add_item("item-sw1",438, 7);
goto start2;
}