From 2103f66304011d5e00fc762fb66126e12dce1abb Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Sat, 17 Feb 2024 09:33:06 -0500 Subject: [PATCH] Update functions.js to add toggle_merchant --- js/functions.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/functions.js b/js/functions.js index 003e149..5cc9d96 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2848,6 +2848,15 @@ function close_merchant() return push_deferred("merchant"); } +function toggle_merchant(num) { + if(character.stand) { + socket.emit("merchant",{close:1}); + } else { + socket.emit("merchant",{num:num}); + } + return push_deferred("merchant"); +} + function donate(gold) { if(gold===undefined)