RuneScript: Difference between revisions
From RuneWiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<nowiki>*</nowiki>(this page records known info from https://github.com/RuneStar/leaks<nowiki/>)* | |||
===Extra Resources=== | ===Extra Resources=== | ||
https://osrs-docs.com/ pw: rsps | https://osrs-docs.com/ pw: rsps | ||
Latest revision as of 19:03, 23 June 2023
*(this page records known info from https://github.com/RuneStar/leaks)*
Extra Resources
https://osrs-docs.com/ pw: rsps
https://neptune-ps.gitlab.io/runescript/index.html
https://github.com/data-dependent/osrs-guides/blob/master/skilling.md
Terminology
op = operable interaction (occurs within 1 tile / line of walk)
ap = approachable interaction (occurs within approachable range of up to 10 tiles / line of sight)
cam = camera
if = interface
com = interface component
inv = inventory
loc = "location", represents an object in the world e.g. a Tree
obj = "object", represents items
p_ = protected (not able to access full set of variables)
stat = skill
oc = related to obj config
op____[1-5] = option 1 through 5 used on target
op____u = item used on target
op____t = spell used on target
opobj = interacted item on ground
opheld = interacted with item in inventory
Constants
^lootdrop_duration = 200
^dm_default = "Nothing interesting happens."
^max_32bit_int = 0x7FFFFFFFFunction Signatures
Functions can be registered 3 ways.
[proc,name](params)(return) known as a procedure or subroutine. Called via gosub(name) or by prefixing with ~.
[label,name](params) similar to GOTO/LABEL syntax. Called via jump(name) or by prefixing with @.
[trigger,on] contextual function handler registered for a specific action occurring in the engine.
Triggers
opnpc[1-5] / opnpcu / opnpct
apnpc1[1-5]
opplayer[1-5] / opplayeru / opplayert
applayer[1-5]
oploc[1-5] / oplocu / oploct
aploc[1-5]
opobj[1-5] / opobju / opobjt
opheld[1-5] / opheldu / opheldt
if_button[1-10]
ai_queue[1-20]there's different queue types: 1 = retaliation, 2 = damage, 3 = death, 8 = bind effects
ai_conqueue controller queue
Engine Functions
Calling with . or * can change behavior (does not affect procs or labels):
The character . can precede npc_ function names, indicating it's targeting a secondary NPC.
The character * can follow queue function names, indicating a second set of arguments are being passed.
| Name |
|---|
| anim |
| buffer_full |
| buildappearance |
| cam_lookat |
| cam_moveto |
| cam_reset |
| clearbit |
| clearqueue |
| controller_coord |
| controller_del |
| controller_findexact |
| controller_queue |
| coord |
| displayname |
| enum_getoutputcount |
| facesquare |
| finduid |
| getqueue |
| healenergy |
| huntnext |
| if_close |
| if_setevents |
| inarea |
| inv_add |
| inv_del |
| inv_getobj |
| inv_getvar |
| inv_itemspace2 |
| inv_moveitem |
| inv_resendslot |
| inv_setslot |
| inv_setvar |
| inv_size |
| inv_total |
| inzone |
| last_comsubid |
| last_int |
| last_slot |
| last_useitem |
| last_useslot |
| last_verifyobj |
| loc_add |
| loc_angle |
| loc_anim |
| loc_category |
| loc_coord |
| loc_del |
| loc_find |
| loc_findallzone |
| loc_findnext |
| loc_param |
| loc_type |
| longqueue |
| map_clock |
| map_members |
| mes |
| mes_typed |
| movecoord |
| name |
| npc_add |
| npc_anim |
| npc_basestat |
| npc_category |
| npc_coord |
| npc_del |
| npc_delay |
| npc_facesquare |
| npc_findexact |
| npc_param |
| npc_queue |
| npc_range |
| npc_say |
| npc_sethunt |
| npc_sethuntmode |
| npc_setmode |
| npc_statheal |
| npc_type |
| obj_add |
| obj_add |
| objectverify |
| oc_category |
| oc_desc |
| oc_members |
| oc_name |
| oc_param |
| p_aprange |
| p_arrivedelay |
| p_delay |
| p_pausebutton |
| p_telejump |
| p_transmogrify |
| random |
| randominc |
| region_findbycoord |
| region_getcoord |
| runclientscript |
| scale |
| seqlength |
| setbit |
| softtimer |
| sound_area |
| sound_synth |
| split_init |
| split_pagecount |
| staffmodlevel |
| stat |
| stat_base |
| stat_heal |
| testbit |
| weakqueue |
Core Content Functons
| Name |
|---|
| ~mesbox |
| ~objbox |
| ~chatplayer |
| ~chatnpc |
| ~.chatnpc_to_other |
| ~p_choice[1-5] |
| @multi[1-5] |
| ~p_loaddelay |
| ~p_countdialog |
| ~if_openmain |
| ~npc_death |
| ~npc_meleeattack |
| ~npc_meleedamage |
| ~playerhit |
| ~playerhit_n_melee |
| ~playerwalk3 |
| ~givexp |