diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-12-16 23:18:27 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-12-16 23:18:27 -0300 |
commit | 53f1b87a3906315be125559631d20c0a8e18baa5 (patch) | |
tree | 93e591b5eada672e304be6f0e611e6eb3cec9002 /npc/081-1/extra.txt | |
parent | 19033a122d0b5a06af2788d563be205138ba7f04 (diff) | |
download | serverdata-53f1b87a3906315be125559631d20c0a8e18baa5.tar.gz serverdata-53f1b87a3906315be125559631d20c0a8e18baa5.tar.bz2 serverdata-53f1b87a3906315be125559631d20c0a8e18baa5.tar.xz serverdata-53f1b87a3906315be125559631d20c0a8e18baa5.zip |
I suspect checkcell is doing a bad job, but I don't have much time to debug
Diffstat (limited to 'npc/081-1/extra.txt')
-rw-r--r-- | npc/081-1/extra.txt | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/npc/081-1/extra.txt b/npc/081-1/extra.txt index c39d5a22..4cf01650 100644 --- a/npc/081-1/extra.txt +++ b/npc/081-1/extra.txt @@ -157,8 +157,8 @@ OnInit: 081-2,90,288,0 script #X21ADMIN NPC_NO_SPRITE,{ - if (!is_admin()) end; if (instance_id() < 0) end; + if (!is_admin()) goto L_Auto; clear; do { @@ -188,6 +188,36 @@ OnInit: } while (@menu != 1); closeclientdialog; close; + +L_Auto: + /* Attempt to fix Candle state */ + if (!'XMAS21CANDLE) { + if (checkcell(getmap(), 105, 212, cell_chkpass)) + setcells getmap(), 103, 211, 107, 212, 1, "X21L1@"+X21ID(); + } else { + if (!checkcell(getmap(), 105, 212, cell_chkpass)) + delcells "X21L1@"+X21ID(); + } + + /* Attempt to fix Seeds state */ + if (!'XMAS21TREE) { + if (checkcell(getmap(), 127, 128, cell_chkpass)) + setcells getmap(), 124, 127, 131, 128, 1, "X21L2@"+X21ID(); + } else { + if (!checkcell(getmap(), 127, 128, cell_chkpass)) + delcells "X21L2@"+X21ID(); + } + + /* Attempt to fix Ambush state */ + if (!'XMAS21AMBUSH) { + if (checkcell(getmap(), 49, 72, cell_chkpass)) + setcells getmap(), 47, 71, 51, 72, 1, "X21L3@"+X21ID(); + } else { + if (!checkcell(getmap(), 49, 72, cell_chkpass)) + delcells "X21L3@"+X21ID(); + } + end; + OnInit: .distance=1; end; |