The Dink Network

Reply to Re: NPC Code problems

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:
 
 
July 20th 2006, 12:47 PM
anon.gif
Ace
Ghost They/Them
 
Nevermind on the Sell part and BUy part of the shop, but the spell part, I am, still having problems with...

spells:
int &firespell = count_item("item-sfb");
int &lightspell = count_item("item-ice");
int &hellspell = count_item("item-fb");
choice_start()
title_start();
"Magic Spells"
title_end();
(&bow_lore = 0) "LVL 5 : Bow Lore - $5000"
(&firespell = 0) "LVL 5 : Fire Spell - $10000"
(&lightspell = 0) "LVL 10 : Light Spell - $100000"
(&hellspell = 0) "LVL 20 : Hell Fire Spell - $1000000"
"Cancel"
choice_end()
if (&result == 1)
{
if (&gold <= 4999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 5000;
&bow_lore = 1;
}
if (&result == 2)
{
if (&gold <= 9999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 10000;
add_magic("item-sfb",437, 1);
}
if (&result == 3)
{
if (&gold <= 99999) goto nogold;
if (&level < 10) goto lowlevel2;
&gold -= 100000;
add_magic("item-ice",437, 5);
}
if (&result == 4)
{
if (&gold <= 999999) goto nogold;
if (&level < 20) goto lowlevel2;
&gold -= 1000000;
add_magic("item-fb",437, 2);
}
goto restart;

if (&result == 5)
goto restart;