generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
62
_module/nss/tal_partystatus.nss
Normal file
62
_module/nss/tal_partystatus.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user