HoS_PRC8/_mod/_module/nss/rts_it_uw11.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

31 lines
1.1 KiB
Plaintext

// rts_it_uw11 - Black Mail Documents
void main()
{
object oItem=GetItemActivated();
object oPC=GetItemActivator();
object oTarget=GetItemActivatedTarget();
string sTeamID=GetLocalString(oPC,"sTeamID");
string sTargetTeamID=GetLocalString(oTarget,"sTeamID");
if (GetIsObjectValid(oTarget)&&GetObjectType(oTarget)==OBJECT_TYPE_CREATURE)
{ // valid target
if (sTeamID!=sTargetTeamID&&GetStringLength(sTargetTeamID)>0)
{ // not same team
AssignCommand(oTarget,SpeakString("I'll give you gold when I have it just don't tell anyone!"));
SetLocalString(oTarget,"sBlackmail",sTeamID);
} // not same team
else if (sTeamID==sTargetTeamID)
{ // same team
SendMessageToPC(oPC,"You cannot use this item on your own team members!");
} // same team
else
{ // invalid
SendMessageToPC(oPC,"That object is not a member of a team.");
} // invalid
} // valid target
else
{ // invalid
SendMessageToPC(oPC,"Invalid target.");
} // invalid
}