Page 1 of 1

Simple silencing script/item

Posted: Wed Oct 03, 2018 7:09 pm
by ArgentDuergar
Hi all!

Today I decided to toy around the toolset and the "Unique Power (Self Only)" property. The result has been a pair of "Shackles of Silence" (inspired by the item from the Book of Exalted Deeds with the same name, in case you're curious):

Code: Select all

void main()
{
  object oUsed = GetItemActivated();

 // The following section is for the Shackles of Silence.
 // This pair of bracers silence the user when used.
 if (GetTag(oUsed) == "SHUTUPSELF")
 {
    // Get the PC.
    object oPC = GetItemActivator();

    // Silence the user.
    effect eSilence = EffectSilence();

    // Create the corresponding visual effect.
    effect eVis = EffectVisualEffect(VFX_IMP_SILENCE);

    // Apply the visual effect to the PC.
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);

    // Apply the effect to the the PC.
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSilence, oPC);
 }
}
Now I've tested the item and it seems to work, but does it work? In other words, do you see anything that could lead to unexpected results/failure in the script?

Next step will be to try and see if I can make a second set of bracers that silence a character when worn.

Re: Simple silencing script/item

Posted: Wed Oct 03, 2018 8:20 pm
by rk57957
if this works, kassha would like a set .... for reasons.

Re: Simple silencing script/item

Posted: Wed Oct 03, 2018 9:53 pm
by Tel
Sounds like a good way to stop “accidental” Wails from faction issues!

Item seems to have permanent duration, not sure if this would cause problems with effect persisting through a rest, also if item is given away and the new holder rests etc

Re: Simple silencing script/item

Posted: Thu Oct 04, 2018 2:58 am
by GrimlyAxefingler
ArgentDuergar wrote:
Next step will be to try and see if I can make a second set of bracers that silence a character when worn.
Maybe put your silence effect into onto the OnPlayerEquipItem event, probably without the object used being necessary, as its already being called from the object the player equipped.

Re: Simple silencing script/item

Posted: Thu Oct 04, 2018 6:06 am
by ArgentDuergar
Tel wrote:Sounds like a good way to stop “accidental” Wails from faction issues!

Item seems to have permanent duration, not sure if this would cause problems with effect persisting through a rest, also if item is given away and the new holder rests etc
The duration of the effect is permanent, but it goes away normally if you rest, dispel, or heal it as far as I could test. I haven't tried to hand the item to someone else, but that isn't really possible to test in a single player module.