User Tools

Site Tools


features:housing:approved_scripts

Approved Houses Scripts

The official reference is here: https://nwn.sinfar.net/houses_scriptlist.php, but you can find more information on how to use those scripts here.

Activate/Deactive Placeables

Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5292

Script: Placeable Used = bi_activate

Activate/Deactive a placeable object

Variables:

BI_ACTIVATE : Integer

BI_ACTIVATED : Integer

BI_ACTIVATE_NEAREST_SOUND_OBJECT : Integer

BI_BEAM_SOURCE : String

BI_FACE : Float

BI_MOVEX : Float

BI_MOVEY : Float

BI_MOVEZ : Float

BI_RESET : Float

BI_SOUND : String

BI_SOUND_OBJECT_TAG : String

BI_SOUND_ON : Integer

BI_TARGET : String

BI_TARGET1 : String

BI_TARGET2 : String

BI_TURN : Float

BI_VFX : Integer

Note: BI_ACTIVATE_NEAREST_SOUND_OBJECT which will activate or deactivate (base on the the BI_SOUND_ON variable) the nearest sound object, in addition to the current object.

Script: Placeable Heartbeat = bi_activate_trig

Attaches itself to the closest trigger which will toggle when the first creature enters the trigger and then the last leaves. Otherwise it should be identical to bi_activate, except that the placeable need not be useble. Variables: (same as bi_activate )

This script will toggle the animation state of placeable objects and also the illumination status, if the placeable supports that. It also supports lots of other transformations that you may wish to perform on a placable or door.

If the string variable BI_TARGET is not specified, the used object will be activated. Otherwise it will try to active the objects in the area with a matching tag. By default all tags inside player housing are removed so you will need to use the home_tag script to set a house safe tag on the placeable. Outside of housing it words on the normal NWN tagging system. In either case you may only activate things in the same area.

In the event that its not possible to use the same tag for all of the targets, additional target tags can be specified by appending a number to the end of the variable name starting with 1, so the script will check for string BI_TARGET, string BI_TARGET1, string BI_TARGET2 and so on.

The script also supports other transformations:

Move the placeable between two locations, the alternate location is specified using one or more of the following float local variables:

BI_MOVEX (float)

BI_MOVEY (float)

BI_MOVEZ (float)

BI_FACE (float)

A common use for this is to conceal a placeable under the floor then make it appear by setting BI_MOVEZ =0.0 , this works very well for showers.

It is also possible to turn a placeable by a set amount using:

BI_TURN (float)

Make the placeable play a sound.

BI_SOUND (string)

Add a VFX to the placeable - very useful for lighting

BI_VFX (int)

Also if a beam VFX is required the source tag may be specified using:

BI_BEAM_SOURCE (string)

If one of the alternative transformations is specified the script will only perform the activation animation when BI_ACTIVATE (int) is set to 1. You can also tell the script that the object is already activated by setting BI_ACTIVATED (int) to 1.

Likewise if the object is a sound object you may tell the script that its on by setting BI_SOUND_ON (int) to 1.

The script can also be set to automatically toggle the state back after a set number of seconds.

BI_RESET (float)

Most of the above variables can be placed either on the activating placeable or on its target(s). If a variable is present on both, the value on the target will take precedence. Keep in mind that inside player homes the target must also have the script or any variables will be striped during the home upload. The target however does not need to be usable. This is no longer true, you are only allowed one script per object so there is no workaround that lets you include bi_activate variables on your home_tag placeables.

Notes: The default (idle) placeable animation is a problem for the script as it is unable to reliably toggle it into an alternate state. For most placeables the default is the deactivate animation so this is what the script will assume. If this is incorrect an explicit animation must be selected when placing the object. The script will then correctly toggle between either activate/deactivate or open/close.

It may not be possible to use all of the features inside players homes, I suspect that tagging sound objects for example may be impossible. Doors are also re-tagged so it will not be possible to target them inside a home.

Animated NPCs

Script: Placeable Heartbeat = hs_spawn_animnpc

Turn a useable placeable into an animated NPC.

The NPC can be customized like the hs_store_spawn script.

HS_ANIMNPC_PHENOTYPE - HS_ANIMNPC_ANIMATION = Animation to play, use the !EINFO command to find out the value for those 2 variables.

