mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-21 14:45:45 +02:00
cleaned up message sent to AI on death
reduced message length by removing confusing and unnecessary info such as what it had in its inventory. Added more direct and less confusable instruction to use the !goToDeath action.
This commit is contained in:
parent
e83f5051ce
commit
b8921c3520
1 changed files with 2 additions and 9 deletions
|
@ -266,15 +266,8 @@ export class Agent {
|
||||||
if (death_pos) {
|
if (death_pos) {
|
||||||
death_pos_text = `x: ${death_pos.x.toFixed(2)}, y: ${death_pos.y.toFixed(2)}, z: ${death_pos.x.toFixed(2)}`;
|
death_pos_text = `x: ${death_pos.x.toFixed(2)}, y: ${death_pos.y.toFixed(2)}, z: ${death_pos.x.toFixed(2)}`;
|
||||||
}
|
}
|
||||||
let inventory = this.bot.inventory.slots;
|
this.history.add('system', `You died at position ${death_pos_text || "unknown"} with the final message: '${message}'. Previous actions were stopped and you have since respawned.`);
|
||||||
let death_items = "";
|
this.handleMessage('system', `You died at position ${death_pos_text || "unknown"} with the final message: '${message}'. Previous actions were stopped and you have respawned. Notify the user and perform any necessary actions. use !goToDeath to return to death position. (this will automaticly take you to your death position and pick up your items)`);
|
||||||
for (let i=0; i<inventory.length; i++) {
|
|
||||||
if (inventory[i]) {
|
|
||||||
death_items += `${inventory[i].name} x${inventory[i].count}, `;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.history.add('system', `You died at position ${death_pos_text || "unknown"} with the final message: '${message}'. Previous actions were stopped and you have respawned. Notify the user and perform any necessary actions.`);
|
|
||||||
this.handleMessage('system', `You died at position ${death_pos_text || "unknown"} and droped the items ${death_items} at your death position with the final message: '${message}'. Previous actions were stopped and you have respawned. Notify the user and perform any necessary actions. you can retrieve your items by doing the action !goToDeath.`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.bot.on('idle', () => {
|
this.bot.on('idle', () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue