diff options
author | gumi <git@gumi.ca> | 2018-03-25 15:20:54 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-03-25 15:20:54 -0400 |
commit | c096abdf9802171570b7ae961a6abbfc8aad68bf (patch) | |
tree | 8a86248be1960a93eb8f209432682312f5b55fdd /npc/functions/doors.txt | |
parent | a595cedb07e4306b3b44e5f8f05a0c26f3c4ad75 (diff) | |
download | serverdata-c096abdf9802171570b7ae961a6abbfc8aad68bf.tar.gz serverdata-c096abdf9802171570b7ae961a6abbfc8aad68bf.tar.bz2 serverdata-c096abdf9802171570b7ae961a6abbfc8aad68bf.tar.xz serverdata-c096abdf9802171570b7ae961a6abbfc8aad68bf.zip |
don't allow to open doors from behind
Diffstat (limited to 'npc/functions/doors.txt')
-rw-r--r-- | npc/functions/doors.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/functions/doors.txt b/npc/functions/doors.txt index c1b6565e..4cca24e3 100644 --- a/npc/functions/doors.txt +++ b/npc/functions/doors.txt @@ -7,6 +7,10 @@ // none function script doorTouch { + getmapxy(.@pc_map$, .@pc_x, .@pc_y, UNITTYPE_PC); // get char location + if (.@pc_y < .y) + end; + if (getareausers() <= 1) { .dir = 2; @@ -17,6 +21,9 @@ function script doorTouch { } function script doorUnTouch { + if (.dir != 2 && .dir != 6) + end; + if (getareausers(.map$) == 0) { .dir = 4; |