From 98482c078384e834b15264b5afc81a67044141a0 Mon Sep 17 00:00:00 2001 From: Damighty <27978131-real_damighty@users.noreply.gitlab.com> Date: Thu, 25 Sep 2025 15:55:34 +0300 Subject: [PATCH 1/3] Added missing command usage/description strings or improved clarity of some existing ones --- .../shootingstar/ShootingStarPlugin.kt | 6 +-- .../skill/magic/lunar/LunarListeners.kt | 6 +-- .../ElementalWorkshopQuest.kt | 4 +- .../handlers/revenants/RevenantController.kt | 7 ++-- Server/src/main/core/game/ge/GrandExchange.kt | 6 +-- Server/src/main/core/game/shops/Shops.kt | 4 +- .../system/command/sets/AudioCommandSet.kt | 24 +++++------ .../system/command/sets/ConfigCommandSet.kt | 6 +-- .../command/sets/DevelopmentCommandSet.kt | 38 +++++++++--------- .../game/system/command/sets/FunCommandSet.kt | 12 +++--- .../system/command/sets/MiscCommandSet.kt | 40 +++++++++---------- .../command/sets/ModelViewerCommandSet.kt | 4 +- .../command/sets/ModerationCommandSet.kt | 2 +- .../command/sets/PlayerAttributeCommandSet.kt | 4 +- .../system/command/sets/QuestCommandSet.kt | 8 ++-- .../system/command/sets/SlayerCommandSet.kt | 4 +- .../system/command/sets/SpawnCommandSet.kt | 8 ++-- .../system/command/sets/StatsCommandSet.kt | 2 +- .../system/command/sets/SystemCommandSet.kt | 6 +-- 19 files changed, 94 insertions(+), 97 deletions(-) diff --git a/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt index 1e993e1bb..234c49c61 100644 --- a/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt +++ b/Server/src/main/content/global/activity/shootingstar/ShootingStarPlugin.kt @@ -133,16 +133,16 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com } override fun defineCommands() { - define("tostar", Privilege.ADMIN) { player, _ -> + define("tostar", Privilege.ADMIN, description = "Teleports you adjacent to the currently active star.") { player, _ -> teleport(player, star.starObject.location.transform(1,1,0)) } - define("submit", Privilege.ADMIN) { _, _ -> + define("submit", Privilege.ADMIN, description = "Rebuilds and fires the shooting star event immediately.") { _, _ -> star.rebuildVars() star.fire() } - define("resetsprite", Privilege.ADMIN) { player, _ -> + define("resetsprite", Privilege.ADMIN, description = "Resets your star sprite reward cooldown.") { player, _ -> player.savedData.globalData.starSpriteDelay = 0L } } diff --git a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt index b89b1a3c7..15e149a2f 100644 --- a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt +++ b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt @@ -815,7 +815,7 @@ class LunarListeners : SpellListener("lunar"), Commands { } override fun defineCommands() { - define("poison", privilege = Privilege.ADMIN) { player, strings -> + define("poison", privilege = Privilege.ADMIN, usage = "::poison ", description = "Applies poison to for initial damage.") { player, strings -> if(strings.size == 3) { val dmg = strings[2].toIntOrNull() val p = Repository.getPlayerByName(strings[1]) @@ -838,7 +838,7 @@ class LunarListeners : SpellListener("lunar"), Commands { } } - define("humidifykit", privilege = Privilege.ADMIN) { player, _ -> + define("humidifykit", privilege = Privilege.ADMIN, description = "Gives you the runes and items needed to test Humidify.") { player, _ -> if(freeSlots(player) < 24) { sendMessage(player, "Not enough free space.") return@define @@ -856,5 +856,3 @@ class LunarListeners : SpellListener("lunar"), Commands { - - diff --git a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/ElementalWorkshopQuest.kt b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/ElementalWorkshopQuest.kt index cb7ea7803..097b61613 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/ElementalWorkshopQuest.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/ElementalWorkshopQuest.kt @@ -113,7 +113,7 @@ class ElementalWorkshopQuest : Quest(Quests.ELEMENTAL_WORKSHOP_I, 52, 51, 1), Co } override fun defineCommands() { - define("resetew", Privilege.ADMIN) { player, _ -> + define("resetew", Privilege.ADMIN, description = "Resets Elemental Workshop I progress and teleports you to the start.") { player, _ -> setAttribute(player, "/save:ew1:got_needle", false) setAttribute(player, "/save:ew1:got_leather", false) setAttribute(player, "/save:ew1:bellows_fixed", false) @@ -129,7 +129,7 @@ class ElementalWorkshopQuest : Quest(Quests.ELEMENTAL_WORKSHOP_I, 52, 51, 1), Co addItem(player, Items.HAMMER_2347) addItem(player, Items.COAL_453, 4) } - define("readyew", Privilege.ADMIN) { player, _ -> + define("readyew", Privilege.ADMIN, description = "Sets Elemental Workshop I furnace as ready (queststage->95, changes all required attributes/varbits)") { player, _ -> val enabled = 1 setAttribute(player, "/save:ew1:got_needle", true) setAttribute(player, "/save:ew1:got_leather", true) diff --git a/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt b/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt index 1a1bdc055..39f23265d 100644 --- a/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt +++ b/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt @@ -87,20 +87,19 @@ class RevenantController : TickListener, Commands { } override fun defineCommands() { - define("setrevcap", Privilege.ADMIN) {player, strings -> + define("setrevcap", Privilege.ADMIN, "::setrevcap ", "Sets revenant spawn cap to ") {player, strings -> val amt = strings[1].toInt() expectedRevAmount = amt } - define("listrevs", Privilege.ADMIN) {player, strings -> + define("listrevs", Privilege.ADMIN, description = "Logs the IDs and locations of all tracked revenants.") {player, strings -> for (rev in trackedRevenants) { log(this::class.java, Log.FINE, "REV ${rev.id}-${rev.name} @ ${rev.location.toString()}") } - log(this::class.java, Log.FINE, "Total of ${trackedRevenants.size} revenants spawned.") } - define("clearrevs", Privilege.ADMIN) {_, _ -> + define("clearrevs", Privilege.ADMIN, description = "Despawns all revenants.") {_, _ -> for (rev in trackedRevenants.toTypedArray()) rev.clear() } } diff --git a/Server/src/main/core/game/ge/GrandExchange.kt b/Server/src/main/core/game/ge/GrandExchange.kt index a7ead4d1c..0b857045e 100644 --- a/Server/src/main/core/game/ge/GrandExchange.kt +++ b/Server/src/main/core/game/ge/GrandExchange.kt @@ -80,20 +80,20 @@ class GrandExchange : StartupListener, Commands { } override fun defineCommands() { - define("addbotoffer", Privilege.ADMIN) {player, strings -> + define("addbotoffer", Privilege.ADMIN, "::addbotoffer ", "Adds a GE bot sell offer for the given item ID and amount.") {player, strings -> val id = strings[1].toInt() val amount = strings[2].toInt() addBotOffer(id, amount) notify(player, "Added ${amount}x ${getItemName(id)} to the bot offers.") } - define("bange", Privilege.ADMIN) {player, strings -> + define("bange", Privilege.ADMIN, "::bange ", "Bans/blacklists the specified item from GE trades.") {player, strings -> val id = strings[1].toInt() PriceIndex.banItem(id) notify(player, "Banned ${getItemName(id)} from GE trade.") } - define("allowge", Privilege.ADMIN) {player, strings -> + define("allowge", Privilege.ADMIN, "::allowge ", "Allows/whitelists the specified item to be traded on the GE.") {player, strings -> val id = strings[1].toInt() PriceIndex.allowItem(id) notify(player, "Allowed ${getItemName(id)} for GE trade.") diff --git a/Server/src/main/core/game/shops/Shops.kt b/Server/src/main/core/game/shops/Shops.kt index b87f82d21..e85b40d64 100644 --- a/Server/src/main/core/game/shops/Shops.kt +++ b/Server/src/main/core/game/shops/Shops.kt @@ -284,13 +284,13 @@ class Shops : StartupListener, TickListener, InteractionListener, InterfaceListe } override fun defineCommands() { - define("openshop", Privilege.ADMIN) { player, args -> + define("openshop", Privilege.ADMIN, "::openshop ", "Opens the shop interface for .") { player, args -> if(args.size < 2) reject(player, "Usage: ::openshop shopId") val shopId = args[1].toInt() shopsById[shopId]?.openFor(player) } - define("shopscript") { player, args -> + define("shopscript", usage = "::shopscript ", description = "Runs CS2 script 25 with string \"vg\" and objects \", 92\"") { player, args -> val arg1 = args[1].toInt() player.packetDispatch.sendRunScript(25, "vg", arg1, 92) //Run CS2 script 25, with args 868? and 92(our container id) } diff --git a/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt b/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt index ac8ee0324..695934332 100644 --- a/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt @@ -18,13 +18,13 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play a specific song */ - define("playsong"){player,args -> + define("playsong", usage = "::playsong ", description = "Plays the music track ."){player,args -> if(args.size < 2){ - reject(player,"Usage: ::playsong songID") + reject(player,"Usage: ::playsong ") } val id = args[1].toIntOrNull() if(id == null){ - reject(player,"Please use a valid integer for the song id.") + reject(player,"Please use a valid integer for the song ID.") } player.musicPlayer.play(MusicEntry.forId(id!!)) notify(player,"Now playing song $id") @@ -32,13 +32,13 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play a specific jingle */ - define("playjingle"){player,args -> + define("playjingle", usage = "::playjingle ", description = "Plays the sound effect with ID ."){player,args -> if(args.size < 2){ - reject(player,"Usage: ::playjingle jingleID") + reject(player,"Usage: ::playjingle ") } val id = args[1].toIntOrNull() if(id == null){ - reject(player,"Please use a valid integer for the jingle id.") + reject(player,"Please use a valid integer for the jingle ID.") } PacketRepository.send(MusicPacket::class.java, MusicContext(player, id!!, true)) notify(player,"Now playing jingle $id") @@ -49,7 +49,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ * this is mostly useful for custom tracks that aren't in the ingame * music player yet. */ - define("playid"){player,arg -> + define("playid", usage = "::playid ", description = "Plays a music track by musicId instead of numeric music track ID."){player,arg -> if (arg.size < 2) reject(player, "Needs more args.") val id = arg[1].toIntOrNull() @@ -63,7 +63,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ * Command that unlocks all music tracks for the player * Restricted to ADMIN access only. */ - define("allmusic", Privilege.ADMIN){ player, _ -> + define("allmusic", Privilege.ADMIN, description = "Unlocks every music track for you."){ player, _ -> for (me in MusicEntry.getSongs().values) { player.musicPlayer.unlock(me.id) } @@ -71,9 +71,9 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play an audio id */ - define("audio", Privilege.ADMIN, "::audio id loops[optional]", "Plays audio by id") { player, args -> + define("audio", Privilege.ADMIN, "::audio loops[optional]", "Plays audio by ID. Loopable with optional integer argument.") { player, args -> if (args.size < 2 || args.size > 3) - reject(player, "Usage: ::audio id loops[optional]") + reject(player, "Usage: ::audio loops[optional]") val id = args[1].toInt() val loops = if (args.size > 2) args[2].toInt() else 1 playAudio(player, id, 0, loops) @@ -81,9 +81,9 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play an audio id globally by playername or coords */ - define("globalaudio", Privilege.ADMIN, "::globalaudio id radius[max 15] location[player name or x y z]", "Play global audio by id, radius, and location") { player, args -> + define("globalaudio", Privilege.ADMIN, "::globalaudio radius[max 15] location[ OR ]", "Play global audio by ID, radius, and location") { player, args -> if (args.size < 3) - reject(player, "Usage: ::globalaudio id radius[max 15] location[player name or x y z]") + reject(player, "Usage: ::globalaudio radius[max 15] location[ OR ]") val loc = when (args.size) { 6 -> Location(args[3].toInt(),args[4].toInt(),args[5].toInt()) 4 -> Repository.getPlayerByName(args[3])?.location diff --git a/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt b/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt index 25c5fb2e1..6ff2ad242 100644 --- a/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt @@ -12,7 +12,7 @@ class ConfigCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets a range of configs to a maximum value */ - define("sconfigrange"){player, args -> + define("sconfigrange", usage = "::sconfigrange ", description = "Sets each varp from (inclusive) up to (exclusive) to Integer.MAX_VALUE."){player, args -> if (args.size < 3) { reject(player, "usage: sconfigrange idlo idhi") } @@ -27,7 +27,7 @@ class ConfigCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets a range of configs to 0 */ - define("sconfigrange0"){player, args -> + define("sconfigrange0", usage = "::sconfigrange0 ", description = "Sets each varp from (inclusive) up to (exclusive) to 0."){player, args -> if (args.size < 3) { reject(player, "usage: sconfigrange0 idlo idhi") } @@ -44,7 +44,7 @@ class ConfigCommandSet : CommandSet(Privilege.ADMIN){ */ define("iface", Privilege.ADMIN, "::iface Interface ID", "Opens the interface with the given ID."){player, args -> if (args.size < 2) { - reject(player, "usage: iface id") + reject(player, "usage: ::iface ") return@define } val id = args[1].toIntOrNull() ?: reject(player, "INVALID INTERFACE ID") diff --git a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt index 253011da6..d3761c38f 100644 --- a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt @@ -68,7 +68,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("cleardiary", Privilege.ADMIN) { player, _ -> + define("cleardiary", Privilege.ADMIN, description = "Resets all achievement diary progress.") { player, _ -> for (type in DiaryType.values()) { val diary = player.achievementDiaryManager.getDiary(type) for (level in 0 until diary.levelStarted.size) { @@ -80,7 +80,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { sendMessage(player, "All achievement diaries cleared successfully.") } - define("clearjob", Privilege.ADMIN) { player, _ -> + define("clearjob", Privilege.ADMIN, description = "Clears your current job assignment.") { player, _ -> val playerJobManager = JobManager.getInstance(player) playerJobManager.job = null playerJobManager.jobAmount = -1 @@ -102,18 +102,18 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { player.spellBookManager.update(player) } - define("killme", Privilege.ADMIN, "", "Does exactly what it says on the tin.") { player, _ -> + define("killme", Privilege.ADMIN, description = "Literally kills you in-game even") { player, _ -> player.impactHandler.manualHit(player, player.skills.lifepoints, HitsplatType.NORMAL) } - define("struct") {player, args -> + define("struct", usage = "::struct ", description = "Logs the struct definition for the given cache id.") {player, args -> val mapId = args[1].toIntOrNull() ?: return@define val def = Struct.get(mapId) log(this::class.java, Log.FINE, def.toString()) } - define("datamap") {player, args -> + define("datamap", usage = "::datamap ", description = "Logs the data map definition for the given cache id.") {player, args -> val mapId = args[1].toIntOrNull() ?: return@define val def = DataMap.get(mapId) @@ -198,11 +198,11 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("testpacket") { player, _ -> + define("testpacket", description = "Sends the reset-interface packet to the client.") { player, _ -> PacketWriteQueue.write(ResetInterface(), PlayerContext(player)) } - define("npcsearch", Privilege.STANDARD, "npcsearch name", "Searches for NPCs that match the name either in main or children.") {player, strings -> + define("npcsearch", Privilege.STANDARD, "::npcsearch ", "Searches for NPCs that match the name either in main or children.") {player, strings -> val name = strings.slice(1 until strings.size).joinToString(" ").lowercase() for (id in 0 until 9000) { val def = NPCDefinition.forId(id) @@ -220,7 +220,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("itemsearch", Privilege.STANDARD, "itemsearch name", "Searches for items that match the name.") {player, args -> + define("itemsearch", Privilege.STANDARD, "::itemsearch ", "Searches for items that match the name.") {player, args -> val itemName = args.copyOfRange(1, args.size).joinToString(" ").lowercase() for (i in 0 until 15000) { val name = getItemName(i).lowercase() @@ -229,7 +229,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("runekit", Privilege.ADMIN, "", "Gives 1k of each Rune type" ) { player, args -> + define("runekit", Privilege.ADMIN, "", "Gives 1000 of each rune type. We love casting spells" ) { player, args -> for(item in runeKitItems) { addItem(player, item, 1000) } @@ -251,23 +251,23 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { setAttribute (player, "routedraw", !getAttribute(player, "routedraw", false)) } - define ("fmstart", Privilege.ADMIN, "", "") {player, _ -> + define ("fmstart", Privilege.ADMIN, description = "Marks your current tile as the force-movement start point.") {player, _ -> setAttribute(player, "fmstart", Location.create(player.location)) } - define ("fmend", Privilege.ADMIN, "", "") {player, _ -> + define ("fmend", Privilege.ADMIN, description = "Marks your current tile as the force-movement destination.") {player, _ -> setAttribute(player, "fmend", Location.create(player.location)) } - define ("fmspeed", Privilege.ADMIN, "", "") {player, args -> + define ("fmspeed", Privilege.ADMIN, "::fmspeed ", "Sets the starting force-movement speed (ticks between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeed", args[1].toIntOrNull() ?: 10) } - define ("fmspeedend", Privilege.ADMIN, "", "") {player, args -> + define ("fmspeedend", Privilege.ADMIN, "::fmspeedend ", "Sets the ending speed (ticks between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeedend", args[1].toIntOrNull() ?: 10) } - define("testfm", Privilege.ADMIN, "", "") { player, _ -> + define("testfm", Privilege.ADMIN, description = "Runs the configured force-movement from the saved start to end point.") { player, _ -> val start = getAttribute(player, "fmstart", Location.create(player.location)) val end = getAttribute(player, "fmend", Location.create(player.location)) val speed = getAttribute(player, "fmspeed", 10) @@ -276,7 +276,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { forceMove(player, start, end, speed, speedEnd, anim = ani) } - define("fmanim", Privilege.ADMIN, "", "") {player, args -> + define("fmanim", Privilege.ADMIN, "::fmanim ", "Sets the animation id to play during ::testfm.") {player, args -> setAttribute(player, "fmanim", args[1].toIntOrNull() ?: -1) } @@ -302,7 +302,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("setpestpoints", Privilege.ADMIN, "::setpestpoints points player_name", "Sets your (or player_name's) Pest Control points to 'points'") { player, args -> + define("setpestpoints", Privilege.ADMIN, "::setpestpoints player_name[optional]", "Sets your (or s) Pest Control points to ") { player, args -> val target = getPlayerFromArgs(player, args, 2) ?: return@define val points = args[1].toIntOrNull() if (points == null) { @@ -311,7 +311,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { target.savedData.activityData.pestPoints = points!! } - define("makeadmin", Privilege.ADMIN, "::makeadmin player_name", "Permanently gives admin rights to player_name (or self if empty)") { player, args -> + define("makeadmin", Privilege.ADMIN, "::makeadmin ", "Permanently gives admin rights to player_name (or self if empty)") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define target.details.rights = Rights.ADMINISTRATOR sendMessage(player, "Gave admin rights to ${target.username}.") @@ -323,7 +323,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { sendMessage(player, "Dropped admin rights.") } - define("max", Privilege.ADMIN, "::max player_name", "Gives all 99s to player_name (or self if empty)") { player, args -> + define("max", Privilege.ADMIN, "::max ", "Sets all skills to 99s for (or self if empty)") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define var index = 0 Skills.SKILL_NAME.forEach { @@ -334,7 +334,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { target.skills.updateCombatLevel() } - define("noobme", Privilege.ADMIN, "::noobme player_name", "Sets player_name (or self if empty) back to default stats") { player, args -> + define("noobme", Privilege.ADMIN, "::noobme ", "Sets (or self if empty) back to default stats") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define var index = 0 Skills.SKILL_NAME.forEach { diff --git a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt index 9ebd0ff36..2bfb64c9c 100644 --- a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt @@ -38,7 +38,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { * Force animation + messages on all NPCs in a radius of 10 from the player. * Add an optional 3rd argument if cycling through a range of animation ids. */ - define("npcanim", Privilege.ADMIN, "::npcanim Animation ID Optional: End Animation ID") { player, args -> + define("npcanim", Privilege.ADMIN, "::npcanim [end-animation-id]", "Makes nearby NPCs play , or loop that id up to .") { player, args -> if (args.size < 2) { reject(player, "Syntax error: ::npcanim ") } @@ -150,14 +150,14 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { /** * Opens up the makeover interface */ - define("makeover", Privilege.MODERATOR){ player, _ -> + define("makeover", Privilege.MODERATOR, description = "Opens the makeover interface for your character."){ player, _ -> CharacterDesign.open(player) } /** * Copies your current appearance and equipment as JSON to the clipboard */ - define("dumpappearance", Privilege.MODERATOR){ player, _ -> + define("dumpappearance", Privilege.MODERATOR, description = "Copies your appearance and equipment as JSON to the clipboard."){ player, _ -> val json = JSONObject() PlayerSaver(player).saveAppearance(json) val equipJson = PlayerSaver(player).saveContainer(player.equipment) @@ -175,7 +175,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { /** * Bury inventory at current location */ - define("bury"){player, _ -> + define("bury", description = "Buries your entire inventory at your current location."){player, _ -> if(player.inventory.isEmpty){ reject(player, "You have no items to bury.") } @@ -203,7 +203,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { * Cast a weakened version of ice barrage on nearby players within the defined radius. * This spell will never kill or freeze a player */ - define("barrage", Privilege.ADMIN, "::barrage radius ", "Cast a weak barrage on all nearby players. Will never kill players") { player, args -> + define("barrage", Privilege.ADMIN, "::barrage ", "Cast a weak Ice Barrage on all nearby players. Will never kill players") { player, args -> if (args.size != 2) reject(player, "Usage: ::barrage radius[max = 50]") val radius = if (args[1].toInt() > 50) 50 else args[1].toInt() @@ -224,7 +224,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { * 1 = Normal hunger/growth mode (1x speed) * 2 = Dev hunger/growth mode (100x speed) */ - define("petrate", Privilege.ADMIN, "petrate 0-2", "Sets pet hunger and growth to off, normal, or dev."){ player, args -> + define("petrate", Privilege.ADMIN, "::petrate 0-2", "Sets pet hunger and growth to off, normal, or dev."){ player, args -> if(args.size < 2) { notify(player, "Pet mode is currently ${player.getAttribute("petrate", 1)}") return@define diff --git a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt index 44348e1b2..54ad6ef1d 100644 --- a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt @@ -70,11 +70,11 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } } - define("anmacs", Privilege.ADMIN) { player, _ -> + define("anmacs", Privilege.ADMIN, description = "Starts the AnmaCutscene sequence for testing.") { player, _ -> AnmaCutscene(player).start() } - define("setsaveversion", Privilege.ADMIN) { player, args -> + define("setsaveversion", Privilege.ADMIN, "::setsaveversion ", "Overrides your save version to so migration logic can run.") { player, args -> try{ player.version = args[1].toInt() notify(player, "Setting save version to ${player.version}") @@ -123,7 +123,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ notify(player, "Do you mean ::loc?") } - define("calcmaxhit", Privilege.STANDARD, "", "Calculates and shows you your current max hit.") { player, _ -> + define("calcmaxhit", Privilege.STANDARD, description = "Calculates and prints your current maximum hit.") { player, _ -> val swingHandler = player.getSwingHandler(false) val hit = swingHandler.calculateHit(player, player, 1.0) notify(player, "max hit: ${hit} (${(swingHandler as Object).getClass().getName()})") @@ -133,7 +133,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ * Empty a player's inventory * ADMIN only (for obvious reasons) */ - define("empty", Privilege.ADMIN, "", "Empties your inventory."){player,_-> + define("empty", Privilege.ADMIN, "", "Empties/clears your inventory."){player,_-> player.inventory.clear() player.inventory.refresh() } @@ -392,7 +392,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ permadeath(target) } - define("log", Privilege.ADMIN){player,_ -> + define("log", Privilege.ADMIN, description = "Adds your current coordinates to the location log buffer."){player,_ -> var log: ArrayList? = player.getAttribute("loc-log") log = log ?: ArrayList() val locString = "{${player.location.x},${player.location.y},${player.location.z},1,0}" @@ -400,7 +400,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ player.setAttribute("loc-log",log) } - define("logdone"){player,_ -> + define("logdone", description = "Copies the queued location log to your clipboard and clears it."){player,_ -> val log: ArrayList? = player.getAttribute("loc-log") log ?: return@define @@ -429,18 +429,18 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ TrawlerLoot.addLootAndMessage(player, player.skills.getLevel(Skills.FISHING), rolls, false) } - define("fillbank", Privilege.ADMIN, "", "Right as it says on the tin."){player,_ -> + define("fillbank", Privilege.ADMIN, description = "Fills your bank with sequential item IDs."){player,_ -> for(i in 0 until ServerConstants.BANK_SIZE){ player.bank.add(Item(i)) } } - define("emptybank", Privilege.ADMIN, "", "Right as it says on the tin."){player,_ -> + define("emptybank", Privilege.ADMIN, description = "Clears your bank contents."){player,_ -> player.bank.clear() player.bank.update() } - define("setconfig", Privilege.ADMIN, "", "DEPRECATED: Use setvarp or setvarbit."){player,args -> + define("setconfig", Privilege.ADMIN, "::setconfig ", "DEPRECATED: use ::setvarp or ::setvarbit. Sets the raw varp to ."){player,args -> if(args.size < 3){ reject(player,"Syntax: ::setconfig configID value") } @@ -449,7 +449,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ setVarp(player, configID, configValue) } - define("getobjectvarp"){player,args -> + define("getobjectvarp", usage = "::getobjectvarp ", description = "Looks up which varp controls the state of ."){player,args -> if(args.size < 2){ reject(player,"Syntax: ::getobjectvarp objectid") } @@ -457,7 +457,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ notify(player, "${VarbitDefinition.forObjectID(SceneryDefinition.forId(objectID).varbitID).varpId}") } - define("define_varbit", Privilege.ADMIN, "::define_varbit VARBIT ID", "Prints information about the given varbit."){ player, args -> + define("define_varbit", Privilege.ADMIN, "::define_varbit ", "Prints detailed information about ."){ player, args -> if(args.size < 2) { reject(player, "Syntax: ::define_varbit varbitId") } @@ -466,16 +466,16 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } - define("setvarbit", Privilege.ADMIN, "::setvarbit VARBIT ID VALUE", ""){ + define("setvarbit", Privilege.ADMIN, "::setvarbit ", "Sets to for your player."){ player,args -> if(args.size != 3){ - reject(player,"Usage: ::setvarbit varbit value") + reject(player,"Usage: ::setvarbit ") } val index = args[1].toIntOrNull() val value = args[2].toIntOrNull() if(index == null || value == null){ - reject(player,"Usage ::setvarbit index offset value") + reject(player,"Usage ::setvarbit ") } setVarbit(player, index!!, value!!) @@ -484,7 +484,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ define("setvarbits", Privilege.ADMIN, "::setvarbits FROM VARBIT ID TO VARBIT ID VALUE", ""){ player,args -> if(args.size != 4){ - reject(player,"Usage: ::setvarbits fromvarbit tovarbit value") + reject(player,"Usage: ::setvarbits ") } val fromIndex = args[1].toIntOrNull()!! val toIndex = args[2].toIntOrNull()!! @@ -495,10 +495,10 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } } - define("getvarbit", Privilege.ADMIN, "::getvarbit VARBIT ID", "") { + define("getvarbit", Privilege.ADMIN, "::getvarbit VARBIT ID", "Prints the current value of VARBIT ID.") { player, args -> if (args.size != 2) - reject(player, "Usage: ::getvarbit id") + reject(player, "Usage: ::getvarbit ") val index = args[1].toIntOrNull() ?: return@define notify(player, "Varbit $index: Currently ${getVarbit(player, index)}") } @@ -564,11 +564,11 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ state.run(player) } - define("addcredits", Privilege.ADMIN){ player, _ -> + define("addcredits", Privilege.ADMIN, description = "Adds 100 ::shop credits to your account."){ player, _ -> player.details.credits += 100 } - define("getnpcparent"){player,args -> + define("getnpcparent", usage = "::getnpcparent ", description = "Finds the parent NPC whose child list includes ."){player,args -> if(args.size < 2){ reject(player,"Usage: ::getnpcparent npcid") } @@ -589,7 +589,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ notify(player,"No parent NPC found.") } } - define("infinitespecial", Privilege.ADMIN){ player, args -> + define("infinitespecial", Privilege.ADMIN, "::infinitespecial ", "Turns the infinite special-attack flag on or off for your player."){ player, args -> val usageStr = "Usage: ::infinitespecial true|false" if(args.size < 2){ reject(player, usageStr) diff --git a/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt b/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt index 0d9074356..f5b22a4dd 100644 --- a/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt @@ -84,7 +84,7 @@ class ModelViewerCommandSet : CommandSet(Privilege.ADMIN) { } } override fun defineCommands() { - define("models"){ player, args -> + define("models", description = "Opens the in-game model viewer toolkit."){ player, args -> // Bad number of args if(args.size > 2){ @@ -96,4 +96,4 @@ class ModelViewerCommandSet : CommandSet(Privilege.ADMIN) { return@define } } -} \ No newline at end of file +} diff --git a/Server/src/main/core/game/system/command/sets/ModerationCommandSet.kt b/Server/src/main/core/game/system/command/sets/ModerationCommandSet.kt index 13d0d9e79..8fd7550ef 100644 --- a/Server/src/main/core/game/system/command/sets/ModerationCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/ModerationCommandSet.kt @@ -37,7 +37,7 @@ class ModerationCommandSet : CommandSet(Privilege.MODERATOR){ * Kick a player * ============================================================================================================= */ - define("kick", Privilege.MODERATOR){ player, args -> + define("kick", Privilege.MODERATOR, "::kick ", "Disconnects the specified player from the game."){ player, args -> val playerToKick: Player? = Repository.getPlayerByName(args[1]) if (playerToKick != null) { playerToKick.clear() diff --git a/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt b/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt index fa25eb4b5..d43c74a32 100644 --- a/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt @@ -18,7 +18,7 @@ class PlayerAttributeCommandSet : CommandSet(Privilege.ADMIN) { /** * Gets the value of an attribute on a player. */ - define("getattribute") { player, args -> + define("getattribute", usage = "::getattribute [player] ", description = "Prints the value of the chosen attribute on you or another player. Omit [player] to use on self.") { player, args -> if (args.size < 2) { reject(player, "Usage ::getattribute [playername] attributename") } @@ -48,7 +48,7 @@ class PlayerAttributeCommandSet : CommandSet(Privilege.ADMIN) { /** * Sets the value of an attribute on a player. */ - define("setattribute") { player, args -> + define("setattribute", usage = "::setattribute [player] ", description = "Sets a simple attribute on you or another player.") { player, args -> if (args.size < 2) { reject(player, "Usage ::setattribute [playername] attributename value") } diff --git a/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt b/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt index 69ae5c1c5..8f0c40ce7 100644 --- a/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt @@ -13,7 +13,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){ /** * Completes all quests */ - define("allquest"){player,_-> + define("allquest", description = "Instantly completes every quest for your account."){player,_-> for (quest in QuestRepository.getQuests().values) { quest.finish(player) } @@ -22,7 +22,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){ /** * Displays the currently implemented quests with debug information */ - define("quest"){player,args -> + define("quest", usage = "::quest [player-name]", description = "Shows quest stages for you, or for [player-name] if provided."){player,args -> if (args.size < 3) { val lookupP = if (args.size == 1) { player @@ -41,7 +41,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets stage of quest */ - define("setqueststage"){player,args -> + define("setqueststage", usage = "::setqueststage ", description = "Sets quest to stage ; use ::quest to find indices."){player,args -> if (args.size < 3) { reject(player,"You must specify the index# of a quest, and a stage number") } @@ -64,7 +64,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){ /** * Displays the currently implemented quests */ - define("quests", Privilege.STANDARD){ player, _ -> + define("quests", Privilege.STANDARD, description = "Opens the quests interface listing current implementations."){ player, _ -> sendQuests(player) } } diff --git a/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt b/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt index 9be1e0626..589eade7e 100644 --- a/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt @@ -15,7 +15,7 @@ class SlayerCommandSet : CommandSet(Privilege.ADMIN){ /** * Finishes a player's slayer task (the correct way) */ - define("finishtask"){player,_ -> + define("finishtask", description = "Spawns a finisher NPC so your current Slayer task ends instantly."){player,_ -> notify(player, "Kill the npc that spawned to finish your task.") SlayerManager.getInstance(player).amount = 1 val finisher = NPC(SlayerManager.getInstance(player).task?.npcs?.get(0) ?: 0, player.location) @@ -26,7 +26,7 @@ class SlayerCommandSet : CommandSet(Privilege.ADMIN){ /** * Set slayer points */ - define("setslayerpoints"){player,args -> + define("setslayerpoints", usage = "::setslayerpoints ", description = "Sets your Slayer points total to ."){player,args -> if(args.size < 2){ reject(player,"Usage: ::setslayerpoints amount") } diff --git a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt index 331ecdbb4..04257542f 100644 --- a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt @@ -20,7 +20,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawns an npc with the given ID */ - define("npc"){player,args -> + define("npc", usage = "::npc [amount] [iswalks]", description = "Spawns one or more NPCs at your location, optionally letting them walk."){player,args -> if (args.size < 2) { reject(player, "syntax: id (required) amount (optional) isWalks (optional)") return@define @@ -61,7 +61,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawns an item with the given ID */ - define("item"){player,args -> + define("item", usage = "::item [amount]", description = "Spawns the specified item stack into your inventory."){player,args -> if (args.size < 2) { reject(player,"You must specify an item ID") return@define @@ -84,7 +84,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawn object with given ID at the player's location */ - define("object"){player,args -> + define("object", usage = "::object [type] [rotation]", description = "Spawns an object at your tile with optional type and rotation."){player,args -> if (args!!.size < 2) { reject(player,"syntax error: id (optional) type rotation or rotation") return@define @@ -94,7 +94,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ log(this::class.java, Log.FINE, "object = $`object`") } - define("objectgrid") { player, args -> + define("objectgrid", usage = "::objectgrid ", description = "Spawns a 10-wide grid cycling through the given object id range.") { player, args -> if(args!!.size != 5) { reject(player, "Usage: objectgrid beginId endId type rotation") return@define diff --git a/Server/src/main/core/game/system/command/sets/StatsCommandSet.kt b/Server/src/main/core/game/system/command/sets/StatsCommandSet.kt index b9b6e320c..ad8cf75da 100644 --- a/Server/src/main/core/game/system/command/sets/StatsCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/StatsCommandSet.kt @@ -167,7 +167,7 @@ class StatsCommandSet : CommandSet(Privilege.STANDARD) { } override fun defineCommands() { - define("stats"){ player, args -> + define("stats", usage = "::stats [player-name]", description = "Opens the statistics book for you or the specified player."){ player, args -> // Bad number of args if(args.size > 2){ diff --git a/Server/src/main/core/game/system/command/sets/SystemCommandSet.kt b/Server/src/main/core/game/system/command/sets/SystemCommandSet.kt index 2581bb4bb..d4e48ca9c 100644 --- a/Server/src/main/core/game/system/command/sets/SystemCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SystemCommandSet.kt @@ -20,7 +20,7 @@ class SystemCommandSet : CommandSet(Privilege.ADMIN) { /** * Start an update countdown */ - define("update") { player, args -> + define("update", usage = "::update [seconds]", description = "Flags the world for an update, optionally using [seconds] as the countdown.") { player, args -> if (args.size > 1) { SystemManager.getUpdater().setCountdown(args[1].toInt()) } @@ -30,7 +30,7 @@ class SystemCommandSet : CommandSet(Privilege.ADMIN) { /** * Cancel an update countdown */ - define("cancelupdate") { player, _ -> + define("cancelupdate", description = "Cancels any active update countdown.") { player, _ -> SystemManager.getUpdater().cancel() } @@ -230,7 +230,7 @@ class SystemCommandSet : CommandSet(Privilege.ADMIN) { player.inventory.add(Item(Items.ROTTEN_POTATO_5733)) } - define("shutdown", Privilege.ADMIN) { player, _ -> + define("shutdown", Privilege.ADMIN, description = "Immediately terminates the server process. Do NOT test on a remote server you don't own.") { player, _ -> exitProcess(0) } From 90917f9520167268f83a776523d5a4ad8d6b8dc9 Mon Sep 17 00:00:00 2001 From: Damighty <27978131-real_damighty@users.noreply.gitlab.com> Date: Mon, 24 Nov 2025 16:59:04 +0200 Subject: [PATCH 2/3] HTML required for symbols --- .../skill/magic/lunar/LunarListeners.kt | 2 +- .../handlers/revenants/RevenantController.kt | 2 +- Server/src/main/core/game/ge/GrandExchange.kt | 6 ++--- Server/src/main/core/game/shops/Shops.kt | 4 ++-- .../system/command/sets/AudioCommandSet.kt | 12 +++++----- .../system/command/sets/ConfigCommandSet.kt | 4 ++-- .../command/sets/DevelopmentCommandSet.kt | 22 +++++++++---------- .../game/system/command/sets/FunCommandSet.kt | 4 ++-- .../system/command/sets/MiscCommandSet.kt | 14 ++++++------ .../command/sets/PlayerAttributeCommandSet.kt | 4 ++-- .../system/command/sets/QuestCommandSet.kt | 2 +- .../system/command/sets/SlayerCommandSet.kt | 2 +- .../system/command/sets/SpawnCommandSet.kt | 8 +++---- 13 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt index 15e149a2f..1b38f4eca 100644 --- a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt +++ b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt @@ -815,7 +815,7 @@ class LunarListeners : SpellListener("lunar"), Commands { } override fun defineCommands() { - define("poison", privilege = Privilege.ADMIN, usage = "::poison ", description = "Applies poison to for initial damage.") { player, strings -> + define("poison", privilege = Privilege.ADMIN, usage = "::poison player damage", description = "Applies poison to player for damage initial damage.") { player, strings -> if(strings.size == 3) { val dmg = strings[2].toIntOrNull() val p = Repository.getPlayerByName(strings[1]) diff --git a/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt b/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt index 39f23265d..91a5831ba 100644 --- a/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt +++ b/Server/src/main/content/region/wilderness/handlers/revenants/RevenantController.kt @@ -87,7 +87,7 @@ class RevenantController : TickListener, Commands { } override fun defineCommands() { - define("setrevcap", Privilege.ADMIN, "::setrevcap ", "Sets revenant spawn cap to ") {player, strings -> + define("setrevcap", Privilege.ADMIN, "::setrevcap amount", "Sets revenant spawn cap to amount") {player, strings -> val amt = strings[1].toInt() expectedRevAmount = amt } diff --git a/Server/src/main/core/game/ge/GrandExchange.kt b/Server/src/main/core/game/ge/GrandExchange.kt index 0b857045e..03c01380a 100644 --- a/Server/src/main/core/game/ge/GrandExchange.kt +++ b/Server/src/main/core/game/ge/GrandExchange.kt @@ -80,20 +80,20 @@ class GrandExchange : StartupListener, Commands { } override fun defineCommands() { - define("addbotoffer", Privilege.ADMIN, "::addbotoffer ", "Adds a GE bot sell offer for the given item ID and amount.") {player, strings -> + define("addbotoffer", Privilege.ADMIN, "::addbotoffer item-id amount", "Adds a GE bot sell offer for the given item ID and amount.") {player, strings -> val id = strings[1].toInt() val amount = strings[2].toInt() addBotOffer(id, amount) notify(player, "Added ${amount}x ${getItemName(id)} to the bot offers.") } - define("bange", Privilege.ADMIN, "::bange ", "Bans/blacklists the specified item from GE trades.") {player, strings -> + define("bange", Privilege.ADMIN, "::bange item-id", "Bans/blacklists the specified item from GE trades.") {player, strings -> val id = strings[1].toInt() PriceIndex.banItem(id) notify(player, "Banned ${getItemName(id)} from GE trade.") } - define("allowge", Privilege.ADMIN, "::allowge ", "Allows/whitelists the specified item to be traded on the GE.") {player, strings -> + define("allowge", Privilege.ADMIN, "::allowge item-id", "Allows/whitelists the specified item to be traded on the GE.") {player, strings -> val id = strings[1].toInt() PriceIndex.allowItem(id) notify(player, "Allowed ${getItemName(id)} for GE trade.") diff --git a/Server/src/main/core/game/shops/Shops.kt b/Server/src/main/core/game/shops/Shops.kt index e85b40d64..b79b354f2 100644 --- a/Server/src/main/core/game/shops/Shops.kt +++ b/Server/src/main/core/game/shops/Shops.kt @@ -284,13 +284,13 @@ class Shops : StartupListener, TickListener, InteractionListener, InterfaceListe } override fun defineCommands() { - define("openshop", Privilege.ADMIN, "::openshop ", "Opens the shop interface for .") { player, args -> + define("openshop", Privilege.ADMIN, "::openshop shop-id", "Opens the shop interface for shop-id.") { player, args -> if(args.size < 2) reject(player, "Usage: ::openshop shopId") val shopId = args[1].toInt() shopsById[shopId]?.openFor(player) } - define("shopscript", usage = "::shopscript ", description = "Runs CS2 script 25 with string \"vg\" and objects \", 92\"") { player, args -> + define("shopscript", usage = "::shopscript object", description = "Runs CS2 script 25 with string \"vg\" and objects \"object, 92\"") { player, args -> val arg1 = args[1].toInt() player.packetDispatch.sendRunScript(25, "vg", arg1, 92) //Run CS2 script 25, with args 868? and 92(our container id) } diff --git a/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt b/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt index 695934332..70e797b0c 100644 --- a/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/AudioCommandSet.kt @@ -18,7 +18,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play a specific song */ - define("playsong", usage = "::playsong ", description = "Plays the music track ."){player,args -> + define("playsong", usage = "::playsong song-id", description = "Plays the music track song-id."){player,args -> if(args.size < 2){ reject(player,"Usage: ::playsong ") } @@ -32,7 +32,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play a specific jingle */ - define("playjingle", usage = "::playjingle ", description = "Plays the sound effect with ID ."){player,args -> + define("playjingle", usage = "::playjingle jingle-id", description = "Plays the sound effect with ID jingle-id."){player,args -> if(args.size < 2){ reject(player,"Usage: ::playjingle ") } @@ -49,7 +49,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ * this is mostly useful for custom tracks that aren't in the ingame * music player yet. */ - define("playid", usage = "::playid ", description = "Plays a music track by musicId instead of numeric music track ID."){player,arg -> + define("playid", usage = "::playid song-id", description = "Plays a music track by musicId instead of numeric music track ID."){player,arg -> if (arg.size < 2) reject(player, "Needs more args.") val id = arg[1].toIntOrNull() @@ -71,7 +71,7 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play an audio id */ - define("audio", Privilege.ADMIN, "::audio loops[optional]", "Plays audio by ID. Loopable with optional integer argument.") { player, args -> + define("audio", Privilege.ADMIN, "::audio id loops[optional]", "Plays audio by ID. Loopable with optional integer argument.") { player, args -> if (args.size < 2 || args.size > 3) reject(player, "Usage: ::audio loops[optional]") val id = args[1].toInt() @@ -81,9 +81,9 @@ class MusicCommandSet : CommandSet(Privilege.STANDARD){ /** * Command that lets you play an audio id globally by playername or coords */ - define("globalaudio", Privilege.ADMIN, "::globalaudio radius[max 15] location[ OR ]", "Play global audio by ID, radius, and location") { player, args -> + define("globalaudio", Privilege.ADMIN, "::globalaudio id radius[max 15] location[player name OR x y z]", "Play global audio by ID, radius, and location") { player, args -> if (args.size < 3) - reject(player, "Usage: ::globalaudio radius[max 15] location[ OR ]") + reject(player, "Usage: ::globalaudio id radius[max 15] location[player name OR x y z]") val loc = when (args.size) { 6 -> Location(args[3].toInt(),args[4].toInt(),args[5].toInt()) 4 -> Repository.getPlayerByName(args[3])?.location diff --git a/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt b/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt index 6ff2ad242..25398ebfa 100644 --- a/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/ConfigCommandSet.kt @@ -12,7 +12,7 @@ class ConfigCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets a range of configs to a maximum value */ - define("sconfigrange", usage = "::sconfigrange ", description = "Sets each varp from (inclusive) up to (exclusive) to Integer.MAX_VALUE."){player, args -> + define("sconfigrange", usage = "::sconfigrange start-id end-id", description = "Sets each varp from start-id (inclusive) up to end-id (exclusive) to Integer.MAX_VALUE."){player, args -> if (args.size < 3) { reject(player, "usage: sconfigrange idlo idhi") } @@ -27,7 +27,7 @@ class ConfigCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets a range of configs to 0 */ - define("sconfigrange0", usage = "::sconfigrange0 ", description = "Sets each varp from (inclusive) up to (exclusive) to 0."){player, args -> + define("sconfigrange0", usage = "::sconfigrange0 start-id end-id", description = "Sets each varp from start-id (inclusive) up to end-id (exclusive) to 0."){player, args -> if (args.size < 3) { reject(player, "usage: sconfigrange0 idlo idhi") } diff --git a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt index d3761c38f..eeb0b2372 100644 --- a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt @@ -106,14 +106,14 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { player.impactHandler.manualHit(player, player.skills.lifepoints, HitsplatType.NORMAL) } - define("struct", usage = "::struct ", description = "Logs the struct definition for the given cache id.") {player, args -> + define("struct", usage = "::struct struct-id", description = "Logs the struct definition for the given cache id.") {player, args -> val mapId = args[1].toIntOrNull() ?: return@define val def = Struct.get(mapId) log(this::class.java, Log.FINE, def.toString()) } - define("datamap", usage = "::datamap ", description = "Logs the data map definition for the given cache id.") {player, args -> + define("datamap", usage = "::datamap data-map-id", description = "Logs the data map definition for the given cache id.") {player, args -> val mapId = args[1].toIntOrNull() ?: return@define val def = DataMap.get(mapId) @@ -202,7 +202,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { PacketWriteQueue.write(ResetInterface(), PlayerContext(player)) } - define("npcsearch", Privilege.STANDARD, "::npcsearch ", "Searches for NPCs that match the name either in main or children.") {player, strings -> + define("npcsearch", Privilege.STANDARD, "::npcsearch name", "Searches for NPCs that match the name either in main or children.") {player, strings -> val name = strings.slice(1 until strings.size).joinToString(" ").lowercase() for (id in 0 until 9000) { val def = NPCDefinition.forId(id) @@ -220,7 +220,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("itemsearch", Privilege.STANDARD, "::itemsearch ", "Searches for items that match the name.") {player, args -> + define("itemsearch", Privilege.STANDARD, "::itemsearch name", "Searches for items that match the name.") {player, args -> val itemName = args.copyOfRange(1, args.size).joinToString(" ").lowercase() for (i in 0 until 15000) { val name = getItemName(i).lowercase() @@ -259,11 +259,11 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { setAttribute(player, "fmend", Location.create(player.location)) } - define ("fmspeed", Privilege.ADMIN, "::fmspeed ", "Sets the starting force-movement speed (ticks between steps) used by ::testfm.") {player, args -> + define ("fmspeed", Privilege.ADMIN, "::fmspeed start-speed", "Sets the starting force-movement speed (ticks between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeed", args[1].toIntOrNull() ?: 10) } - define ("fmspeedend", Privilege.ADMIN, "::fmspeedend ", "Sets the ending speed (ticks between steps) used by ::testfm.") {player, args -> + define ("fmspeedend", Privilege.ADMIN, "::fmspeedend end-speed", "Sets the ending speed (ticks between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeedend", args[1].toIntOrNull() ?: 10) } @@ -276,7 +276,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { forceMove(player, start, end, speed, speedEnd, anim = ani) } - define("fmanim", Privilege.ADMIN, "::fmanim ", "Sets the animation id to play during ::testfm.") {player, args -> + define("fmanim", Privilege.ADMIN, "::fmanim animation-id", "Sets the animation id to play during ::testfm.") {player, args -> setAttribute(player, "fmanim", args[1].toIntOrNull() ?: -1) } @@ -302,7 +302,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { } } - define("setpestpoints", Privilege.ADMIN, "::setpestpoints player_name[optional]", "Sets your (or s) Pest Control points to ") { player, args -> + define("setpestpoints", Privilege.ADMIN, "::setpestpoints points player_name[optional]", "Sets your (or player_names) Pest Control points to points") { player, args -> val target = getPlayerFromArgs(player, args, 2) ?: return@define val points = args[1].toIntOrNull() if (points == null) { @@ -311,7 +311,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { target.savedData.activityData.pestPoints = points!! } - define("makeadmin", Privilege.ADMIN, "::makeadmin ", "Permanently gives admin rights to player_name (or self if empty)") { player, args -> + define("makeadmin", Privilege.ADMIN, "::makeadmin player_name", "Permanently gives admin rights to player_name (or self if empty)") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define target.details.rights = Rights.ADMINISTRATOR sendMessage(player, "Gave admin rights to ${target.username}.") @@ -323,7 +323,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { sendMessage(player, "Dropped admin rights.") } - define("max", Privilege.ADMIN, "::max ", "Sets all skills to 99s for (or self if empty)") { player, args -> + define("max", Privilege.ADMIN, "::max player_name", "Sets all skills to 99s for player_name (or self if empty)") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define var index = 0 Skills.SKILL_NAME.forEach { @@ -334,7 +334,7 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { target.skills.updateCombatLevel() } - define("noobme", Privilege.ADMIN, "::noobme ", "Sets (or self if empty) back to default stats") { player, args -> + define("noobme", Privilege.ADMIN, "::noobme player_name", "Sets player_name (or self if empty) back to default stats") { player, args -> val target = getPlayerFromArgs(player, args, 1) ?: return@define var index = 0 Skills.SKILL_NAME.forEach { diff --git a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt index 2bfb64c9c..918fe488f 100644 --- a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt @@ -38,7 +38,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { * Force animation + messages on all NPCs in a radius of 10 from the player. * Add an optional 3rd argument if cycling through a range of animation ids. */ - define("npcanim", Privilege.ADMIN, "::npcanim [end-animation-id]", "Makes nearby NPCs play , or loop that id up to .") { player, args -> + define("npcanim", Privilege.ADMIN, "::npcanim animation-id [end-animation-id]", "Makes nearby NPCs play animation-id, or loop that id up to end-animation-id.") { player, args -> if (args.size < 2) { reject(player, "Syntax error: ::npcanim ") } @@ -203,7 +203,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { * Cast a weakened version of ice barrage on nearby players within the defined radius. * This spell will never kill or freeze a player */ - define("barrage", Privilege.ADMIN, "::barrage ", "Cast a weak Ice Barrage on all nearby players. Will never kill players") { player, args -> + define("barrage", Privilege.ADMIN, "::barrage radius", "Cast a weak Ice Barrage on all nearby players. Will never kill players") { player, args -> if (args.size != 2) reject(player, "Usage: ::barrage radius[max = 50]") val radius = if (args[1].toInt() > 50) 50 else args[1].toInt() diff --git a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt index 54ad6ef1d..153fde450 100644 --- a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt @@ -74,7 +74,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ AnmaCutscene(player).start() } - define("setsaveversion", Privilege.ADMIN, "::setsaveversion ", "Overrides your save version to so migration logic can run.") { player, args -> + define("setsaveversion", Privilege.ADMIN, "::setsaveversion version", "Overrides your save version to version so migration logic can run.") { player, args -> try{ player.version = args[1].toInt() notify(player, "Setting save version to ${player.version}") @@ -440,7 +440,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ player.bank.update() } - define("setconfig", Privilege.ADMIN, "::setconfig ", "DEPRECATED: use ::setvarp or ::setvarbit. Sets the raw varp to ."){player,args -> + define("setconfig", Privilege.ADMIN, "::setconfig config-id value", "DEPRECATED: use ::setvarp or ::setvarbit. Sets the raw varp config-id to value."){player,args -> if(args.size < 3){ reject(player,"Syntax: ::setconfig configID value") } @@ -449,7 +449,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ setVarp(player, configID, configValue) } - define("getobjectvarp", usage = "::getobjectvarp ", description = "Looks up which varp controls the state of ."){player,args -> + define("getobjectvarp", usage = "::getobjectvarp object-id", description = "Looks up which varp controls the state of object-id."){player,args -> if(args.size < 2){ reject(player,"Syntax: ::getobjectvarp objectid") } @@ -466,7 +466,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } - define("setvarbit", Privilege.ADMIN, "::setvarbit ", "Sets to for your player."){ + define("setvarbit", Privilege.ADMIN, "::setvarbit varbit-id value", "Sets varbit-id to value for your player."){ player,args -> if(args.size != 3){ reject(player,"Usage: ::setvarbit ") @@ -568,7 +568,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ player.details.credits += 100 } - define("getnpcparent", usage = "::getnpcparent ", description = "Finds the parent NPC whose child list includes ."){player,args -> + define("getnpcparent", usage = "::getnpcparent npc-id", description = "Finds the parent NPC whose child list includes npc-id."){player,args -> if(args.size < 2){ reject(player,"Usage: ::getnpcparent npcid") } @@ -641,7 +641,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } } - define("setplayerstrong", Privilege.ADMIN, "setplayerstrong <0-4>", + define("setplayerstrong", Privilege.ADMIN, "setplayerstrong 0-4", "Set the player progress through the Stronghold of Player Safety test."){player, args -> /* * 0 = Not started @@ -680,7 +680,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } } - define("setplaqueread", Privilege.ADMIN, "setplaqueread ", + define("setplaqueread", Privilege.ADMIN, "setplaqueread true/false", "Set the plaques in the player safety stronghold to read or not read."){player, args -> if (args.size == 1) { notify( diff --git a/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt b/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt index d43c74a32..e168c7a1e 100644 --- a/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/PlayerAttributeCommandSet.kt @@ -18,7 +18,7 @@ class PlayerAttributeCommandSet : CommandSet(Privilege.ADMIN) { /** * Gets the value of an attribute on a player. */ - define("getattribute", usage = "::getattribute [player] ", description = "Prints the value of the chosen attribute on you or another player. Omit [player] to use on self.") { player, args -> + define("getattribute", usage = "::getattribute [player] attribute", description = "Prints the value of the chosen attribute on you or another player. Omit [player] to use on self.") { player, args -> if (args.size < 2) { reject(player, "Usage ::getattribute [playername] attributename") } @@ -48,7 +48,7 @@ class PlayerAttributeCommandSet : CommandSet(Privilege.ADMIN) { /** * Sets the value of an attribute on a player. */ - define("setattribute", usage = "::setattribute [player] ", description = "Sets a simple attribute on you or another player.") { player, args -> + define("setattribute", usage = "::setattribute [player] attribute value", description = "Sets a simple attribute on you or another player.") { player, args -> if (args.size < 2) { reject(player, "Usage ::setattribute [playername] attributename value") } diff --git a/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt b/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt index 8f0c40ce7..277c841b1 100644 --- a/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/QuestCommandSet.kt @@ -41,7 +41,7 @@ class QuestCommandSet : CommandSet(Privilege.ADMIN){ /** * Sets stage of quest */ - define("setqueststage", usage = "::setqueststage ", description = "Sets quest to stage ; use ::quest to find indices."){player,args -> + define("setqueststage", usage = "::setqueststage quest-index stage", description = "Sets quest quest-index to stage stage; use ::quest to find indices."){player,args -> if (args.size < 3) { reject(player,"You must specify the index# of a quest, and a stage number") } diff --git a/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt b/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt index 589eade7e..0f2e32426 100644 --- a/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SlayerCommandSet.kt @@ -26,7 +26,7 @@ class SlayerCommandSet : CommandSet(Privilege.ADMIN){ /** * Set slayer points */ - define("setslayerpoints", usage = "::setslayerpoints ", description = "Sets your Slayer points total to ."){player,args -> + define("setslayerpoints", usage = "::setslayerpoints amount", description = "Sets your Slayer points total to amount."){player,args -> if(args.size < 2){ reject(player,"Usage: ::setslayerpoints amount") } diff --git a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt index 04257542f..de41b11a8 100644 --- a/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/SpawnCommandSet.kt @@ -20,7 +20,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawns an npc with the given ID */ - define("npc", usage = "::npc [amount] [iswalks]", description = "Spawns one or more NPCs at your location, optionally letting them walk."){player,args -> + define("npc", usage = "::npc npc-id [amount] [iswalks]", description = "Spawns one or more NPCs at your location, optionally letting them walk."){player,args -> if (args.size < 2) { reject(player, "syntax: id (required) amount (optional) isWalks (optional)") return@define @@ -61,7 +61,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawns an item with the given ID */ - define("item", usage = "::item [amount]", description = "Spawns the specified item stack into your inventory."){player,args -> + define("item", usage = "::item item-id [amount]", description = "Spawns the specified item stack into your inventory."){player,args -> if (args.size < 2) { reject(player,"You must specify an item ID") return@define @@ -84,7 +84,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ /** * Spawn object with given ID at the player's location */ - define("object", usage = "::object [type] [rotation]", description = "Spawns an object at your tile with optional type and rotation."){player,args -> + define("object", usage = "::object object-id [type] [rotation]", description = "Spawns an object at your tile with optional type and rotation."){player,args -> if (args!!.size < 2) { reject(player,"syntax error: id (optional) type rotation or rotation") return@define @@ -94,7 +94,7 @@ class SpawnCommandSet : CommandSet(Privilege.ADMIN){ log(this::class.java, Log.FINE, "object = $`object`") } - define("objectgrid", usage = "::objectgrid ", description = "Spawns a 10-wide grid cycling through the given object id range.") { player, args -> + define("objectgrid", usage = "::objectgrid start-id end-id type rotation", description = "Spawns a 10-wide grid cycling through the given object id range.") { player, args -> if(args!!.size != 5) { reject(player, "Usage: objectgrid beginId endId type rotation") return@define From b476ae252f728a9e3c6a5074527f9688136fa725 Mon Sep 17 00:00:00 2001 From: Damighty <27978131-real_damighty@users.noreply.gitlab.com> Date: Sun, 30 Nov 2025 15:49:17 +0200 Subject: [PATCH 3/3] Corrected time unit for ::fmspeed ::fmspeedend descriptions --- .../core/game/system/command/sets/DevelopmentCommandSet.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt index eeb0b2372..5c91ef09f 100644 --- a/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/DevelopmentCommandSet.kt @@ -259,11 +259,11 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) { setAttribute(player, "fmend", Location.create(player.location)) } - define ("fmspeed", Privilege.ADMIN, "::fmspeed start-speed", "Sets the starting force-movement speed (ticks between steps) used by ::testfm.") {player, args -> + define ("fmspeed", Privilege.ADMIN, "::fmspeed start-speed", "Sets the starting force-movement speed (client cycles between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeed", args[1].toIntOrNull() ?: 10) } - define ("fmspeedend", Privilege.ADMIN, "::fmspeedend end-speed", "Sets the ending speed (ticks between steps) used by ::testfm.") {player, args -> + define ("fmspeedend", Privilege.ADMIN, "::fmspeedend end-speed", "Sets the ending speed (client cycles between steps) used by ::testfm.") {player, args -> setAttribute(player, "fmspeedend", args[1].toIntOrNull() ?: 10) }