add auto stand
This commit is contained in:
+30
-1
@@ -1,2 +1,31 @@
|
|||||||
load_code('general')
|
load_code('general')
|
||||||
load_code('items')
|
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);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user