HS_ANIMNPC_ANIMATION_SPEED = Speed of the animation, relative to 1.0

HS_ANIMNPC_TALKTO_ANIMATION = Animation to play when talked to.

HS_ANIMNPC_TALKTO_SOUND = Sound resref to play when talked to.

HS_ANIMNPC_TALKTO_MESSAGE = Message to say when talked to.

Variables:

HS_ANIMNPC_ANIMATION : Integer

HS_ANIMNPC_ANIMATION_SPEED : Float

HS_ANIMNPC_ARMOR_APPEARANCE : String

HS_ANIMNPC_BODY_APPEARANCE : String

HS_ANIMNPC_GENDER : Integer

HS_ANIMNPC_HEADV2 : String

HS_ANIMNPC_PHENOTYPE : Integer

HS_ANIMNPC_TALKTO_ANIMATION : Integer

HS_ANIMNPC_TALKTO_MESSAGE : String

HS_ANIMNPC_TALKTO_SOUND : String

HS_SPAWN_VFX_0 : Integer

HS_SPAWN_VFX_1 : Integer

HS_SPAWN_VFX_2 : Integer

HS_SPAWN_VFX_3 : Integer

HS_SPAWN_VFX_4 : Integer

HS_SPAWN_VFX_5 : Integer

Back Doors/Portals

Discussion: http://sinfar.net/forum/viewtopic.php?f=33&t=111

Script: Door/PLC Heartbeat, Door OnTransitionClick = jj_create_bdoor

Variables:

BACKDOOR_VFX : Integer

KEY : String

NAME : String

NOKEY : Integer

TARGET : jj_create_bdoor

Placeable Heartbeat jj_create_bdoor

For Placeables:

OnHeartbeat script jj_create_bdoor will create a Waypoint on the exact same spot as your placeable you run the script from.

Script: OnUse = jj_backdoor will teleport you to the target Waypoint.

For Doors: (actual doors, not placeable ones)

OnHeartbeat script jj_create_bdoor will create a Waypoint on the exact same spot as your placeable you run the script from.

The OnTransitionClick script jj_backdoor will teleport you to the target Waypoint.

- This means that you can create links to eachother's houses (if they are on the same Island example: Sinifer - Ackalia).

- Back doors to the outside world (if you coordinate this with the builder of the area).

- Create transitions using only placeables.

Create a placeable, go to its properties, make it plot and usable.

In the Scripts tab, set Heartbeat to ii_create_bdoor

Go to the advanced tab and click on the dotted-icon next to variables.

Fill in the variables:

KEY (string) - I would suggest you use your front-door key for this. This will be your security firewall. Unless the person that wants to port to the location of your placeables has the key in his/her inventory, the link will not work. Example: I_MKEY_765

NAME (string) - The Tag you give the Waypoint created by the placeable.

The tag has to be unique.

The tag has to be all caps.

Advised is to use your login name or other unique method of identification.

Example: HOME_PAULUSMA_001

TARGET (string) - The Tag of the Waypoint this side of the connection will focus on. Example: HOME_PAULUSMA_002

NOKEY (int) - This variable checks whether a key should be present or not. If set to 1 (true) everybody will be able to port to the waypoint created by the placeable you set this variable on. So if you want people to have a key to port to a certain destination, you can ignore this one altogether. Do not add this one if you want to use a key.

Example: 1 (for a key-less transition)

Important Notes:

- Never log out on a balcony, balustrade or other enclosed out-of-your house nook of the world with the only access being this connection.

- You cannot teleport to another house unless that house is loaded into the server.

- The only way houses are loaded into the server is by entering it through the main door.

- Do not give away your keys lightly. Guard them well, and give them away only, to those you completely trust.

Chairs Sitting

Scripts for supporting sittable objects

On Use Sitting:

Script: g_bench_sit

Placeable Used = g_chair_sit

sit on a chair

Script: g_bench_rsit

Placeable Used = g_bench_sit

sit on a bench

Script: Placeable Used = g_bench_rsit

Sit on a bench reversed

On Click Sitting:

Discussion: http://sinfar.net/forum/viewtopic.php?t=2809

