31 lines
702 B
JavaScript
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);
|
|
} |