User Tools

Site Tools


scripting:reference:events_reference

This is an old revision of the document!


Events Reference

Here is a list of all the events currently supported by the world server

Player Status Events

NewPlayer

Triggered by A new player logging in to the world for the first time
Event Parameter None
CancelTransaction N/A

Example

Event( "NewPlayer", "" )
{
    *say Welcome %PLAYER% to our world!
}

PlayerLogin

Triggered by A player logging in to the world
Event Parameter None
CancelTransaction N/A
Notes

Example

Event( "PlayerLogin", "" )
{
    *say %PLAYER% has entered our world!
}

PlayerLoginComplete

PlayerLogout

PlayerBirthday

PlayerChangeVehicle

PlayerDeath

PlayerKilled

RobocrowKilled

RobocrowKill

StartFishing

OnFish

PlayerRespawn

PlayerResurrect

OSDSelect

Triggered by Player clicking a scripted OSD item
Event Parameter OSDName:OSDButtonName
CancelTransaction N/A
Notes For details on created scripted UI, see the Scripted OSD Overview


Triggered by A player selecting a customisable menu or button in the main game UI
Event Parameter Menu number :
1 = Custom main menu item linked to F9 (Set with … ?? )
2 = Player list popup button 1
3 = Player list popup button 2
4 = Player list popup button 3
5 = Player list popup button 4
6 = Info screen custom button 1
7 = Info screen custom button 2
8 = Pub custom button 1
9 = Pub custom button 2
10 = Pub custom button 3
11 = Pub custom button 4
12 = Pub custom button 5
CancelTransaction N/A
Notes Most of these events won't appear until you've first set up the particular custom menu option or other settings.

Example

Event( "MenuOption", "1" )
{
    *notify %PLAYER% You selected a custom menu option
}

ItemDetails

Triggered by Player clicking the custom 'Details' button on the inventory item popup
Event Parameter Item Name
CancelTransaction N/A
Notes This will only be triggered on items that have had a custom details button enabled using *itemdetailstext ItemNum,ButtonText

Example

Event( "ItemDetails", "Bronze Sword" )
{
    osdcreate(OSDLOWER,"SwordOSD", "- Bronze Sword -" ) 
    osdaddat(TEXT, 0, 0, 600, 80, "", "The Bronze Sword is a basic weapon, +4 dmg, occupies 1 inventory slot etc." )
    osdactivate()
}

Inventory & Skill Events

UseItem

ItemAdded

Triggered by a new item being added to the player's inventory
Event Parameter Item Name
CancelTransaction N/A
Notes

Example

Event( "ItemAdded", "Bronze Sword" )
{
    // Level up when the player first gets a bronze sword
    if ( $gPlayerLevel < 1 )
    {
        *setlevel %PLAYER% 1
        *notifylarge %PLAYER% Level up!
    }
}

ItemRemoved

TaskComplete

TaskStart

UseSkill

SkillAdded

SkillRemoved

BarterRequest

Building Events

NewBuilding
PreAccessBuilding
AccessBuilding
AccessConstruction
BuildingPurchase
BuildingDestroyed
BuildingTriggered
BuildingTriggerSequenceComplete
BuildingProductionRun
BuildingDemolished
BuildingOwnerDied
PlaceBuilding
PlaceAnyBuilding
BuildingCapture
BuildingIDProxEnter
BuildingIDProxLeave
BuildingProxEnter
BuildingProxLeave

Town Events

TownButton
TownDeclareWar
TownEndWar

Battle Events

InitChallenge
AcceptChallenge
BattleStart
BattleUpdate
BattleEnd
BattleSurrender
BattleLeave
BattleJoin
BattleAcceptSurrender
BattleComplete

Special Server Events

Custom
EndSequence
&command
Timer
ScriptReload
RangeLeave
SeaDepth

scripting/reference/events_reference.1402172094.txt.gz · Last modified: (external edit)