I allow all races with the ability to fly able to do that at their whim.
I make sure I check various places in the mud, so that you cannot sleep,
rest, etc while flying.
void do_land(CHAR_DATA *ch, char * argument)
{
if (!IS_AFFECTED(ch, AFF_FLYING)){
ptc(ch, "You aren't flying.\n\r");
return;
}
STR_REMOVE_BIT(ch->affected_by, AFF_FLYING);
ptc(ch, "You float down.\n\r");
act("$n floats down.", ch, NULL, NULL, TO_ROOM);
process_water(ch); /* in case we land on water */
return;
}
void do_fly(CHAR_DATA *ch, char * argument)
{
if (IS_AFFECTED(ch, AFF_VINES)){
send_to_char("You are held firmly in place.\n\r", ch);
return;
}
if (is_affected(ch, skill_lookup("bound to earth"))){
send_to_char("You are unable to fly.\n\r", ch);
return;
}
if (IS_AFFECTED(ch, AFF_FLYING)){
ptc(ch, "You are already flying.\n\r");
return;
}
if (IS_NPC(ch)){
if (!is_affected(ch,skill_lookup("fly")) &&
!STR_IS_SET(race_table[ch->race].aff, AFF_FLYING)
&& !STR_IS_SET(ch->pIndexData->affected_by, AFF_FLYING)){
ptc(ch, "You have no way to fly.\n\r");
return;
}
}
else
if (!is_affected(ch,skill_lookup("fly")) &&
!STR_IS_SET(race_table[ch->race].aff, AFF_FLYING)){
ptc(ch, "You have no way to fly.\n\r");
return;
}
ptc(ch, "You begin to levitate off the ground.\n\r");
act("$n begins to levitate off the ground.", ch, NULL, NULL, TO_ROOM);
STR_SET_BIT(ch->affected_by, AFF_FLYING);
}
> -----Original Message-----
> From: George Whiteside [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 21, 2004 11:31 PM
> To: [email protected]
> Subject: Affect bits, modifiers, all that jazz.
>
> Hey list. There's a flying spell in ROM that I want to make
> into a skill instead, so a player can just "fly" indefinately
> on a whim. My question is
> this: If the skill won't affect stats or have a limited
> duration, is there any reason I should set all the extra AF
> vectors? The only thing flying is going to affect directly is
> combat and stamina loss, which can be taken care of by simply
> checking the AFF_FLYING bit. Basically I'm just concerned
> that if I don't, the code'll puke somewhere I didn't expect
> it to if it doesn't find the effect info or something. I
> don't think it will. Just playing it safe and checking with
> you guys first. :)
>
> ---
> This sentence is false. The previous statement was true.
>
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>