2012-08-24 23:06:14 -04:00
[[Category RS2]]
2012-08-25 19:35:06 -04:00
==Client States==
2012-08-25 14:15:02 -04:00
2012-08-25 20:52:50 -04:00
Client states are used to switch between different graphic and logic procedures. The state of the client is global. There may be cases where two states will be handled the same graphically but different logically, vice versa.
2012-08-25 20:02:18 -04:00
2012-08-25 19:35:06 -04:00
{| border=3
|-
! Opcode
! Name
! Description
|-
2012-08-25 19:46:33 -04:00
! 0
2012-08-25 19:51:52 -04:00
! Loading (initial)
2012-08-25 20:00:29 -04:00
! Client state where the client is initially loading itself to the login screen.
2012-08-25 19:51:52 -04:00
|-
! 5
2012-08-25 19:46:33 -04:00
! Loading
2012-08-25 20:00:29 -04:00
! Client state where the client is loading itself to the login screen.
2012-08-25 19:46:33 -04:00
|-
2012-08-25 19:56:47 -04:00
! 10
! Login Screen
2012-08-25 20:00:29 -04:00
! Client state where the client is on the login screen.
2012-08-25 19:56:47 -04:00
|-
2012-08-25 19:43:29 -04:00
! 20
! Login (initial)
2012-08-25 20:00:29 -04:00
! Client state where the client initially engages to log in to the server.
2012-08-25 19:43:29 -04:00
|-
2012-08-25 19:44:26 -04:00
! 25
2012-08-25 19:44:44 -04:00
! Map Rebuild
! Ingame client state where the client rebuilds the map.
2012-08-25 19:44:26 -04:00
|-
2012-08-25 19:35:06 -04:00
! 30
! Ingame
! Default ingame client state.
|-
! 35
! Ingame (screen overlay)
2012-08-25 20:00:29 -04:00
! Client state where the client screen is overlayed with a widget.
2012-08-25 19:40:41 -04:00
|-
! 40
! Login
2012-08-25 20:00:29 -04:00
! Client state where the client engages to log in to the server.
|-
! 1000
! Fatal Ondemand Error
! Client state where the client has encountered a fatal ondemand error and will no longer use the ondemand service.
2012-08-25 19:35:06 -04:00
|}
2012-08-25 14:15:02 -04:00
2012-08-26 20:58:08 -04:00
==Client Actions==
2012-08-26 20:55:23 -04:00
{| border=3
|-
! Opcode
2012-08-26 20:58:08 -04:00
! Frame Name
2012-08-26 23:57:36 -04:00
! Variable 0
! Variable 1
! Variable 2
2012-08-26 20:55:23 -04:00
! Description
2012-08-26 20:58:08 -04:00
|-
! 31
! [[443 Add Friend|Add Friend]]
2012-08-26 23:57:36 -04:00
! NA
! NA
! NA
2012-08-26 20:58:58 -04:00
! Action for when a friend is added.
|-
2012-08-26 20:59:59 -04:00
! 2
! [[443 Remove Friend|Remove Friend]]
2012-08-26 23:57:36 -04:00
! NA
! NA
! NA
2012-08-26 20:59:59 -04:00
! Action for when a friend is removed.
|-
2012-08-26 20:58:58 -04:00
! 21
! [[443 Add Ignore|Add Ignore]]
2012-08-26 23:57:36 -04:00
! NA
! NA
! NA
2012-08-26 20:58:58 -04:00
! Action for when an ignore is added.
2012-08-26 20:59:59 -04:00
|-
! 50
! [[443 Remove Ignore|Remove Ignore]]
2012-08-26 23:57:36 -04:00
! NA
! NA
! NA
2012-08-26 20:59:59 -04:00
! Action for when an ignore is removed.
2012-08-27 00:19:13 -04:00
|-
2012-08-27 00:29:01 -04:00
! 44
! [[443 Player Option 0|Player Option 0]]
! id
! position x
! position y
! Action for the first option of a player.
|-
! 22
! [[443 Player Option 1|Player Option 1]]
! id
! position x
! position y
! Action for the second option of a player.
|-
2012-08-27 00:31:30 -04:00
! 52
! [[443 Player Option 2|Player Option 2]]
! id
! position x
! position y
! Action for the third option of a player.
|-
! 56
! [[443 Player Option 3|Player Option 3]]
! id
! position x
! position y
! Action for the fourth option of a player.
|-
! 1
! [[443 Player Option 4|Player Option 4]]
2012-08-27 00:19:13 -04:00
! id
! position x
! position y
2012-08-27 00:31:30 -04:00
! Action for the fifth option of a player.
2012-08-27 00:21:47 -04:00
|-
2012-08-27 00:32:37 -04:00
! 41
! [[443 Npc Option 0|Npc Option 0]]
! id
! position x
! position y
! Action for the first option of a NPC.
|-
2012-08-27 00:21:47 -04:00
! 17
! [[443 Npc Option 1|Npc Option 1]]
! id
! position x
! position y
! Action for the second option of a NPC.
|-
! 13
! [[443 Npc Option 2|Npc Option 2]]
! id
! position x
! position y
! Action for the third option of a NPC.
2012-08-27 00:24:22 -04:00
|-
! 53
! [[443 Npc Option 3|Npc Option 3]]
! id
! position x
! position y
! Action for the fourth option of a NPC.
|-
! 46
! [[443 Npc Option 4|Npc Option 4]]
! id
! position x
! position y
! Action for the fifth option of a NPC.
2012-08-27 00:39:49 -04:00
|-
2012-08-27 19:33:56 -04:00
! 1001
! [[443 Npc Examine|Npc Examine]]
! id
! position x
! position y
! Action for the examine option of a Npc.
|-
2012-08-27 19:53:13 -04:00
! 28
2012-08-27 22:56:05 -04:00
! [[443 Item On Widget Option 0|Item on Widget Option 0]]
2012-08-27 19:53:13 -04:00
! id
! slot
! widget id
2012-08-27 22:56:05 -04:00
! Action for the first option of an item on a widget.
2012-08-27 19:53:13 -04:00
|-
! 16
2012-08-27 22:56:05 -04:00
! [[443 Item On Widget Option 1|Item on Widget Option 1]]
2012-08-27 19:53:13 -04:00
! id
! slot
! widget id
2012-08-27 22:56:05 -04:00
! Action for the second option of an item on a widget.
2012-08-27 19:53:13 -04:00
|-
! 54
2012-08-27 22:56:05 -04:00
! [[443 Item On Widget Option 2|Item on Widget Option 2]]
2012-08-27 19:53:13 -04:00
! id
! slot
! widget id
2012-08-27 22:56:05 -04:00
! Action for the third option of an item on a widget.
2012-08-27 19:53:13 -04:00
|-
! 32
2012-08-27 22:56:05 -04:00
! [[443 Item On Widget Option 3|Item on Widget Option 3]]
2012-08-27 19:53:13 -04:00
! id
! slot
! widget id
2012-08-27 22:56:05 -04:00
! Action for the fourth option of an item on a widget.
2012-08-27 19:53:13 -04:00
|-
! 19
2012-08-27 22:56:05 -04:00
! [[443 Item On Widget Option 4|Item on Widget Option 4]]
2012-08-27 19:53:13 -04:00
! id
! slot
! widget id
2012-08-27 22:56:05 -04:00
! Action for the fifth option of an item on a widget.
2012-08-27 19:53:13 -04:00
|-
2012-08-27 23:00:54 -04:00
! 35
! [[443 Widget Item Option 0|Widget Item Option 0]]
! id
! slot
! widget id
! Action for the first option of an item on a widget.
|-
! 30
! [[443 Widget Item Option 1|Widget Item Option 1]]
! id
! slot
! widget id
! Action for the second option of an item on a widget.
|-
! 26
! [[443 Widget Item Option 2|Widget Item Option 2]]
! id
! slot
! widget id
! Action for the third option of an item on a widget.
|-
! 25
! [[443 Widget Item Option 3|Widget Item Option 3]]
! id
! slot
! widget id
! Action for the fourth option of an item on a widget.
|-
! 49
! [[443 Widget Item Option 4|Widget Item Option 4]]
! id
! slot
! widget id
! Action for the fifth option of an item on a widget.
|-
2012-08-27 19:57:07 -04:00
! 1004
2012-08-27 21:17:01 -04:00
! [[443 Item Examine|Item Examine]]
2012-08-27 19:57:07 -04:00
! id
! slot
! widget id
! Action for the examine option of a widget item.
|-
2012-08-27 00:39:49 -04:00
! 40
! [[443 Ground Item Option 0|Ground Item Option 0]]
! id
! position x
! position y
! Action for the first option of a ground item.
|-
! 38
! [[443 Ground Item Option 1|Ground Item Option 1]]
! id
! position x
! position y
! Action for the second option of a ground item.
|-
! 34
! [[443 Ground Item Option 2|Ground Item Option 2]]
! id
! position x
! position y
! Action for the third option of a ground item.
|-
! 11
! [[443 Ground Item Option 3|Ground Item Option 3]]
! id
! position x
! position y
! Action for the fourth option of a ground item.
|-
! 3
! [[443 Ground Item Option 4|Ground Item Option 4]]
! id
! position x
! position y
! Action for the fifth option of a ground item.
2012-08-27 19:29:50 -04:00
|-
2012-08-27 19:43:28 -04:00
! 1003
! [[443 Ground Item Examine|Ground Item Examine]]
! id
! position x
! position y
! Action for the examine option of a ground item.
|-
2012-08-27 23:06:17 -04:00
! 55
! [[443 Object Option 0|Object Option 0]]
! info hash
! position x
! position y
! Action for the first option of a ground item.
|-
! 57
! [[443 Object Option 1|Object Option 1]]
! info hash
! position x
! position y
2012-08-27 23:08:43 -04:00
! Action for the second option of an object.
2012-08-27 23:06:17 -04:00
|-
! 43
! [[443 Object Option 2|Object Option 2]]
! info hash
! position x
! position y
2012-08-27 23:08:43 -04:00
! Action for the third option of an object.
2012-08-27 23:06:17 -04:00
|-
! 6
! [[443 Object Option 3|Object Option 3]]
! info hash
! position x
! position y
2012-08-27 23:08:43 -04:00
! Action for the fourth option of an object.
2012-08-27 23:06:17 -04:00
|-
! 1005
! [[443 Object Option 4|Object Option 4]]
! info hash
! position x
! position y
2012-08-27 23:08:43 -04:00
! Action for the fifth option of an object.
2012-08-27 23:06:17 -04:00
|-
2012-08-27 19:29:50 -04:00
! 1006
2012-08-27 19:33:56 -04:00
! [[443 Object Examine|Object Examine]]
2012-08-27 19:29:50 -04:00
! id
! position x
! position y
! Action for the examine option of an object.
2012-08-28 00:16:05 -04:00
|-
! 29
! [[443 Close Displayed Widgets|Close Displayed Widgets]]
! NA
! NA
! NA
! Action for when the currently open widgets are closed.
2012-08-26 20:55:23 -04:00
|}
2012-08-25 19:35:06 -04:00
==Game Protocol==
2012-08-25 14:15:02 -04:00
2012-08-25 20:04:37 -04:00
===Server Frames===
2012-08-24 23:18:12 -04:00
2012-08-25 14:35:39 -04:00
{| border=3
2012-08-24 23:06:14 -04:00
|-
! Opcode
! Type
! Length (bytes)
! Name
! Description
|-
! 29
! VARIABLE SHORT
! NA
2012-08-24 23:17:07 -04:00
! [[443 Player Update|Player Update]]
2012-08-24 23:06:14 -04:00
! Updates the players within the client's view.
|-
2012-08-25 20:14:32 -04:00
! 238
! VARIABLE SHORT
! NA
! [[443 NPC Update|NPC Update]]
! Updates the npcs within the client's view.
|-
2012-08-24 23:06:14 -04:00
! 121
! VARIABLE SHORT
! NA
2012-08-25 14:33:18 -04:00
! [[443 Rebuild Scene Graph|Rebuild Scene Graph]]
2012-08-24 23:06:14 -04:00
! Rebuilds the players scene graph.
|-
2012-08-25 14:33:18 -04:00
! 193
! VARIABLE SHORT
! NA
! [[443 Rebuild Scene Graph|Rebuild Custom Scene Graph]]
2012-08-25 14:36:12 -04:00
! Builds a custom scene graph.
2012-08-25 14:33:18 -04:00
|-
2012-08-25 20:22:46 -04:00
! 199
! FIXED
! 3
! [[443 Set Location|Set Location]]
! Sets the location on the map of where the player is.
|-
2012-08-26 13:54:16 -04:00
! 111
! FIXED
! 6
! [[443 Move Camera To|Move Camera To]]
! Moves the camera to a location on the map.
|-
2012-08-24 23:06:14 -04:00
! 157
! VARIABLE BYTE
! NA
2012-08-24 23:17:07 -04:00
! [[443 Send Message|Send Message]]
2012-08-24 23:06:14 -04:00
! Sends a message to the client's chatbox.
|-
! 58
! FIXED
! 6
2012-08-24 23:17:07 -04:00
! [[443 Update Skill|Update Skill]]
2012-08-24 23:06:14 -04:00
! Updates a skill by sending its experience and dynamic level.
|-
2012-08-25 15:09:36 -04:00
! 226
! FIXED
! 1
! [[443 Update Run Energy|Update Run Energy]]
! Updates the amount of run energy the player has.
2012-08-25 20:06:36 -04:00
|-
! 87
! FIXED
! 1
! [[443 Set Minimap State|Set Minimap State]]
! Sets the minimap state.
2012-08-25 15:09:36 -04:00
|-
2012-08-25 20:26:38 -04:00
! 117
! FIXED
! 1
! [[443 System Update|System Update]]
! Informs the client that a system update will be happening.
|-
2012-08-25 14:11:52 -04:00
! 192
! VARIABLE SHORT
! NA
! [[443 Execute Client Script|Execute Client Script]]
! Executes a client script.
|-
2012-08-25 14:18:48 -04:00
! 204
! VARIABLE SHORT
! NA
! [[443 Class Check Request|Class Check Request]]
! Parses a request for a class check request.
|-
2012-08-25 19:31:33 -04:00
! 74
! FIXED
! 6
! [[443 Set State Value|Set State Value (large)]]
! Sets the value of a client state variable.
|-
2012-08-25 20:16:36 -04:00
! 62
! FIXED
! 3
! [[443 Set State Value|Set State Value (small)]]
! Sets the value of a client state variable.
|-
2012-08-25 14:25:00 -04:00
! 163
! FIXED
! 0
! [[443 Reset States|Reset States]]
! Resets all the client state variables.
|-
2012-08-24 23:06:14 -04:00
! 160
! FIXED
! 4
2012-08-24 23:17:07 -04:00
! [[443 Display Window|Display Window]]
2012-08-24 23:06:14 -04:00
! Displays a widget as a window.
|-
2012-08-26 13:58:38 -04:00
! 221
! FIXED
! 4
! [[443 Display Screen Overlay|Display Screen Overlay]]
! Displays widgets over the entire screen of the client.
|-
2012-08-25 14:26:37 -04:00
! 6
! FIXED
! 2
! [[443 Display Chatbox Interface|Display Chatbox Interface]]
! Displays the chatbox as a widget.
|-
2012-08-25 20:42:44 -04:00
! 178
! FIXED
! 0
! [[443 Close Displayed Widgets|Close Displayed Widgets]]
! Closes all the displayed widgets except for the chatbox interface.
|-
2012-08-25 20:34:04 -04:00
! 51
! FIXED
! 0
! [[443 Fetch Input|Fetch Input]]
! Fetches input from the chatbox.
|-
2012-08-25 14:17:27 -04:00
! 3
! FIXED
! 6
! [[443 Change Inactive Color|Change Inactive Color]]
! Changes the widget's inactive color.
|-
2012-08-25 20:46:51 -04:00
! 232
! FIXED
! 10
! [[443 Set Offset|Set Offset]]
! Sets the x and y offset of a widget.
|-
2012-08-25 20:36:12 -04:00
! 31
! FIXED
! 4
! [[443 Display Player On Widget|Display Player on Widget]]
! Displays the local player on a widget.
|-
2012-08-25 19:21:55 -04:00
! 137
! FIXED
! 10
! [[443 Display Item On Widget|Display Item on Widget]]
! Displays the model of an item on a widget.
|-
2012-08-25 19:28:24 -04:00
! 147
! FIXED
! 10
! [[443 Set Model Rotation|Set Model Rotation]]
! Sets the x and y rotation of a model on a widget.
|-
2012-08-25 20:10:40 -04:00
! 73
! FIXED
! 8
! [[443 Rotate Model|Rotate Model]]
2012-08-25 20:11:01 -04:00
! Sets the step amount to rotate the model continuously about the x axis.
2012-08-25 20:10:40 -04:00
|-
2012-08-24 23:06:14 -04:00
! 228
! VARIABLE SHORT
! NA
2012-08-24 23:17:07 -04:00
! [[443 Send Items|Send Items]]
2012-08-24 23:06:14 -04:00
! Sends the items in an item container.
|-
! 213
! VARIABLE SHORT
! NA
2012-08-24 23:17:07 -04:00
! [[443 Update Items|Update Items]]
2012-08-24 23:06:14 -04:00
! Updates the items in an item container from their slot id.
|-
2012-08-25 14:28:03 -04:00
! 245
! FIXED
! 0
2012-08-25 14:28:16 -04:00
! [[443 Reset Items|Reset Items]]
2012-08-25 14:28:03 -04:00
! Resets all the items in an item container.
|-
2012-08-25 14:31:11 -04:00
! 82
! FIXED
! 2
! [[443 Set Spawn Sector|Set Spawn Sector]]
! Sets the sector on the map where entities will be spawned.
|-
2012-08-25 20:19:22 -04:00
! 244
! VARIABLE SHORT
! NA
! [[443 Spawn Sector|Spawn Sector]]
! Parses the sector of the map to spawn entities, then the actual entity spawns.
|-
2012-08-25 15:07:38 -04:00
! 133
! FIXED
! 2
! [[443 Reset Sector|Reset Sector]]
! Resets all the ground items and still objects in a sector.
|-
2012-08-24 23:06:14 -04:00
! 41
! FIXED
! 0
2012-08-24 23:17:07 -04:00
! [[443 Logout|Logout]]
2012-08-24 23:06:14 -04:00
! Logs the client out from the server.
2012-08-25 14:05:23 -04:00
|}
2012-08-25 20:04:37 -04:00
===Client Frames===
2012-08-25 14:05:23 -04:00
2012-08-25 14:35:04 -04:00
{| border = 3, padding = 2
2012-08-25 14:05:23 -04:00
|-
! Opcode
! Type
! Length (bytes)
! Name
! Description
|-
2012-08-26 18:20:20 -04:00
! 194
2012-08-26 18:20:38 -04:00
! VARIABLE BYTE
2012-08-26 18:20:20 -04:00
! NA
! [[Class Check|Class Check Response]]
! Response to a class check request sent from the server.
|-
2012-08-26 19:46:08 -04:00
! 4
! NA
! VARIABLE BYTE
! [[443 Chat|Chat]]
! Called when the client enters in a chat message.
|-
2012-08-26 20:01:35 -04:00
! 21
! 0
! FIXED
! [[443 Map Rebuilt|Map Rebuilt]]
! Called when the map has been successfully rebuilt.
|-
2012-08-26 19:45:13 -04:00
! 174
! NA
! VARIABLE BYTE
! [[443 Command|Command]]
! Called when the client inputs a command.
|-
2012-08-26 01:21:28 -04:00
! 90
! FIXED
! 8
! [[443 Add Friend|Add Friend]]
! Called when a new name has been added to the friend list.
|-
2012-08-26 01:31:48 -04:00
! 159
! FIXED
! 8
! [[443 Remove Friend|Remove Friend]]
! Called when a name has been removed from the friend list.
|-
2012-08-26 01:26:14 -04:00
! 198
2012-08-26 01:24:23 -04:00
! FIXED
! 8
! [[443 Add Ignore|Add Ignore]]
! Called when a new name has been added to the ignore list.
|-
2012-08-26 01:31:48 -04:00
! 250
! FIXED
! 8
! [[443 Remove Ignore|Remove Ignore]]
! Called when a name has been removed from the ignore list.
|-
2012-08-25 14:05:23 -04:00
! 70
! FIXED
! 0
2012-08-26 20:01:35 -04:00
! [[443 Closed Window|Closed Window]]
2012-08-25 14:05:23 -04:00
! Called when the currently opened window is closed.
|}