Server Totals
Wilderness - (5)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Mikona - (0)
Total players: 5
Gallery
  • MChek 0026
    Album name: DM Events
    Uploaded by: Olisa
    Uploaded: Fri Jun 22, 2018 9:30 pm

Links Menu

Simple silencing script/item

Moderators: Nighthawk4, Dungeon Masters

Simple silencing script/item

PostAuthor: ArgentDuergar » Wed Oct 03, 2018 7:09 pm

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.
Magus Gorstag Tessele of the Blue Order of the Sky, and withal Transmuter, Conjurer, Diviner, and Abjurer of Vorin.
(click here to read his diary)
Walroar and Foig as well.
User avatar
ArgentDuergar
Prince of Bloated Discourse
 
Posts: 193
Images: 0
Joined: Wed Jun 20, 2018 3:37 pm
Location: Italy
Timezone: CEST

Re: Simple silencing script/item

PostAuthor: rk57957 » Wed Oct 03, 2018 8:20 pm

if this works, kassha would like a set .... for reasons.
User avatar
rk57957
Scholar
 
Posts: 1244
Images: 4
Joined: Fri Jan 11, 2008 4:52 am
Timezone: CST

Re: Simple silencing script/item

PostAuthor: Tel » Wed Oct 03, 2018 9:53 pm

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
582
Teleniel (Rockfall Trading), Artemis Hornbow (Hornbow Archery), Tomnan (Outsider's Arcana)
Kaaran (Justicar of Toran), Agatte Grantie Carver
User avatar
Tel
Apprentice Scholar
 
Posts: 804
Images: 4
Joined: Fri Jul 10, 2009 12:33 pm
Timezone: GMT-5

Re: Simple silencing script/item

PostAuthor: GrimlyAxefingler » Thu Oct 04, 2018 2:58 am

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.
User avatar
GrimlyAxefingler
CCC
CCC
 
Posts: 335
Images: 14
Joined: Sat Feb 18, 2017 9:46 pm
Location: Hamilton Ontario Canada
Timezone: EST

Re: Simple silencing script/item

PostAuthor: ArgentDuergar » Thu Oct 04, 2018 6:06 am

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.
Magus Gorstag Tessele of the Blue Order of the Sky, and withal Transmuter, Conjurer, Diviner, and Abjurer of Vorin.
(click here to read his diary)
Walroar and Foig as well.
User avatar
ArgentDuergar
Prince of Bloated Discourse
 
Posts: 193
Images: 0
Joined: Wed Jun 20, 2018 3:37 pm
Location: Italy
Timezone: CEST


Return to NWN Scripting

Who is online

Registered users: No registered users