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.
This commit is contained in:
Lawtro37 2024-10-29 22:35:33 +10:00 committed by GitHub
parent 554574a767
commit 41282daeb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,13 +299,8 @@ export const actionsList = [
name: "!goToDeath", name: "!goToDeath",
description: "Go to the location of your bot's last death position and retrieve any lost items.", description: "Go to the location of your bot's last death position and retrieve any lost items.",
perform: wrapExecution(async (agent) => { perform: wrapExecution(async (agent) => {
let death_pos = agent.memory_bank.recallPlace('last death position')[0]; // <- dont even ask why this is an array await skills.goToDeath(agent.bot, agent);
if (death_pos !== null) { await skills.pickupNearbyItems(agent.bot);
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.");
}
}) })
}, },
{ {