Script: Placeable Click = bi_onclick_sit

An alternative sit script supporting benches and the many chairs that do not work correctly with g_chair_sit.

Variables:

BI_DIRECTION : Float

BI_PLACES : Integer

BI_RADIUS : Float

BI_WIDTH : Float

BI_X : Float

BI_Y : Float

BI_Z : Float

Unlike the existing sit scripts which are designed for OnUsed, it should be added as an OnClick script. The script will checks if it knows about the placeable and if there are any local variable parameters. If knows what to do it will add one or more invisible sit points, correct the elevation of the placeable so that it will meet your characters bottom then remove itself. If I doesn't know what to do it will replace itself with the standard g_chair_sit script and hope for the best.

In most cases the script should work without any local variables but the defaults that I have selected may not be exactly what you want. Most of the time you may as well just add the invisible sit point in the toolset but it you have many chairs or benches to place it may be worth the trouble to use the script and provide your own sit parameters.

BI_PLACES int The number of sit points to create 1-16

BI_WIDTH int The width of the benches sitting area.

BI_RADIUS float The distance of the focal point for curved benches, can be negative for round/convex benches.

BI_DIRECTION float The relative orientation of the seat area, 180 for reversed seats.

BI_X float The relative sit position backwards, negative values will bring the sit point forwards.

BI_Y float The relative position to the left, negative values will bring the sit point to the right.

BI_Z float The elevation offset that needs to be applied to the chair.

BI_DEBUG int Set this to 1 to enable diagnostic information.

As the script only adds sit points on demand it will usually be more efficient than manually placed sit points, and while its more expensive than the bench scripts on its first run it should be cheaper when people use the bench afterwards. That said, its better to use g_chair_sit unless there is a problem with the chair.

Corpses

Script: Placeable Heartbeat = hs_spawn_deadnpc

Turn a useable placeable into dead creature.

The creature can be customized like the hs_store_spawn script.

HS_DEADNPC_APPEARANCE_TYPE = Creature appearance index from the appearance.2da file.

Variables:

HS_DEADNPC_APPEARANCE_TYPE : Integer

HS_DEADNPC_ARMOR_APPEARANCE : String

HS_DEADNPC_BODY_APPEARANCE : String

HS_DEADNPC_GENDER : Integer

HS_DEADNPC_HEADV2 : String

HS_SPAWN_VFX_0 : Integer

HS_SPAWN_VFX_1 : Integer

HS_SPAWN_VFX_2 : Integer

HS_SPAWN_VFX_3 : Integer

HS_SPAWN_VFX_4 : Integer

HS_SPAWN_VFX_5 : Integer

Door Autoclose and Locks

Script: Door Open = g_door_autoclose

The door will close itself after a certain number of seconds defined by the variable G_CLOSE_DELAY

By default it is 15 seconds.

If the variable G_CLOSE_LOCK is set to 1, the door will also be locked.

Variables:

G_CLOSE_DELAY : Integer

G_CLOSE_LOCK : Integer

Door Lock Switch

Script: Placeable Used = g_door_locker

lock/unlock the nearest door

Misc: Set Lock to home owner's key to restrict use.

Doorbells

Script: Placeable Used = yasm_doorbell

Lobby doorbell. Sends a message to other PCs in the house and/or keyholders.

Variables:

ENABLE_SHOUT : Integer

KEY_TAG : String

MSG_TXT : String

NAME_USER : Integer

PLAY_SOUND : Integer

Drinks Merchant

Discussion: http://sinfar.net/forum/viewtopic.php?t=4561

Script: Placeable Heartbeat = bi_p_cbar_hb

Scripts that allows you to add a custom drinks bar to a house, it is fairly complex so the documentation is in a forum topic

ITEM0 : String .. ITEM29 : String

LOCK : Integer

A common request that get is to offer custom drinks for player house bars and breweries. Rather than forcing everyone to go though a builder I thought that it would be nice to offer a script that allows players to make their own drinks inside of housing areas.

To use the script you will need to add a useable container, the plot flag must not be set. Then add bi_p_cbar_hb as the heartbeat script.

The script will look for number string variables beginning with “ITEM” followed by a numeric suffix beginning at zero. ITEM0, ITEM1, ITEM2 and so on.

