User Tools

Site Tools


scripting:reference:events_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:reference:events_reference [2014/06/23 15:51] – [ItemAdded] mitscripting:reference:events_reference [2025/05/28 16:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ===== Events Reference ===== ===== Events Reference =====
- +Here is a list of all the events currently supported by the world server.
-Here is a list of all the events currently supported by the world server+
  
 ===== Player Status Events ===== ===== Player Status Events =====
Line 93: Line 92:
 ===== Inventory & Skill Events ===== ===== Inventory & Skill Events =====
 ==== UseItem ==== ==== UseItem ====
 +^ Triggered by | An item being used by the player |
 +^ Event Parameter | Item Name |
 +^ CancelTransaction | Cancels the normal 'Use' behaviour (the normal behaviour usually involves removing the item from the inventory). e.g. If a food item, the world server would normally remove the item from the player's inventory and update their hunger. |
 +^ Notes | Not all items will always have a 'Use' option. You can control which ones do or don't by changing their behaviour using *setitemuse or by setting the *settings -> World Rules -> Inventory Mode. (Inventory Mode 2 makes all items usable irrespective of their behaviour type) |
 +//Example//
 +<code>Event( "UseItem", "Axe" )
 +{
 +    *msg %PLAYER% You used the axe to chop down the nearest tree
 +    *grantitem %PLAYER% 1 Wood
 +    CancelTransaction()    // Calling this means the player keeps the Axe
 +}
 +</code>
 ==== ItemAdded ==== ==== ItemAdded ====
 ^ Triggered by | A new item being added to the player's inventory | ^ Triggered by | A new item being added to the player's inventory |
Line 114: Line 125:
 ==== SkillRemoved ==== ==== SkillRemoved ====
 ==== BarterRequest ==== ==== BarterRequest ====
 +
 +===== Weapon Events =====
 +==== FireWeapon ====
 +==== WeaponHitGround ====
 +==== WeaponHitPlayer ====
  
 ===== Task System Events ===== ===== Task System Events =====
Line 120: Line 136:
 ^ Event Parameter | Building Type | ^ Event Parameter | Building Type |
 ^ CancelTransaction | N/A | ^ CancelTransaction | N/A |
-^ Notes | $gTaskItem1 = 2 +^ Notes | $gTaskItem1 = 2.  $gTaskItem2 = Building record num.    |
-^ | $gTaskItem2 = Building record num |+
 //Example// //Example//
 <code>Event( "BuildingTaskStart", "10" ) <code>Event( "BuildingTaskStart", "10" )
Line 171: Line 186:
 ==== BuildingProxEnter ====  ==== BuildingProxEnter ==== 
 ==== BuildingProxLeave ====  ==== BuildingProxLeave ==== 
 +==== PickupBuilding ====
 +==== BuildingDamaged ====
 +
 +===== Special Server Events =====
 +==== Custom ====
 +==== ProductionRunStart ====
 +==== ProductionRunEnd ====
 +==== EndSequence ====
 +==== &command ====
 +==== Timer ====
 +==== ScriptReload ====
 +==== RangeLeave ====
 +==== SeaDepth ====
 +==== KillWildlife ====
 +==== WorldUpdate ====
 +
 +===== Entity Events =====
 +==== EntityDestroyed ====
 +==== EntityDamaged ====
 +==== EntityUpdate ====
  
 ===== Town Events ===== ===== Town Events =====
-''TownButton \\ +==== TownButton ==== 
-TownDeclareWar \\ +==== TownDeclareWar ==== 
-TownEndWar \\ +==== TownEndWar ====
-''+
  
 ===== Battle Events ===== ===== Battle Events =====
-''InitChallenge \\ +==== InitChallenge ==== 
-AcceptChallenge \\ +==== AcceptChallenge ==== 
-BattleStart \\ +==== BattleStart ==== 
-BattleUpdate \\ +==== BattleUpdate ==== 
-BattleEnd \\ +==== BattleEnd ==== 
-BattleSurrender \\ +==== BattleSurrender ==== 
-BattleLeave \\ +==== BattleLeave ==== 
-BattleJoin \\ +==== BattleJoin ==== 
-BattleAcceptSurrender \\ +==== BattleAcceptSurrender ==== 
-BattleComplete \\ +==== BattleComplete ====
-''+
  
-===== Special Server Events ===== 
-''Custom \\ 
-EndSequence \\ 
-&command \\ 
-Timer \\ 
-ScriptReload \\ 
-RangeLeave \\ 
-SeaDepth \\ 
-'' 
  
scripting/reference/events_reference.1403538712.txt.gz · Last modified: (external edit)