Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Scriptref Intro: Difference between revisions

From Lost City Wiki
Branon (talk | contribs)
Created page with "Test"
 
Branon (talk | contribs)
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
Test
[[Category:Scriptref]]
'''[[:Category:Scriptref|Browse all Scriptref pages]]'''
 
= RuneScript Reference/Scripting Tutorial =
<blockquote>Disclaimer: this document is being written by a relative noob in an effort to document my findings and iron out any incorrect notions or faulty assumptions. It is not complete and may be (read: probably is) egregiously wrong in certain areas. Continue at your own peril!</blockquote>
 
== Introduction ==
This document aims to acquaint new contributors with the basics of writing RuneScript as used by Lost City. Before reading, you are expected to have:
 
* Decent reading comprehension
** Go slowly and read each section multiple times if needed
* Willingness to ask for help
** Lost City is learning community and we are here to assist
* Most importantly - a winning attitude!
** If you get confused, ask a question and come back to the problem later
 
While not strictly required, having a working development environment set up on your computer would be a great advantage. You will be best able to follow along with the tutorial if you have:
 
* [https://github.com/LostCityRS/Server Lost City's server] set up and running for development on your local machine
**  If you need help with this please visit #setup-help in [https://discord.lostcity.rs/ Discord] or make a post on [https://lostcity.rs/ the forum]!
* Your preferred text editor installed and ready
**  [https://code.visualstudio.com/ VS Code] is recommended because there is an [https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage extension for RuneScript syntax highlighting] available.
 
Knowledge of basic programming fundamentals (variables, functions) will also help but is by no means required.
 
== RuneScript ==
RuneScript files are written as plain text with the extension [[File:Rs2.png|frameless]]. RuneScript files are placed under `./data/src/scripts` in the server's source tree and are further organized by various criteria (area, quest, skill, etc).
 
The Lost City game server is capable of hot-reloading RuneScript files as you change them, meaning you can follow along with this tutorial and see your changes appear in-game in real time!
 
To learn the basics of RuneScript, continue with the next page of the tutorial where we examine '''triggers'''.
 
'''[[Scriptref_Triggers|Next Page]] || [[:Category:Scriptref|Browse all Scriptref pages]]'''<blockquote></blockquote>

Latest revision as of 16:39, 22 August 2025

Browse all Scriptref pages

RuneScript Reference/Scripting Tutorial

Disclaimer: this document is being written by a relative noob in an effort to document my findings and iron out any incorrect notions or faulty assumptions. It is not complete and may be (read: probably is) egregiously wrong in certain areas. Continue at your own peril!

Introduction

This document aims to acquaint new contributors with the basics of writing RuneScript as used by Lost City. Before reading, you are expected to have:

  • Decent reading comprehension
    • Go slowly and read each section multiple times if needed
  • Willingness to ask for help
    • Lost City is learning community and we are here to assist
  • Most importantly - a winning attitude!
    • If you get confused, ask a question and come back to the problem later

While not strictly required, having a working development environment set up on your computer would be a great advantage. You will be best able to follow along with the tutorial if you have:

Knowledge of basic programming fundamentals (variables, functions) will also help but is by no means required.

RuneScript

RuneScript files are written as plain text with the extension . RuneScript files are placed under `./data/src/scripts` in the server's source tree and are further organized by various criteria (area, quest, skill, etc).

The Lost City game server is capable of hot-reloading RuneScript files as you change them, meaning you can follow along with this tutorial and see your changes appear in-game in real time!

To learn the basics of RuneScript, continue with the next page of the tutorial where we examine triggers.

Next Page || Browse all Scriptref pages