The Dink Network

Reply to Re: Sell?

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:
 
 
August 27th 2006, 04:29 PM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
void main( void )
{
int &bsword;
int &bcup;
int &bskull;
int &baxe;
int &bbow;
int &bboots;
}

void hit( void )
{
wait(200);
say_stop_npc("`1Got problems?", ¤t_sprite);
wait(800);
}

void sell(void )
{

sell:

//how many items do they have?

&bsword = count_item("item-sw1");
&bcup = count_item("item-cup");
&bskull = count_item("item-bone");
&baxe; = count_item("item-axe");
&bbow = count_item("item-b1");
&bboots = count_item("item-bt");

choice_start()
set_y 240
set_title_color 1
title_start();
"Anything you want to sell?"
title_end();
(&bsword > 0) "Sell a Longsword - 300g"
(&bcup > 0) "Sell a cup - 5g"
(&bskull > 0) "Sell a skull - 5g"
(&baxe > 0) "Sell an axe - 150g"
(&bbow > 0) "Sell a bow - 150g"
(&bboots > 0) "Sell a pair of boots - 250g"

"Sell nothing"
choice_end()

if (&result == 1)
{
kill_this_item("item-sw1");
&gold += 300;
goto sell;
}

if (&result == 2)
{
kill_this_item("item-cup");
&gold += 5;
goto sell;
}

if (&result == 3)
{
kill_this_item("item-bone");
&gold += 5;
goto sell;
}

if (&result == 4)
{
kill_this_item("item-axe");
&gold += 150;
goto sell;
}

if (&result == 5)
{
kill_this_item("item-b1");
&gold += 150;
goto sell;
}

if (&result == 6)
{
kill_this_item("item-bt");
&gold += 250;
goto sell;
}

unfreeze(1);
goto mainloop;
return;
}

void talk( void )
{
freeze(1);
choice_start()
set_y 240
set_title_color 1
title_start();
"Hello there. I'm a collector. You can sell stuff to me."
title_end();
"Sell"
"Leave"
choice_end()

if (&result == 1)
{
goto sell;
}

unfreeze(1);
goto mainloop;
return;
}