User Tools

Site Tools


lgscript:shockgamesrv

ShockGameSrv

DestroyCursorObj

Delete the object held by the cursor.

DestroyInvObj

Delete an object that may be in the inventory.

Parameter integer object

DestroyAllByName

Delete multiple items of a type.

Returns boolean success
Parameter string archetype

SlayAllByName

Kill multiple items of a type.

Returns boolean success
Parameter string archetype

TweqAllByName

Activate or deactivate the tweq on multiple objects.

Returns boolean success
Parameter string archetype
Parameter boolean activate (optional)

HideInvObj

Hides an object by removing it from the player’s inventory.

Parameter integer object

AddInvObj

Put an object in the player’s inventory if there is space for it.

Returns boolean success
Parameter integer object

SetPlayerPsiPoints

Change the psi points of the player.

Parameter number amount

GetPlayerPsiPoints

Get the number of psi points the player has.

Returns integer amount

GetPlayerMaxPsiPoints

Get the maximum amount of psi points the player can have.

Returns integer amount

GrantPsiPower

Give a psi ability to a player.

Parameter integer player
Parameter integer psi

IsPsiActive

Check if a psi power is being used.

Returns boolean isactive
Parameter integer psi

SetSelectedPsiPower

Set the current psi power.

Parameter integer psi

Replicator

Display the replicator menu for an object.

Parameter integer object

SetLogTime

Mark a log as being read at this time.

Parameter integer deck
Parameter string or integer logtype
Parameter integer lognumber

UseLog

Read a log object. The object is destroyed.

Returns boolean success
Parameter integer object
Parameter boolean showalways (optional)

TriggerLog

Read a log.

Returns boolean success
Parameter string or integer logtype
Parameter integer deck
Parameter integer lognumber
Parameter boolean showalways (optional)

FindLogData

Get log number from an object.

Returns integer or nil deck
Returns integer lognumber
Parameter integer object
Parameter string or integer logtype

AttachCamera

Attach the camera to another object. The object must be uniquely named.

Parameter string object

CutSceneModeOn

Start a cutscene.

Parameter string scene

CutSceneModeOff

End a cutscene.

CreatePlayerPuppet

Create the player object.

Returns integer or nil object
Parameter string name

DestroyPlayerPuppet

Delete the player object.

Container

Display the container menu for an object.

Parameter integer object

YorN

Display a “yes” or “no” prompt.

Parameter integer object
Parameter string prompt

Keypad

Display a keypad.

Parameter integer object

HRM

Hack, Repair, Modify, Maintain, Research.

Returns boolean success
Parameter string or integer action
Parameter integer object
Parameter boolean psionic (optional)

TechTool

Display the HRM interface for an object.

Returns boolean success
Parameter integer object

PayNanites

Subtract nanites from the player. A negative amount will add nanites.

Returns boolean success
Parameter number amount

OverlayChange

Show or hide an on-screen display.

Parameter integer id
Parameter string or integer mode

OverlaySetObj

Set the object to receive overlay messages.

Parameter integer id
Parameter integer object

OverlayGetObj

Return the object for an overlay.

Returns integer or nil object

OverlayChangeObj

Show or hide an on-screen display with an object.

Parameter integer id
Parameter string or integer mode
Parameter integer object

OverlayOn

Return whether an on-screen display is enabled.

Returns boolean isshown
Parameter integer id

Equipped

Get an object being used by the player. Slot numbers are the Contains link type minus 1000.

Returns integer or nil object
Parameter integer slot

Equip

Put an object in one of the player’s special slots.

Parameter integer slot
Parameter integer object

WearArmor

Use or remove armor. Without an argument, the armor is removed.

Parameter integer object (optional)

LevelTransport

Change the map. Flags are “RoomObjs” and “NetSynch”

Returns boolean success
Parameter string name
Parameter integer location
Parameter string or integer flags

SpewLockData

Display an access message for a lock.

Parameter integer object
Parameter boolean unlocked

CheckLocked

Check if an object is locked for a player or AI. If using keys, the frobber is required.

Returns boolean islocked
Parameter integer object
Parameter boolean usekeys (optional)
Parameter integer frobber (optional)

AddText

Display on-screen text. If the first argument is an object, the string will come from a property.

Parameter integer object (optional)
Parameter string text
Parameter integer player (optional)
Parameter number milliseconds

AddTranslatableText

Display on-screen text read from a string file. The index is appended to the name. The parameter is substituted in the text.

Parameter string name
Parameter string file
Parameter integer object
Parameter number index (optional)
Parameter number parameter (optional)
Parameter number milliseconds

AmmoLoad

Put ammunition in a gun.

Parameter integer gun
Parameter integer ammo

GetClip

Get the size of a clip.

Returns integer amount
Parameter integer ammo

SetModify

Modify an object.

Parameter integer object
Parameter integer state

AddExp

Give EXP cookies.

Parameter integer player
Parameter number amount
Parameter boolean reallyadd (optional)

HasTrait

Check if a player has a trait.

Returns boolean isactive
Parameter integer player
Parameter integer trait

HasImplant

Check if a player is using an implant.

Returns boolean isactive
Parameter integer player
Parameter integer implant

HealObj

