kill-switch-mcp 1.1.7 → 1.1.8

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.
@@ -35,7 +35,7 @@ export default async function fightLoop(bot: any, sdk: any, opts: any = {}) {
35
35
  const state = sdk.getState();
36
36
  if (!state) { await sdk.waitForTicks(1); continue; }
37
37
 
38
- const hp = state.player.hitpoints;
38
+ const hp = state.player.hp;
39
39
  const players = sdk.getNearbyPlayers();
40
40
 
41
41
  // Bail signal: low food + outnumbered
@@ -43,7 +43,7 @@ export default async function fightLoop(bot: any, sdk: any, opts: any = {}) {
43
43
  if (foodCount <= fleeAt && players.length > 1) {
44
44
  return {
45
45
  hp,
46
- maxHp: state.player.hitpointsBase ?? 0,
46
+ maxHp: state.player.maxHp ?? 0,
47
47
  foodLeft: foodCount,
48
48
  target: lastTarget,
49
49
  nearbyPlayers: players,
@@ -92,8 +92,8 @@ export default async function fightLoop(bot: any, sdk: any, opts: any = {}) {
92
92
  // Return status
93
93
  const finalState = sdk.getState();
94
94
  return {
95
- hp: finalState?.player?.hitpoints ?? 0,
96
- maxHp: finalState?.player?.hitpointsBase ?? 0,
95
+ hp: finalState?.player?.hp ?? 0,
96
+ maxHp: finalState?.player?.maxHp ?? 0,
97
97
  foodLeft: countFood(sdk),
98
98
  target: lastTarget,
99
99
  nearbyPlayers: sdk.getNearbyPlayers(),
@@ -27,7 +27,7 @@ export default async function kite(bot: any, sdk: any, opts: any = {}) {
27
27
  const state = sdk.getState();
28
28
  if (!state) { await sdk.waitForTicks(1); continue; }
29
29
 
30
- const hp = state.player.hitpoints;
30
+ const hp = state.player.hp;
31
31
 
32
32
  // Check if we've healed enough
33
33
  if (hp >= safeHp) {
@@ -82,7 +82,7 @@ export default async function kite(bot: any, sdk: any, opts: any = {}) {
82
82
  await sdk.waitForTicks(2);
83
83
  }
84
84
 
85
- const finalHp = sdk.getState()?.player?.hitpoints ?? 0;
85
+ const finalHp = sdk.getState()?.player?.hp ?? 0;
86
86
  return { hp: finalHp, foodLeft: countFood(sdk), escaped: finalHp >= safeHp };
87
87
  }
88
88
 
package/dist/server.js CHANGED
@@ -4113,12 +4113,13 @@ execute it by sending code to the game via execute_code.
4113
4113
  - sdk.sendWalk(x, z) — click a tile to walk there (fast, no pathfinding)
4114
4114
  - sdk.getState() — full game state object
4115
4115
  - sdk.getState().player.worldX / .worldZ — your position
4116
- - sdk.getState().player.hitpoints — your current HP
4117
- - sdk.getState().player.hitpointsBase — your max HP
4116
+ - sdk.getState().player.hp — your current HP
4117
+ - sdk.getState().player.maxHp — your max HP
4118
4118
  - sdk.getInventory() — array of inventory items (each has .name)
4119
4119
  - sdk.getEquipment() — array of equipment items
4120
4120
  - sdk.findInventoryItem(/pattern/i) — find item in inventory
4121
- - sdk.findGroundItem(/pattern/i) — find item on ground nearby
4121
+ - sdk.findGroundItem(/pattern/i) — find item on ground (returns { name, x, z, distance } — NOT .worldX!)
4122
+ - sdk.getGroundItems() — all nearby ground items (each has .name, .x, .z, .distance, .id, .count)
4122
4123
  - sdk.getNearbyPlayers() — nearby players (each has .name, .combatLevel, .distance, .x, .z)
4123
4124
  - sdk.waitForTicks(n) — wait n game ticks (~0.6s each)
4124
4125
 
@@ -4169,7 +4170,7 @@ ${GAME_DESCRIPTION}`,
4169
4170
  - sdk: Low-level state/commands (sdk.getState(), sdk.sendWalk(x,z), sdk.getNearbyPlayers(), sdk.getInventory(), sdk.findGroundItem())
4170
4171
  - actions: Pre-built strategy functions from bot's actions/ directory (listed at login)
4171
4172
 
4172
- State object: sdk.getState().player.worldX, .worldZ, .hitpoints, .hitpointsBase
4173
+ State object: sdk.getState().player.worldX, .worldZ, .hp, .maxHp
4173
4174
  Movement: sdk.sendWalk(x, z) for quick moves, bot.walkTo(x, z) for pathfinding
4174
4175
  Timing: await sdk.waitForTicks(n) — each tick is ~0.6 seconds
4175
4176
 
@@ -4733,7 +4734,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
4733
4734
  "",
4734
4735
  `You've been teleported to Draynor Manor. The fight is ON!`,
4735
4736
  `Position: ${state.player.worldX}, ${state.player.worldZ}`,
4736
- `HP: ${state.player.hitpoints}/${state.player.hitpointsBase}`,
4737
+ `HP: ${state.player.hp}/${state.player.maxHp}`,
4737
4738
  "",
4738
4739
  `Nearby players: ${players.length > 0 ? players.map((p) => `${p.name} (CB ${p.combatLevel}, dist ${p.distance})`).join(", ") : "scanning..."}`,
4739
4740
  "",
@@ -4748,7 +4749,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
4748
4749
  "",
4749
4750
  "API REMINDERS:",
4750
4751
  "- sdk.sendWalk(x, z) for quick movement (NOT bot.walkTo for combat)",
4751
- "- sdk.getState().player.worldX / .worldZ / .hitpoints",
4752
+ "- sdk.getState().player.worldX / .worldZ / .hp",
4752
4753
  "- Blocking UI is auto-dismissed — do NOT call bot.dismissBlockingUI()"
4753
4754
  ];
4754
4755
  if (activeActionDescriptions.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kill-switch-mcp",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Kill Switch MCP Server — AI battle royale powered by Claude Code",
5
5
  "type": "module",
6
6
  "bin": {