Reply to Re: NPC Code problems
If you don't have an account, just leave the password field blank.
July 20th 2006, 01:01 PM

Ace
No, I had fireball and hell fire ball mixed, plus the structure was incorrect. I fixed it, however I am having a problem with bow lore...
When I buy bow lore, it buys, but does not add it properly, and remains in the spells list at the shop.
I have tried these 2 types, and they still do not work:
spells:
int &firespell = count_magic("item-fb");
int &lightspell = count_magic("item-ice");
int &hellspell = count_magic("item-sfb");
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 - $200000"
"Cancel"
choice_end()
if (&result == 1)
{
if (&gold <= 4999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 5000;
&bow_lore += 1;
}
and this:
spells:
int &firespell = count_magic("item-fb");
int &lightspell = count_magic("item-ice");
int &hellspell = count_magic("item-sfb");
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 - $200000"
"Cancel"
choice_end()
if (&result == 1)
{
if (&gold <= 4999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 5000;
&bow_lore = 1;
}
Maybe someone can figure this out...
When I buy bow lore, it buys, but does not add it properly, and remains in the spells list at the shop.
I have tried these 2 types, and they still do not work:
spells:
int &firespell = count_magic("item-fb");
int &lightspell = count_magic("item-ice");
int &hellspell = count_magic("item-sfb");
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 - $200000"
"Cancel"
choice_end()
if (&result == 1)
{
if (&gold <= 4999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 5000;
&bow_lore += 1;
}
and this:
spells:
int &firespell = count_magic("item-fb");
int &lightspell = count_magic("item-ice");
int &hellspell = count_magic("item-sfb");
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 - $200000"
"Cancel"
choice_end()
if (&result == 1)
{
if (&gold <= 4999) goto nogold;
if (&level < 5) goto lowlevel2;
&gold -= 5000;
&bow_lore = 1;
}
Maybe someone can figure this out...





