-
Notifications
You must be signed in to change notification settings - Fork 74
Cheat Sheet
Greg edited this page May 17, 2026
·
6 revisions
| Action | Code | Links |
|---|---|---|
| Wait X ticks | delay(ticks) |
|
| Nearby object | objectOperate("Action", "object_id") {} |
|
| Distant object | objectApproach("Action", "object_id") {} |
|
| Item on nearby object | itemOnObjectOperate("Action", "npc_id") {} |
|
| Item on distant object | itemOnObjectApproach("Action", "npc_id") {} |
|
| Nearby npc | npcOperate("Action", "npc_id") {} |
|
| Distant npc | npcApproach("Action", "npc_id") {} |
|
| Item on nearby npc | itemOnNPCOperate("Action", "npc_id") {} |
|
| Item on distant npc | itemOnNPCApproach("Action", "npc_id") {} |
| Action | Code | Links |
|---|---|---|
| Message | message("Welcome to Void.") |
|
| Animation | anim("sound_id") |
|
| Graphical effect | gfx("gfx_id") |
|
| Area graphical effect | areaGfx("gfx_id", tile, radius) |
|
| Projectile | shoot(target, "gfx_id") |
|
| Projectile from tile | tile.shoot(target, "gfx_id") |
|
| Play sound | sound("sound_id") |
|
| Play area sound | areaSound("sound_id", tile, radius) |
|
| Teleport | tele(x, y) |
|
| Check current level | has(Skill.Attack, 10) |
|
| Check actual level | hasMax(Skill.Constitution, 500) |
|
| Give experience | exp(Skill.Defence, 20.0) |
|
| Drain skill | hasMax(Skill.Constitution, 500) |
|
| Within area | tile in Areas["area_name"] |
| Action | Code | Links |
|---|---|---|
| Enter number | val count = intEntry("Question?") |
Example |
| Enter string | val string = stringEntry("Question?") |
Example |
| Action | Code | Links |
|---|---|---|
| Spawn | val npc = NPCs.add("id", tile", Direction.NORTH) |
|
| Animate | npc.anim("animation_id") |
|
| Find at tile | val npc = NPCs.find(tile, "npc_id") |
|
| List at tile | val npcs = NPCs.at(tile) |
|
| List in region | val npcs = NPCs.at(regionLevel) |
|
| Remove | NPCs.remove(npc) |
| Action | Code | Links |
|---|---|---|
| Equip at slot | equipped(EquipSlot.Hands) |
Example EquipSlot |
| Check equipped | ||
| Item in inv, equip or bank | ownsItem("item_id", amount) |
Example |
| Item equipped or in inventory | carriesItem("item_id", amount) |
Example |
| Contains | inventory.contains("item_id", amount) |
|
| Count | val count = inventory.count("item_id") |
|
| Full | inventory.isFull() |
|
| At index | inventory[index] |
|
| Add item | inventory.add("item_id", amount) |
|
| Remove item | inventory.remove("item_id") |
|
| Transaction | inventory.transaction {} |
| Action | Code | Links |
|---|---|---|
| Spawn | GameObjects.add("object_id", tile, ticks) |
Example |
| Animate | obj.anim("animation_id") |
Example |
| Find at tile | GameObjects.find(tile, "object_id") |
Example |
| Replace | oldObject.replace("replacement_id") |
Example |
| List on tile | GameObjects.at(tile) |
|
| Get by shape | GameObjects.getShape(tile, shape) |
ObjectShape |
| Get by layer | GameObjects.getLayer(tile, shape) |
ObjectLayer |
| Enter door | enterDoor(door) |
Force walk through a door without letting other players through it. Example |
TODO: get in area
| Action | Code | Links |
|---|---|---|
| Run code later | World.queue("unique_name", ticks) {} |