kill-switch-mcp 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +35 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -4122,6 +4122,41 @@ Before writing any execute_code, read \`killswitch://sdk-reference\` for the com
|
|
|
4122
4122
|
|
|
4123
4123
|
---
|
|
4124
4124
|
|
|
4125
|
+
## CRITICAL: API Method Names
|
|
4126
|
+
|
|
4127
|
+
**DO NOT GUESS METHOD NAMES.** If you call a method that doesn't exist, you waste a turn. These are the ONLY methods available:
|
|
4128
|
+
|
|
4129
|
+
**\`bot\` methods (high-level, async, THROW on failure — use try/catch):**
|
|
4130
|
+
- \`bot.pickupItem(pattern)\` — walk to and pick up item (NOT bot.pickup, NOT bot.getGroundItems)
|
|
4131
|
+
- \`bot.equipItem(pattern)\` — equip from inventory (NOT bot.equip, NOT bot.wield, NOT bot.wear)
|
|
4132
|
+
- \`bot.eatFood(pattern)\` — eat food (ALWAYS pass a food name like "Lobster" — without a pattern it may try to eat non-food)
|
|
4133
|
+
- \`bot.attackPlayer(name)\` — attack a player (NOT bot.attack)
|
|
4134
|
+
- \`bot.walkTo(x, z)\` — pathfind walk (slow, can fail in arena — prefer sdk.sendWalk)
|
|
4135
|
+
- \`bot.interactLoc(name, option)\` — interact with object
|
|
4136
|
+
|
|
4137
|
+
**\`sdk\` methods (low-level, instant reads + async commands):**
|
|
4138
|
+
- \`sdk.getGroundItems()\` — ground items (NOT bot.getGroundItems, NOT bot.nearbyObjects)
|
|
4139
|
+
- \`sdk.getNearbyPlayers()\` — nearby players (NOT bot.nearbyPlayers)
|
|
4140
|
+
- \`sdk.getNearbyLocs()\` — nearby objects (NOT bot.nearbyObjects)
|
|
4141
|
+
- \`sdk.getInventory()\` — your inventory
|
|
4142
|
+
- \`sdk.getEquipment()\` — your equipment
|
|
4143
|
+
- \`sdk.sendWalk(x, z)\` — click-walk (fast, no pathfinding)
|
|
4144
|
+
- \`sdk.sendPickup(x, z, itemId)\` — raw pickup
|
|
4145
|
+
- \`sdk.waitForTicks(n)\` — wait n game ticks (~0.6s each)
|
|
4146
|
+
|
|
4147
|
+
**\`actions\` (pre-built strategies — USE THESE FIRST):**
|
|
4148
|
+
- \`actions.lootAndEquip()\` — grab + equip best gear
|
|
4149
|
+
- \`actions.fightLoop()\` — find and fight nearest player with auto-eat
|
|
4150
|
+
|
|
4151
|
+
**Common mistakes that WASTE TURNS:**
|
|
4152
|
+
- ❌ \`bot.equip()\` → ✅ \`bot.equipItem()\`
|
|
4153
|
+
- ❌ \`bot.pickup()\` → ✅ \`bot.pickupItem()\`
|
|
4154
|
+
- ❌ \`bot.nearbyObjects()\` → ✅ \`sdk.getNearbyLocs()\`
|
|
4155
|
+
- ❌ \`bot.getGroundItems()\` → ��� \`sdk.getGroundItems()\`
|
|
4156
|
+
- ❌ \`bot.eatFood()\` (no args) → ✅ \`bot.eatFood(/lobster|swordfish|salmon|trout|bread|meat/i)\`
|
|
4157
|
+
|
|
4158
|
+
---
|
|
4159
|
+
|
|
4125
4160
|
## Joining a Game
|
|
4126
4161
|
|
|
4127
4162
|
Call \`join_game\` with no arguments to see what's available:
|