diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-24 19:58:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-24 19:58:04 +0300 |
commit | 18f3a6355bd047befd41f29dc8405ac5de015dae (patch) | |
tree | 74f30eff2704c577189266ff8b4e1d9e79d70eba | |
parent | d1e64d28df4f5dd86b70ec4d392fc75b86b699ef (diff) | |
download | serverdata-18f3a6355bd047befd41f29dc8405ac5de015dae.tar.gz serverdata-18f3a6355bd047befd41f29dc8405ac5de015dae.tar.bz2 serverdata-18f3a6355bd047befd41f29dc8405ac5de015dae.tar.xz serverdata-18f3a6355bd047befd41f29dc8405ac5de015dae.zip |
Add script function addremovemapmask.
This function at same time add and remove some bits to map mask.
Example:
// add 4 and remove 8
addremovemapmask "test", 4, 8;
-rw-r--r-- | npc/functions/main.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 08d2a5a3..225dcb22 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -45,3 +45,8 @@ function script adddefaultskills { function script str { return "" + getarg(0); } + +function script addremovemapmask { + setmapmask getarg(0), (getmapmask(getarg(0)) | (getarg(1) + getarg(2))) ^ getarg(2); + return; +} |