WoR_PRC8/_module/nss/s_slavemaker.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

76 lines
3.7 KiB
Plaintext

void main()
{
object oClicker = GetItemActivator();
object oHench = GetHenchman(oClicker);
string itemTag = GetTag(GetItemActivated());
{
if (GetTag(oHench) == "SHA_SLAVE_GOBLIN" || GetTag(oHench) == "SHA_SLAVE_BUGBEAR" || GetTag(oHench) == "SHA_SLAVE_TROLL")
{
string sSayThis;
int iTalkVolume = TALKVOLUME_TALK;
int iTalkFlag = 0;
sSayThis = "You can only dominate one slave at a time.";
AssignCommand(oClicker, ClearAllActions(TRUE));
AssignCommand(oClicker, ActionSpeakString(sSayThis, iTalkVolume));
}
else if(itemTag == "SHA_SLAVEMAKER_GOBLIN")
{
string sSayThis;
int iTalkVolume = TALKVOLUME_TALK;
int iTalkFlag = 0;
object oDemon = CreateObject(OBJECT_TYPE_CREATURE, "sha_gobo_slave", GetLocation(oClicker), FALSE);
if(FloatToInt(GetChallengeRating(oDemon)) > (GetHitDice(oClicker) - 1))
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
SendMessageToPC(oClicker, "You were not strong enough to control the slave, and it turns on you");
return;
}
sSayThis = "I call forth upon you to do my bidding!";
AdjustAlignment(oClicker, ALIGNMENT_EVIL, 1);
AssignCommand(oClicker, ClearAllActions(TRUE));
AssignCommand(oClicker, ActionSpeakString(sSayThis, iTalkVolume));
AddHenchman(oClicker, oDemon);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
}
else if(itemTag == "SHA_SLAVEMAKER_BUGBEAR")
{
string sSayThis;
int iTalkVolume = TALKVOLUME_TALK;
int iTalkFlag = 0;
object oDemon = CreateObject(OBJECT_TYPE_CREATURE, "sha_bub_slave", GetLocation(oClicker), FALSE);
if(FloatToInt(GetChallengeRating(oDemon)) > (GetHitDice(oClicker) - 1))
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
SendMessageToPC(oClicker, "You were not strong enough to control the slave, and it turns on you");
return;
}
sSayThis = "I call forth upon you to do my bidding!";
AdjustAlignment(oClicker, ALIGNMENT_EVIL, 1);
AssignCommand(oClicker, ClearAllActions(TRUE));
AssignCommand(oClicker, ActionSpeakString(sSayThis, iTalkVolume));
AddHenchman(oClicker, oDemon);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
}
else if(itemTag == "SHA_SLAVEMAKER_TROLL")
{
string sSayThis;
int iTalkVolume = TALKVOLUME_TALK;
int iTalkFlag = 0;
object oDemon = CreateObject(OBJECT_TYPE_CREATURE, "sha_troll_slave", GetLocation(oClicker), FALSE);
if(FloatToInt(GetChallengeRating(oDemon)) > (GetHitDice(oClicker) - 1))
{
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
SendMessageToPC(oClicker, "You were not strong enough to control the slave, and it turns on you");
return;
}
sSayThis = "I call forth upon you to do my bidding!";
AdjustAlignment(oClicker, ALIGNMENT_EVIL, 1);
AssignCommand(oClicker, ClearAllActions(TRUE));
AssignCommand(oClicker, ActionSpeakString(sSayThis, iTalkVolume));
AddHenchman(oClicker, oDemon);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oDemon));
}
}
}