diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-01-20 02:46:20 +0000 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-01-20 02:46:20 +0000 |
commit | a7a421842af79b6aff03335401db5bca5f2e5284 (patch) | |
tree | 96f05618b8dc04bc19778d51482f85c6f4e94865 /npc/functions/main.txt | |
parent | c1be7bd1eab5b0c230001c369292abe757a7f32a (diff) | |
parent | 8875cef958add4b361300c1ba108d8bf1d7995d7 (diff) | |
download | serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.gz serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.bz2 serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.xz serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.zip |
Merge branch 'jesusalva/cleanup' into 'master'
Christmas 2021 Cleanup
See merge request themanaworld/evolved/serverdata!10
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 0b89ae72..c46f04d4 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -66,7 +66,7 @@ function script mesq { } function script g { - return Sex == 0 ? getarg(0) : getarg(1); + return Sex ? getarg(1) : getarg(0); } function script b { @@ -528,6 +528,19 @@ function script set_aggro { return; } +// Makes a monster passive +// unset_aggro( monster{, mode=MD_AGGRESSIVE} ) +function script unset_aggro { + .@m=getarg(0); + .@x=getarg(1, MD_AGGRESSIVE); + .@op=getunitdata(.@m, UDT_MODE); + if (.@op & .@x) { + .@op=.@op^.@x; + setunitdata(.@m, UDT_MODE, .@op); + } + return; +} + // Special function which makes a date as a number // numdate( - ) function script numdate { |