The string value must begin with a type to identify the base item then some parameters.

Currently the script only supports alcoholic drinks in potion bottles that are charged at 50 Gold a time when a bottle is removed from the container.

The syntax for a potion bottles with the one use alcoholic effect is:

PotionA:Name:Appearance:Description

Where Appearance is defined as follows:

ModelTop;ColorTop;ModelMiddle;ColorMiddle;ModelBottom;ColorBottom

ModelTop=1-7

ColorTop=1-9

ModelMiddle=1-7

ColorMiddle=1-9

ModelBottom=1-24

ColorBottom=1-9

eg 1;2;1;2;1;2

ITEM0 (string) PotionA:Whisky:1;1;1;1;1;1:A bottle of single malt whisky.

If you wish the container to auto lock add LOCK (int) 1

The script will automatically make the bar plot, so that you do not need to.

Obviously, since you control the Name and Description you are also free to make a RP potions if you wish. The effect will still be alcohol however.

Elevations

Script: Placeable Heartbeat = bi_p_elevate

Creates an elevated walkable area near or over a (non-static) placeable. Apply the script and specify the elevation value on the placeable then use the toolset to create a generic trigger area over or close to the placeable. Any creature entering the trigger area will then be elevated by the value supplied.

ELEVATION : bi_p_elevate

Placeable Heartbeat bi_p_elevatestep

A test version of bi_p_elevate, to allow “steps” that have to be gone up in order, so that simulated upper and lower walkable areas are possible. Character will elevate on any trigger one step higher, even, or any lower numbered trigger.

The triggers need to overlap slightly at the points players are to cross from one step to the next.

ELEVATION : Float

STEP : Integer

Examine on Click

Script: Placeable Click = g_onclickexamine

examine the placeable that has been clicked, immediately

Force Emote Placables

Discussion: http://sinfar.net/forum/viewtopic.php?t=2743

Script: Placeable Used = bi_p_force_emote

A shackle script supporting an extensive selection of placeeables and offering the option to customise the emotes. It can also be used without a lock to allow characters to kneel on pillows or perform other emotes relative to a placeable.

Variables:

BI1_ANIM : Integer

BI1_BODYPART : Integer

BI1_DESC : String

BI1_DIRECTION : Float

BI1_DURATION : Float

BI1_MSG : String

BI1_PHENO : Integer

BI1_SPEED : Float

BI1_VFX : Integer

BI1_X : Float

BI1_Y : Float

BI1_Z : Float

BI2_ANIM : Integer

BI2_BODYPART : Integer

BI2_DESC : String

BI2_DIRECTION : Float

BI2_DURATION : Float

BI2_MSG : String

BI2_PHENO : Integer

BI2_SPEED : Float

BI2_VFX : Integer

BI2_X : Float

BI2_Y : Float

BI2_Z : Float

BI3_ANIM : Integer

BI3_BODYPART : Integer

BI3_DESC : String

BI3_DIRECTION : Float

BI3_DURATION : Float

BI3_MSG : String

BI3_PHENO : Integer

BI3_SPEED : Float

BI3_VFX : Integer

BI3_X : Float

BI3_Y : Float

BI3_Z : Float

BI_ANIM : Integer

BI_BODYPART : Integer

BI_DESC : String

BI_DIRECTION : Float

BI_DURATION : Float

BI_FE_SET : Integer

BI_KEY : String

BI_MSG : String

BI_PHENO : Integer

BI_SHACKLE_MODE : Integer

BI_SPEED : Float

BI_VFX : Integer

BI_X : Float

BI_Y : Float

BI_Z : Float

Explore/Hide Mini-Map

Script: Placeable Heartbeat = hs_hb_showarea

Any player entering the same area of the placeable with this script will have their minimap explored.

Script: Placeable Heartbeat hs_hb_hidearea

Any player entering the same area of the placeable with this script will have their minimap unexplored.

Jukeboxes

Script: Placeable Used = lwjb_jukebox

Starts Lil's Jukebox LWJB.

Light Switches

Script: Placeable Heartbeat = bi_p_lightswitch

This is the heartbeat set up script for both the activating placeable, and the target placeable. The switch placeable should be usable, and neither placeable should be set to static.

