I've got a slight problem! I've added about 20 spells with out any problems until a player casts them it take like 400 mana to cast armor!! heres my do_cast: ACMD(do_cast) { struct char_data *tch = NULL; struct obj_data *tobj = NULL; char *s, *t; int mana, spellnum, i, target = 0; if (IS_NPC(ch)) return; /* Snip of uchaged stuff */ /* spellnum = search_block(s, spells, 0); */ spellnum = find_skill_num(s); if ((spellnum < 1) || (spellnum > MAX_SPELLS)) { send_to_char("Cast what?!?\r\n", ch); return; } /* New code */ if (GET_LEVEL(ch) < SINFO.min_level[(int) GET_CLASS(ch)] && GET_DUAL_LEVEL(ch) < SINFO.min_level[(int) GET_DUAL(ch)] && GET_TRI_LEVEL(ch) < SINFO.min_level[(int) GET_TRI(ch)]) { send_to_char("You do not know that spell!\r\n", ch); return; } /* end of new code */ if (GET_SKILL(ch, spellnum) == 0) { send_to_char("You are unfamiliar with that spell.\r\n", ch); return; } /* Big Snip of unchanged stuff */ } else { /* cast spell returns 1 on success; subtract mana & set waitstate */ if (cast_spell(ch, tch, tobj, spellnum)) { WAIT_STATE(ch, PULSE_VIOLENCE); if (mana > 0) GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - mana)); } } } Thanx, Demond LaZaro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Name: Demond LaZaro the Implementor Phone: 1-505-776-8866 Mud: Master's Realm Mud Code Base: CircleMud Addy: realms.org 6969 Addy2: 206.185.32.8 6969 Fax: None (yet :\) E-mail: demond@realms.org Web Page: http://master.bevy.com/mrealm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST