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

43 lines
1.2 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Talus Menu on Rest
// tal_convhelper
// OPW Integration and Clean Up By Don Anderson
// dandersonru@msn.com
//
// Used in Rest Menu Conversation
//
////////////////////////////////////////////////////////////////////////////////
int StartingConditional()
{
location lTarget = GetLocation(GetPCSpeaker());
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 10.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE);
int n=0;
while (n<7)
{
if(GetIsObjectValid(oTarget))
{
if(GetIsObjectValid(oTarget))
{
SetLocalObject(GetPCSpeaker(),"targ"+IntToString(n),oTarget);
SetCustomToken(7000+n,GetName(oTarget));
}
else
{
SetLocalString(GetPCSpeaker(),"targ"+IntToString(n),"none");
SetCustomToken(7000+n,"[Empty] ");
}
}
else
{
SetLocalString(GetPCSpeaker(),"targ"+IntToString(n),"none");
SetCustomToken(7000+n,"[Empty] ");
}
n++;
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 10.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
return TRUE;
}