well after another break im back to start coding.. im currently trying to code some more complex spells that only the person with a perticularily deity can cast... godspells. well fo some reason i cant get the if block to recognize wheteher your and imm or a mortal and if your a mortal if your devoted to a perticular god. for example this is the if statement im using:
if ( ( !IS_IMMORTAL(ch) )
&& ((!ch->pcdata->deity)
|| ((ch->pcdata->deity) && (str_cmp(ch->pcdata->deity->name, "Blade") ) ) ) )
{
send_to_char( "Blade has not deemed you worthy of casting this spell.\n\r", ch );
return rSPELL_FAILED;
}
if your a mortal char then it works correctly however if your immortal it still wotn let you cast the spell unless your devoted to the god. anyone have any ideas? i sure i just puthte () in the wrong spot :p
my second question is: im trying to make another spell that has 2 different affects. if cast on yourself it buffs you but if cast on someone else it spells them down. is there any spells int he stock code similar to this that i can use as an example or does anyone have an example i could look at i would really appreciate it :)
thanks - typ
if ( ( !IS_IMMORTAL(ch) )
&& ((!ch->pcdata->deity)
|| ((ch->pcdata->deity) && (str_cmp(ch->pcdata->deity->name, "Blade") ) ) ) )
{
send_to_char( "Blade has not deemed you worthy of casting this spell.\n\r", ch );
return rSPELL_FAILED;
}
if your a mortal char then it works correctly however if your immortal it still wotn let you cast the spell unless your devoted to the god. anyone have any ideas? i sure i just puthte () in the wrong spot :p
my second question is: im trying to make another spell that has 2 different affects. if cast on yourself it buffs you but if cast on someone else it spells them down. is there any spells int he stock code similar to this that i can use as an example or does anyone have an example i could look at i would really appreciate it :)
thanks - typ