diff options
author | Reid <reidyaro@gmail.com> | 2015-10-20 16:02:50 +0200 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2015-10-20 16:02:50 +0200 |
commit | 74169f11e2801886041c078541c095d4a498c603 (patch) | |
tree | 390258ff2ce4130e18ac43432de2592de7c885ab | |
parent | 593a40195d1ea758a8e413e393f8c66b006adfd6 (diff) | |
download | serverdata-74169f11e2801886041c078541c095d4a498c603.tar.gz serverdata-74169f11e2801886041c078541c095d4a498c603.tar.bz2 serverdata-74169f11e2801886041c078541c095d4a498c603.tar.xz serverdata-74169f11e2801886041c078541c095d4a498c603.zip |
Add improved triggers based on the number of area users.
-rw-r--r-- | npc/001-2-33/triggers.txt | 72 |
1 files changed, 54 insertions, 18 deletions
diff --git a/npc/001-2-33/triggers.txt b/npc/001-2-33/triggers.txt index 98679531..c8131642 100644 --- a/npc/001-2-33/triggers.txt +++ b/npc/001-2-33/triggers.txt @@ -2,57 +2,93 @@ // Authors: // Reid // Description: -// Triggers for 001-2-33's masks. +// Artis Aemil's Legion triggers to add and remove masks. +// Functions -// Top triggers +function script artisALRemTopMask { + if (getareausers("001-2-33.gat", 23, 32, 45, 46) >= 1) + { + removemapmask "001-2-33", 4; + } + return 0; +} -001-2-33,26,35,0 script #leftTriggerRemoveTop NPC_HIDDEN,0,2,{ +function script artisALAddTopMask { + if (getareausers("001-2-33.gat", 23, 32, 45, 46) == 0) + { + addmapmask "001-2-33", 4; + } + return 0; +} + +function script artisALRemBotMask { + if ((getareausers("001-2-33.gat", 23, 27, 45, 31) >= 0) || + (getareausers("001-2-33.gat", 23, 32, 26, 38) >= 0) || + (getareausers("001-2-33.gat", 43, 32, 45, 38) >= 0)) + { + removemapmask "001-2-33", 8; + } + return 0; +} + +function script artisALAddBotMask { + if ((getareausers("001-2-33.gat", 23, 27, 45, 31) == 0) && + (getareausers("001-2-33.gat", 23, 32, 26, 38) == 0) && + (getareausers("001-2-33.gat", 43, 32, 45, 38) == 0)) + { + addmapmask "001-2-33", 8; + } + return 0; +} + +// Top triggers +001-2-33,26,35,0 script #001-2-33LeftRemTop NPC_HIDDEN,0,2,{ OnTouch: - removemapmask "001-2-33", 4; + artisALRemTopMask; close; } -001-2-33,27,35,0 script #leftTriggerAddTop NPC_HIDDEN,0,2,{ +001-2-33,27,35,0 script #001-2-33LeftAddTop NPC_HIDDEN,0,2,{ OnTouch: - addmapmask "001-2-33", 4; + artisALAddTopMask; close; } -001-2-33,42,35,0 script #rightTriggerRemoveTop NPC_HIDDEN,0,2,{ +001-2-33,42,35,0 script #001-2-33RightRemTop NPC_HIDDEN,0,2,{ OnTouch: - removemapmask "001-2-33", 4; + artisALRemTopMask; close; } -001-2-33,41,35,0 script #rightTriggerAddTop NPC_HIDDEN,0,2,{ +001-2-33,41,35,0 script #001-2-33RightAddTop NPC_HIDDEN,0,2,{ OnTouch: - addmapmask "001-2-33", 4; + artisALAddTopMask; close; } // Bottom triggers -001-2-33,25,32,0 script #leftTriggerRemoveBottom NPC_HIDDEN,1,0,{ +001-2-33,25,32,0 script #001-2-33LeftRemBot NPC_HIDDEN,1,0,{ OnTouch: - removemapmask "001-2-33", 8; + artisALAddTopMask; close; } -001-2-33,25,31,0 script #leftTriggerAddBottom NPC_HIDDEN,1,0,{ +001-2-33,25,31,0 script #001-2-33LeftAddBot NPC_HIDDEN,1,0,{ OnTouch: - addmapmask "001-2-33", 8; + artisALAddBotMask; close; } -001-2-33,43,32,0 script #rightTriggerRemoveBottom NPC_HIDDEN,1,0,{ +001-2-33,43,32,0 script #001-2-33RightRemBot NPC_HIDDEN,1,0,{ OnTouch: - removemapmask "001-2-33", 8; + artisALAddTopMask; close; } -001-2-33,43,31,0 script #rightTriggerAddBottom NPC_HIDDEN,1,0,{ +001-2-33,43,31,0 script #001-2-33RightAddBot NPC_HIDDEN,1,0,{ OnTouch: - addmapmask "001-2-33", 8; + artisALAddBotMask; close; } |