Rune_PRC8/_module/nss/tal_partystatus.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

63 lines
1.6 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Talus Menu on Rest
// tal_partystatus
// OPW Integration and Clean Up By Don Anderson
// dandersonru@msn.com
//
// Used in Rest Menu Conversation
//
////////////////////////////////////////////////////////////////////////////////
#include "NW_I0_GENERIC"
int IsSick(object oPC)
{
int status=FALSE;
if(GetHasEffect(EFFECT_TYPE_ABILITY_DECREASE,oPC) ||
GetHasEffect(EFFECT_TYPE_AC_DECREASE,oPC)||
GetHasEffect(EFFECT_TYPE_BLINDNESS,oPC) ||
GetHasEffect(EFFECT_TYPE_CURSE,oPC) ||
GetHasEffect(EFFECT_TYPE_DAMAGE_DECREASE,oPC) ||
GetHasEffect(EFFECT_TYPE_DISEASE,oPC) ||
GetHasEffect(EFFECT_TYPE_PETRIFY,oPC) ||
GetHasEffect(EFFECT_TYPE_POISON,oPC) ||
GetHasEffect(EFFECT_TYPE_NEGATIVELEVEL))
status=TRUE;
return status;
}
int StartingConditional()
{
string partystatus;
object oPC=GetPCSpeaker();
if(!GetLocalInt(oPC,"plminset"))
{
SetLocalInt(oPC,"plmin",0);
SetLocalInt(oPC,"plminset",TRUE);
}
if(!GetLocalInt(oPC,"emspeedset"))
{
SetLocalInt(oPC,"emspeedset",TRUE);
SetLocalFloat(oPC,"emspeed",1.0);
}
SetCustomToken(6664,FloatToString(GetLocalFloat(oPC,"emspeed")));
SetCustomToken(6665,IntToString(GetLocalInt(oPC,"plmin")));
object nPC= GetFirstFactionMember(oPC,TRUE);
while(nPC!=OBJECT_INVALID)
{
if(IsSick(nPC)) partystatus=partystatus+GetName(nPC)+" doesn't look well."+"\n";
else partystatus=partystatus+GetName(nPC)+" doesn't have any ailments."+"\n";
nPC=GetNextFactionMember(oPC,TRUE);
}
SetCustomToken(6669,partystatus);
return TRUE;
}