From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search

RuneScript is a scripting language that Jagex uses to create content for RuneScape. The game engine is not written in RuneScript, instead using Java, while both the game and mobile clients are written in C++. RuneScript was developed to allow Jagex staff with little or no programming experience to create and edit content for the game. The game engine can read RuneScript files and execute them accordingly.

We write in a scripting language called RuneScript, which our Game Engine team has created specifically for making RuneScape content. The Java-based game engine then reads this RuneScript code and makes it all work. RuneScript is constantly being changed and expanded as we add new features to it to allow it to do new things."
Mod John A New Dwarf Quest: Coding and Writing[1]
RuneScript sample from the Biohazard quest
Hmm, syntax wise it's similar to any C-style language, except variable names are prefixed with their type (eg. %varname is an integer). We also lack full array support. Other than that, it'd do pretty much anything you could do in C or Java.
Mod Chris E Game Engine Q&A[2]

Effects on the game[edit | edit source]

Like all programming languages, Runescript has a number of limitations, some of which are inherited from Java.

Maximum values[edit | edit source]

Items[edit | edit source]

The maximum number of items that may be carried in one stack

RuneScape stores the amount of items in a stack using a signed 32-bit integer, which has a maximum value of 2,147,483,647 (231-1). Consequently, this is the maximum amount that can be stored as one stack (most often seen with coins). If a player attempts to withdraw or pick-up an item while carrying the maximum amount, it is stated that there is not enough inventory space.

Weights[edit | edit source]

Weight is stored as a signed 16-bit integer, in grams. The maximum possible weight of a single item is thus 32.767 kg (215-1).

Counters[edit | edit source]

Killcount in the beasts tab is stored as an unsigned 16-bit integer, meaning each killcount could have a maximum value of 65,535 (216-1). The maximum killcount that can be tracked ingame is currently 60,000.

Skills[edit | edit source]

Skill experience is stored as a signed 32-bit integer. Since experience is tracked to the tenths place, the maximum value is reduced by a factor of ten, giving experience a maximum of 214,748,364.7. The maximum amount of experience that can be obtained in-game is currently 200million.

Skill levels are sent as an unsigned 8-bit integer, meaning their maximum value is 255. This can be seen when touching the Stone of Jas in multiple quests.

Combat[edit | edit source]

The damage for a hit is stored as a signed 16-bit integer, meaning the maximum that could be dealt in one hit is 32,767 (215-1).

References[edit | edit source]

  1. ^ Mod John A. "Coding and Writing." 28 May 2009. Developers' Blogs.
  2. ^ Mod Chris E. "Game Engine Answers!." 13 April 2012. RuneScape Forums.