Switch needs these variables set:

“SWITCH” - int - 1

“NAME” - string - common name shared with the placeable to activate.

The light needs these set:

“LIGHT” - int - 1

“NAME” - string - common name shared with the activating placeable.

The light also needs the effects and/or activation variables set on it

“ACTIVATE” - int - Set to 1 if the activated placeable should play its activate animation when the switch is used.

“EFFECTS” - int - 1 to 4 - dur type vfx can be applied to the placeable when turned on.

“EFFECT_1” to “EFFECT_4” - int - The number of the Dur type VFX to apply

Variables:

EFFECTS : Integer

EFFECT_1 : Integer

EFFECT_2 : Integer

EFFECT_3 : Integer

EFFECT_4 : Integer

LIGHT : Integer

NAME : String

SWITCH : Integer

Noticeboards

Script: Placeable Heartbeat = hs_hb_makenboard

Turn a usable placeable into a notice board. HS_NOTICE_BOARD_TAG_SUFFIX must be set to a unique tag of maximum 10, A-Z,0-9,_ characters.

Variable: HS_NOTICE_BOARD_TAG_SUFFIX : String

Play Sound Effects on Use

Script: Placeable Used = g_playsound

Plays the sound resref defined by the G_PLAYSOUND variable

Variable: G_PLAYSOUND : String

Persistent Storage

Set the placeable to plot, and its inventory will be persistent. To be certain that what you put in an inventory will remain after a reset, make sure that you get a message in your saying that the inventory is persistent, when you open it.

If the placeable is not set as a plot object, then it won't be persistent and will have nothing special. (Advisable when making garbage cans in areas with persistant storage, to avoid item loss when adding or removing persistant storage)

Portals

Script: Placeable Used = hs_portal_used

Teleport the character that used the placeable to a waypoint spawned with the hs_spawn_portwp script and identified with the HS_PORTAL_TAG variable.

HS_PORTAL_TAG: Same as the variable used for the hs_spawn_portwp script.

HS_PORTAL_VFX (Optional): A visual effect to apply on the character before the teleportation.

HS_PORTAL_DELAY (Optional): The time between the placeable action and the teleportation.

Variables:

HS_PORTAL_DELAY : Float

HS_PORTAL_TAG : String

HS_PORTAL_VFX : Integer

Script: Placeable Heartbeat = hs_spawn_portwp

Turn the usable placeable into a waypoint where another placeable can bring characters to with the script hs_portal_used.

HS_PORTAL_TAG = a key word to identify the location in the house. It shouldn't have more than 10 characters.

Variables:

HS_PORTAL_TAG : String

Rotate Placable on Use

Script: Placeable Used = g_plc_used_turn

Turns the used placeable by 30 degree, or the number of degree defined by the G_TURN_DEGREE variable.

When it turns, you can make it play a sound defined by the variable G_TURN_SOUND.

The placeable will be turned back after 30 seconds, or by the number of second that you set in the G_TURN_BACK_DELAY variable.

Variables:

G_TURN_BACK_DELAY : Integer

G_TURN_DEGREE : Integer

G_TURN_SOUND : String

Set a Placables Tag

Script: Placeable Heartbeat = home_tag

Adds a tag to the placeable so that the placeable may be accessed by other scripts.

For security reasons Tags are usually removed or replaced when homes are uploaded, this script provides a safe tag for home builders to work with.

Variable: TAG : String

Server script builders should, #include “home_inc_tag” and use one of the following fucntions to get a matching tag:

string GetHomeSafeTag(string sOriginalTag);

string GetHomeTagByID(string sOriginalTag, int nHomeID);

Shackles (Bashable)

Script: Placeable Death = shckle_p_ondeath

The script to allow a PC to bash free of the shackles . Script: Placeable Used = shckle_p_talk

Trigger for shackle placeables.

Slave Tether

Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=1162

Script: Placeable Heartbeat = yasm_shackle

Variable: CHAIN_LENGTH : Float

Misc: Set PLC's Key to Owner's Key

This system chains the prisoner to a shackle, allowing them freedom to move and emote whilst secured, but they are trapped within the length of the chain. A tether.

