diff options
author | omatt <m.vuoso@laposte.net> | 2016-12-19 21:53:15 +0100 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-01-06 14:07:57 -0500 |
commit | 5effe0983f93103370624e82bfc0879e611dd18d (patch) | |
tree | 97a94cccc5701b4d8addc770635f2999a135758f /npc/001-2-22/chest.txt | |
parent | ab6b97f77856f638a8efa210c1b6869c909c988f (diff) | |
download | serverdata-5effe0983f93103370624e82bfc0879e611dd18d.tar.gz serverdata-5effe0983f93103370624e82bfc0879e611dd18d.tar.bz2 serverdata-5effe0983f93103370624e82bfc0879e611dd18d.tar.xz serverdata-5effe0983f93103370624e82bfc0879e611dd18d.zip |
add a delay on close/open chest
Diffstat (limited to 'npc/001-2-22/chest.txt')
-rw-r--r-- | npc/001-2-22/chest.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt index e20a00da..8cab6cf8 100644 --- a/npc/001-2-22/chest.txt +++ b/npc/001-2-22/chest.txt @@ -2,27 +2,29 @@ // Authors: // 4144 // Reid +// gumi // Description: // A box with clothes for new players. 001-2-22,51,37,0 script Chest#Artis NPC_CHEST_BIG,{ - .dir = 2; - initnpctimer; - startnpctimer; - close; + if (.busy == false) + { + misceffect .dir == 0 ? 24 : 25; // closed ? opening : closing + .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing + .busy = true; // lock until available again + initnpctimer; + } + end; OnTimer220: - stopnpctimer; - if (.dir == 2) .dir = 4; - if (.dir == 6) .dir = 0; + .dir = .dir == 6 ? 0 : 4; // closing ? closed : open end; -L_Quit: - .dir = 6; - initnpctimer; - startnpctimer; - close; +OnTimer500: + stopnpctimer; + .busy = false; // unlock + end; OnInit: .distance = 2; |