From eabf55e5638339270f3e468f06a7449e2042625f Mon Sep 17 00:00:00 2001
From: anima
Date: Thu, 12 Nov 2026 22:13:20 +0100
Subject: [PATCH] add auto stand
---
js/09.merchant.js | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/js/09.merchant.js b/js/09.merchant.js
index 05ee7bf..1ed3091 100644
--- a/js/09.merchant.js
+++ b/js/09.merchant.js
@@ -1,2 +1,31 @@
load_code('general')
-load_code('items')
\ No newline at end of file
+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);
+}
\ No newline at end of file