To deploy the system in your house build simply put down a suitable placeable object, set it as usable and give it yasm_shackle as its heartbeat script.

Whether or not you set a lock key determines how securely the prisoner is chained. With no key set the prisoner is released by just click/using the shackle. If a lock key is set the player needs to have an item with the required tag to unlock the prisoner. Keys tags work in the same manner as for doors & containers.

The length of the chain can be controlled by setting a local variable, CHAIN_LENGTH (float), but this is optional and if omitted will default to 2.0

In game usage is very simple, the prisoner clicks the shackle and they are locked. Usage implies consent to the consequences. If the shackle has a lock then Unlock (rather than Use) to release the prisoner. Escaping is as simple as typing !ooc, and by the time you transition back with !ic the shackle will have reset itself.

You will notice that the system uses a trap mechanism, unfortunately the game engine spews a little bit of spam as players move in and out of the area of an active shackle/trap, sorry but that cant be muted. Just ignore the background noise and have fun emoting with the prisoner.

Stores

Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5374

Script: Placeable Heartbeat = hs_store_xferspw

All items put in the inventory of this placeable will be moved to the store identified by the variable HS_STORE_TAG.

Variable: HS_STORE_TAG : String

Script: Placeable Heartbeat = hs_store_spawn

Turn a useable placeable into a merchant NPC. The merchant will open a store identified by the variable HS_STORE_TAG (10 characters max). You can fill that store with the hs_store_xferspw script.

You can control the cost if the items with the following variables:

HS_STORE_BONUS_MARK_UP:

is added to the stores default mark up percentage on items sold (-100 to 100)

HS_STORE_BONUS_MARK_DOWN:

added to the stores default mark down percentage on items bought (-100 to 100)

You can set the properties of the NPC with the following variables:

HS_STORE_MERCHANT_GENDER:

1 for female, 0 for male

HS_STORE_MERCHANT_BODY_APPEARANCE:

Use the body model to get the value of this variable

HS_STORE_MERCHANT_HEADV2:

Use the body model, new heads section, to get the value of this variable

HS_STORE_MERCHANT_ARMOR_APPEARANCE:

Use the tailoring model to get the value of this variable

HS_SPAWN_VFX_0 - HS_SPAWN_VFX_5:

Visual effects (horns, eyes, hat…), from the visualeffects.2da file.

You can control what the NPC say with the following variables:

HS_STORE_DIALOG_NPC_WELCOME_SOUND: Sound resref to play when the dialog start.

HS_STORE_DIALOG_NPC_WELCOME_ANIMATION: Animation to play when the dialog start. Use the !EINFO command to find out the value of this variable.

HS_STORE_DIALOG_NPC_WELCOME_TEXT

HS_STORE_DIALOG_PC_YES_TEXT

HS_STORE_DIALOG_PC_NO_TEXT

Notes: - You can use the web client to copy the values spoken by the body or tailoring models. - You can't get the gold of your sales. This is a non-profit script. If you want to get gold from you items, you have to sell them yourself.

HS_SPAWN_VFX_0 : Integer

HS_SPAWN_VFX_1 : Integer

HS_SPAWN_VFX_2 : Integer

HS_SPAWN_VFX_3 : Integer

HS_SPAWN_VFX_4 : Integer

HS_SPAWN_VFX_5 : Integer

HS_STORE_BONUS_MARK_DOWN : Integer

HS_STORE_BONUS_MARK_UP : Integer

HS_STORE_DIALOG_NPC_WELCOME_ANIMATION : Integer

HS_STORE_DIALOG_NPC_WELCOME_SOUND : String

HS_STORE_DIALOG_NPC_WELCOME_TEXT : String

HS_STORE_DIALOG_PC_NO_TEXT : String

HS_STORE_DIALOG_PC_YES_TEXT : String

HS_STORE_MERCHANT_ARMOR_APPEARANCE : String

HS_STORE_MERCHANT_BODY_APPEARANCE : String

HS_STORE_MERCHANT_GENDER : Integer

HS_STORE_MERCHANT_HEADV2 : String

HS_STORE_TAG : String

Tailor NPCs

Script: Placeable Heartbeat = hs_spawn_npc

