add auto stand

This commit is contained in:
2026-11-12 22:13:20 +01:00
parent 670e792803
commit eabf55e563
+29
View File
@@ -1,2 +1,31 @@
load_code('general')
load_code('items')
// =========================>
// config
// =========================>
// =========================>
// intervalls
// =========================>
setInterval( toggle_stand, 1000 )
// =========================>
// functions
// =========================>
async function toggle_stand() {
if (character.ctype !== "merchant") return;
if ( character.stand ) {
if ( is_moving(character) ) close_stand()
} else {
if ( ! is_moving(character) ) open_shop()
}
}
async function open_shop() {
if (character.ctype !== "merchant") return;
var slot = locate_item("stand0");
if (slot !== -1) return await open_stand(slot);
}