Give hitpoints to an object.

Returns boolean success
Parameter integer object
Parameter number amount

Research

Show research.

ResearchConsume

Use a needed item for research.

Returns boolean used
Parameter integer object

GetArchetypeName

Return the name of an object’s parent.

Returns string archetype
Parameter integer object

GetStat

Return a player stat. Stats are “STR”(0), “END”(1), “PSI”(2), “AGI”(3), “CYB”(4)

Returns integer value
Parameter integer player
Parameter string or integer stat

GetSelectedObj

Return the object that the player is focused on.

Returns integer or nil object

GetDistantSelectedObj

Return the object that the player is looking at.

Returns integer or nil object

FindSpawnPoint

Find a spawn point appropriate for creating a new object. The search will start at the location of the given object. See the Spawn property for flags.

Returns integer or nil marker
Parameter integer object
Parameter integer flags (optional)

CountEcoMatching

Count the number of concrete objects with an EcoType property.

Returns number count
Parameter integer eco type

RecalcStats

Update player stats.

Parameter integer player

PlayVideo

Show a movie.

Parameter string name

ClearRadiation

Stop radiation damage on the player.

RadiationHack

Clear radiation on all objects except the player.

LoadCursor

Grab an object with the cursor.

Returns boolean success
Parameter integer object

SetPlayerVolume

Something to do with the player’s motion. I’m not sure what.

Parameter number volume

RandRange

A random number in the range [low,high]

Returns number result
Parameter number low
Parameter number high

AddSpeedControl

Add a multiplier to the player’s speed.

Parameter string name
Parameter number speed
Parameter number turnspeed (optional)

RemoveSpeedControl

Cancel a previously set speed control.

Parameter string name

PreventSwap

Don’t pick up the next object that is frobbed.

SetObjState

Change the object state. Normal, Broken, Destroyed, Unresearched, Locked, Hacked

Parameter integer object
Parameter string or integer state

DisableAlarmGlobal

Cancel all alarms.

AddAlarm

Set the alarm expire time.

Parameter number milliseconds

RemoveAlarm

Cancel an alarm.

IsAlarmActive

Check for an alarm.

Returns boolean isactive

Frob

Frob an object.

Parameter boolean dontblock

SetExplored

Mark a region as visited.

Parameter integer location
Parameter boolean explored (optional)

RemoveFromContainer

Take an object out of a container.

Parameter integer object
Parameter integer container

ActivateMap

Sets a quest variable using the name of the current map.

SimTime

Return the current sim time.

Returns number milliseconds

StartFadeIn

Transition from a solid color to a normal view. Color is either a name or pixel value, or separate red, green, and blue components.

Parameter number milliseconds
Parameter string or integer color (optional)
Parameter number red (optional)
Parameter number green (optional)
Parameter number blue (optional)

StartFadeOut

Fade the screen to a solid color. Color is either a name or pixel value, or separate red, green, and blue components.

Parameter number milliseconds
Parameter string or integer color (optional)
Parameter number red (optional)
Parameter number green (optional)
Parameter number blue (optional)

PlayerModeSimple

Quick-and-dirty mode change.

Parameter integer mode

PlayerMode

Change the player mode. Modes are “Normal”(0), …, “Dead”(7)

Parameter integer mode

EndGame

Stops the game.

AllowDeath

Return whether the player should actually die. The player mode should not change when this is false.

Returns boolean isfatal

GetHazardResistance

Return a factor to multiply damage by. Argument is the END stat.

Returns number scale
Parameter integer endurance

GetBurnDmg

Return amount of damage done by psi overload.

Returns integer damage

PlayerGun

Get the current weapon.

Returns integer or nil object

PsiRadarScan

Update the radar.

PseudoProjectile

Create an object that comes out of another object.

Returns integer or nil object
Parameter integer source
Parameter integer archetype

Censored

Check if gore should be minimized.

Returns boolean noblood

DebriefMode

Go to the debriefing screen.

Parameter integer mission

TlucTextAdd

Show a message in a bordered box. The parameter is appended to the name.

Parameter string name
Parameter string file
Parameter number index (optional)

Mouse

Change the mouse mode.

Parameter boolean showcursor
Parameter boolean drop

MouseCursor

Is the mouse in cursor mode?

Returns boolean visible

RefreshInv

Update the inventory display. Use when the size of the inventory may have changed.

TreasureTable

Randomly create the contents of a container.

Parameter integer container

VaporizeInv

Deletes everything in the player’s inventory. Saves nanites and the “Magic Ball”.

ShutoffPsi

Shut-off all psi powers.

SetQBHacked

Set a quest variable. “Note” variables are handled specially.

Returns boolean success
Parameter string name
Parameter number value

ZeroControls

Halt all player movement.

Parameter integer player
Parameter boolean resetkeys (optional)

NoMove

Enable or disable player movement.

Parameter boolean halt

ValidGun

Check that an object is a gun.

Returns boolean isgun
Parameter integer object

UpdateMovingTerrainVelocity

Control the velocity of moving terrain.

Parameter integer object
Parameter integer terrpt
Parameter number speed
lgscript/shockgamesrv.txt · Last modified: 2009/08/25 22:04 (external edit)