healer-cancel.txt
snippets · 1.7 KB · 2010-03-30
Healer cancel: adds a cancel price list to healer.c.
Download « Back to the snippets list
the + shows what lines are added
in healer.c add these lines!
/* display price list */
act("{W$N {Gsays 'I offer the following spells:'{x",ch,NULL,mob,TO_CHAR);
send_to_char(" {Mlight: cure light wounds {y 10 gold{x\n\r",ch);
send_to_char(" {Mserious: cure serious wounds {y 15 gold{x\n\r",ch);
send_to_char(" {Mcritic: cure critical wounds {y 25 gold{x\n\r",ch);
send_to_char(" {Mheal: healing spell {y 50 gold{x\n\r",ch);
send_to_char(" {Mblind: cure blindness {y 20 gold{x\n\r",ch);
send_to_char(" {Mdisease: cure disease {y 15 gold{x\n\r",ch);
send_to_char(" {Mpoison: cure poison {y 25 gold{x\n\r",ch);
send_to_char(" {Muncurse: remove curse {y 50 gold{x\n\r",ch);
send_to_char(" {Mrefresh: restore movement {y 5 gold{x\n\r",ch);
send_to_char(" {Mmana: restore mana {y 10 gold{x\n\r",ch);
+ send_to_char(" {Mcancel: cacnels spells {y100 gold{x\n\r",ch);
send_to_char(" {GType heal <type> to be healed.{x\n\r",ch);
return;
}
in healer.c add this
+ else if (!str_prefix(arg,"cancel"))
+ {
+ spell = spell_cancellation;
+ sn = skill_lookup("cancellation");
+ words = "cancel";
+ cost = 10000;
+ }
above to be added just befor these lines!
else
{
act("$N says 'Type 'heal' for a list of spells.'",
ch,NULL,mob,TO_CHAR);
return;
}
in magic.c
+ void cancelation (......
if ((!IS_NPC (ch) && IS_NPC (victim) &&
!(IS_AFFECTED (ch, AFF_CHARM) && ch->master == victim)) ||
- /*(IS_NPC (ch) && !IS_NPC (victim))) {*/
+ (IS_NPC (ch) && !IS_NPC (victim) && !IS_SET(ch, AFF_IS_HEALER))) {
send_to_char ("You failed, try dispel magic.\n\r", ch);
return;