Files
al-code/js/09.merchant.js
2026-11-12 22:13:20 +01:00

31 lines
702 B
JavaScript

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);
}