From 41282daeb22a30b97da60a5a76fc6324fae355a6 Mon Sep 17 00:00:00 2001 From: Lawtro37 <98205608+Lawtro37@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:35:33 +1000 Subject: [PATCH] modified "!goToDeath" to use new "goToDeath()" skill this feels more clean and the new skill fixes some bugs note: also added "pickupNearbyItems()" so it picks up its items after death. --- src/agent/commands/actions.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/agent/commands/actions.js b/src/agent/commands/actions.js index ffc61e4..8c6804f 100644 --- a/src/agent/commands/actions.js +++ b/src/agent/commands/actions.js @@ -299,13 +299,8 @@ export const actionsList = [ name: "!goToDeath", description: "Go to the location of your bot's last death position and retrieve any lost items.", perform: wrapExecution(async (agent) => { - let death_pos = agent.memory_bank.recallPlace('last death position')[0]; // <- dont even ask why this is an array - if (death_pos !== null) { - await skills.goToPosition(agent.bot, death_pos.x, death_pos.y, death_pos.z, 1); - console.log('going to death'); - } else { - skills.log(agent.bot, "No death location saved."); - } + await skills.goToDeath(agent.bot, agent); + await skills.pickupNearbyItems(agent.bot); }) }, {