|
Cleric Special [by Necro] |
|
|
|
Posted Wednesday, August 12th @ 11:25:15 PM, by George Greer in the Specials dept.
Added Mar 31, 1997. Click the link below to read it or download it.
From: Necromonitor <necro@praxis.annex.net>
Subject: Temple Clerics
/*
This is a spec_proc for a temple cleric.
He'll cure poison first, then blindness, and THEN heal people of
their wounds. He heals the person who has the least percentage
of their maxhit first. Developed, and in use on ImmortalQuest/2.
telnet to annex.net, port 2001
Developed by Necro.
*/
SPECIAL(temple_cleric)
{
struct char_data *vict;
struct char_data *hitme = NULL;
static int this_hour;
float temp1 = 1;
float temp2 = 1;
if (cmd) return FALSE;
if (time_info.hours != 0) {
this_hour = time_info.hours;
for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room)
{
if (IS_AFFECTED(vict,AFF_POISON)) hitme = vict;
}
if (hitme != NULL) {
cast_spell(ch, hitme, NULL, SPELL_REMOVE_POISON);
return TRUE;
}
for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room)
{
if (IS_AFFECTED(vict,AFF_BLIND)) hitme = vict;
}
if (hitme != NULL) {
cast_spell(ch, hitme, NULL, SPELL_CURE_BLIND);
return TRUE;
}
for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room)
{
temp1 = GET_HIT(vict) / GET_MAX_HIT(vict);
if (temp1 < temp2) {
temp2 = temp1;
hitme = vict;
}
}
if (hitme != NULL) {
cast_spell(ch, hitme, NULL, SPELL_HEAL);
return TRUE;
}
}
return 0;
}
<< Clan Code. Mmmmm. [by Mehdi Keddache] | Reply | View as text | Flattened | Code for parse_class() [by fantasia] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|