GameEvent
GameEvent = {
monMapId:number;type:"monsterDeath"; } | {itemId:number;name:string;quantity:number;type:"itemDrop"; } | {afk:boolean;self:boolean;type:"afk";username:string; } | {type:"zone";zone:string; } | {map:string;type:"mapJoined"; } | {cell:string;pad:string;self:boolean;type:"cellChanged";username:string; } | {self:boolean;type:"playerJoined";username:string; } | {self:boolean;type:"playerLeft";username:string; } | {type:"logout"; } | {self:boolean;state:State;type:"playerState";username:string; } | {monMapId:number;type:"monsterRespawn"; } | {duration:number|null;name:string;self:boolean;targetId:number;targetType:"monster"|"player";type:"auraAdded"; } | {name:string;self:boolean;targetId:number;targetType:"monster"|"player";type:"auraRemoved"; } | {monMapId:number|null;text:string;type:"message"; } | {itemId:number;name:string;quantity:number;temp:boolean;type:"itemAdded"; } | {name:string;questId:number;type:"questCompleted"; }
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ monMapId: number; type: "monsterDeath"; }
Type Literal
Section titled “Type Literal”{ itemId: number; name: string; quantity: number; type: "itemDrop"; }
itemId
Section titled “itemId”
readonlyitemId:number
readonlyname:string
quantity
Section titled “quantity”
readonlyquantity:number
The amount in this drop.
readonlytype:"itemDrop"
Type Literal
Section titled “Type Literal”{ afk: boolean; self: boolean; type: "afk"; username: string; }
A player went AFK or came back. self is you.
Type Literal
Section titled “Type Literal”{ type: "zone"; zone: string; }
"" is the map’s default zone.
Type Literal
Section titled “Type Literal”{ map: string; type: "mapJoined"; }
Type Literal
Section titled “Type Literal”{ cell: string; pad: string; self: boolean; type: "cellChanged"; username: string; }
A player jumped to a cell. Walking within a cell doesn’t count.
Type Literal
Section titled “Type Literal”{ self: boolean; type: "playerJoined"; username: string; }
Another player entered the room.
Type Literal
Section titled “Type Literal”{ self: boolean; type: "playerLeft"; username: string; }
Type Literal
Section titled “Type Literal”{ type: "logout"; }
The connection to the server dropped.
Type Literal
Section titled “Type Literal”{ self: boolean; state: State; type: "playerState"; username: string; }
"dead" is a death. "idle" is a respawn or leaving combat.
Type Literal
Section titled “Type Literal”{ monMapId: number; type: "monsterRespawn"; }
Type Literal
Section titled “Type Literal”{ duration: number | null; name: string; self: boolean; targetId: number; targetType: "monster" | "player"; type: "auraAdded"; }
targetId is a monster’s monMapId or a player’s userId.
duration
Section titled “duration”
readonlyduration:number|null
Seconds.
readonlyname:string
readonlyself:boolean
targetId
Section titled “targetId”
readonlytargetId:number
targetType
Section titled “targetType”
readonlytargetType:"monster"|"player"
readonlytype:"auraAdded"
Type Literal
Section titled “Type Literal”{ name: string; self: boolean; targetId: number; targetType: "monster" | "player"; type: "auraRemoved"; }
Type Literal
Section titled “Type Literal”{ monMapId: number | null; text: string; type: "message"; }
A line a monster says, or a message the server shows you.
Type Literal
Section titled “Type Literal”{ itemId: number; name: string; quantity: number; temp: boolean; type: "itemAdded"; }
An item went straight into your inventory, such as a quest reward or a temporary item.
Type Literal
Section titled “Type Literal”{ name: string; questId: number; type: "questCompleted"; }
The server accepted a turn-in, whether from a script or the game’s quest window.