Replaces the placeable by a given NPC. The placeable must be set as useable. The NPC to spawn is determined by the HS_SPAWN_NPC_ID variable, it can take one of the following values:

1 = Male Tailoring Model

2 = Female Tailoring Model

3 = Male Body Model

4 = Female Body Model

Variable: HS_SPAWN_NPC_ID : Integer

Trash Cans

Script: Placeable Close = pcplc_trash_cls

If the placeable has the script “pcplc_trash_cls” in its OnClose event, then it will act as a trash and so its inventory will be cleaned when closed.

Important Note: It is not advisable making garbage cans in areas with persistent storage, as item loss can occur when adding or removing persistent storage not properly tagged.

Turn Placeables State On/Off on use (with Sound Effects)

Script: Placeable Used = g_plc_onoff

Turn on/off a placeable.

G_PLC_IS_ON: Set this to 1 if the placeable is initially on/activated/open.

G_PLC_TURN_ON_SOUND: Sound ResRef to play when the placeable is turn on.

G_PLC_TURN_OFF_SOUND: Sound ResRef to play when the placeable is turn off.

Variables:

G_PLC_IS_ON : Integer

G_PLC_TURN_OFF_SOUND : String

G_PLC_TURN_ON_SOUND : String

VFX Heartbeat (with On/Off switch)

Script: Placeable Heartbeat = plcvfx_self

You can add any number of visual effects on a non-static placeable.

For that, you need to add the script “plcvfx_self” in the OnHeartbeat event of the placeable. Then, you need to add 1 variable for each visual effect that you want to see on this placeable.

This variable must be set as follow:

⦁ Type: Integer.

⦁ Name: PLCVFX_SELF#, where # is the index of the visual effect. The first index is 1 so the first visual effect will have “PLCVFX_SELF1” as variable name.

⦁ Value: It is the row index of the visual effect in the visualeffects 2da.

(Note: If you only want to add the light visual effect on a placeable, then you just need to put the script “zep_torchspawn” in the OnHeartbeat event.)

Each visual effect count as 1 dynamic object and so, a placeable with 1 visual effect count as 2 dynamic objects. If it has 3 visual effects, then it count as 4 dynamic objects.

Variables: PLCVFX_SELF1, PLCVFX_SELF2, PLCVFX_SELF3, Etc…

Script: Placeable Used = plcvfx_switchoff

Turn off/on the visual effect applied by the plcvfx_self heartbeat script.

VFX on Placeable use

Script: Placeable Used = g_play_vfx

Plays a permanent VFX on an object when used, will remove the VFX on a second use. Will also work for instant effects.

Variable: G_PLAYVFX : Integer

VFX and SFX on Placable use

Script: Placeable Used = g_play_vfx_sound

Play a sound and an -instant- visual effect (FNF) when the placeable is used.

Variables:

G_PLAYVFX: visual effect index to display.

G_PLAYSOUND: sound resref to play.

G_PLAYSOUND : String

G_PLAYVFX : Integer

Web Client Media Support

When used a placeable sends an Image, Sound, or Video to web client.

Script: Placeable Used = hs_use_wc_image

Sends an image to the web client of the player using the placeable.

Variable: HS_IMAGE_URL : String

Script: hs_use_wc_image

Placeable Used = hs_use_wc_sound

Sends a sound to the web client of the player using the placeable.

Variable: HS_SOUND_URL : String

Script: hs_use_wc_image

Placeable Heartbeat = hs_hb_wc_music

Web Client Music Loop.

Variable: HS_MUSIC_URL : String

Script: hs_use_wc_sound

Placeable Used = hs_use_wc_video

Sends a video to the web client of the player using the placeable.

Variable: HS_VIDEO_URL : String

Script: hs_use_wc_video

Placeable Used = hs_use_wc_youtub

Sends a you tube video to the web client of the player using the placeable.

HS_YOUTUBE_ID is the string of your youtube page's URL past “?v=”

(If your URL is http://www.youtube.com/watch?v=AMKYQZHfaf8 then your ID string = AMKYQZHfaf8)

Variable: HS_YOUTUBE_ID : String

features/housing/approved_scripts.txt · Last modified: 2019/04/04 11:50 (external edit)

phpBB Appliance - Powered by TurnKey Linux