返回资讯中心
外部精选
软件工程
#开发者实时流

RuneScape Client API

If you are new here and would like a guided tour for getting started making your first plugin, see the tutorial page, or use this quick navigation:

Hacker News 最新AndroidKitKat2026/10/19 · 27 天前6 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

If you are new here and would like a guided tour for getting started making your first plugin, see the tutorial page, or use this quick navigation:

These documents are written expecting some familiarity with the Lua programming language.

Some useful resources for Lua programming in general:

The API uses Lua version 5.4.8, so be sure when reading any external guides that any advice given is compatible with this version.

Before you start making plugins you should read through the guidelines for what plugins are allowed to do. You can also ask in the RuneScape Plugin Portal discord for clarity on your specific plugin idea.

Once you have made (and tested) your plugin, you can follow the submission process steps to upload your plugin to Mod.io. This will explain everything that you need for submission, as well as how you will be updated as your submission is moderated.

Lua is dynamically typed, however, to provide a better idea of how to use this API, types for properties and functions are included in these documents.

function Cat:Meow(volume: Float) represents a function that's called on an object of type Cat and takes a floating point value (eg. 0.8) as a parameter, used as follows:

local c = Cat.new() -- Need a valid object to call this on c:Meow(0.8)

function Cat.find(name: String?) -> Cat? represents a function that doesn't need to be called on an object, takes an optional string as a parameter, and can return a Cat object or nil, used as follows:

local found = Cat.find() -- or local found = Cat.find("George")

Additionally, { String -> Int } represents a regular dictionary table, mapping strings to integers, such as { A = 3, B = 100 }, while [String] instead represents an array of strings such as { "Hello", "World" }.

In some cases you may also see numeric types with bit sizes attached to their name (eg. Uint8). These just serve as an indicator for the minimum and maximum range of values accepted or returned by a function, and are represented in Lua as regular numeric values.

You may also see types like A | B indicating the type is either A or B.

Certain types also inherit methods and properties from other types, which can be seen in the overview section for documents under the UI section, where:

Implies that ui.Button also contains all of the functionality from the base ui.Component type and can be used as an argument to functions expecting that base type. In some cases you may also see Type<T> types, which serves as a generic placeholder for any number of types based on Type, with the documentation clarifying what types it may represent

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →