diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-10-17 12:25:58 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-10-17 12:25:58 -0300 |
commit | 189d41d88e229a7a1b5572d2dcdd95818703f664 (patch) | |
tree | d17656e8b66df3495e07505d6a4b908c59bb04e7 /npc | |
parent | c2d5e591dc3ed47457774dfe8ee9e0e1fe003609 (diff) | |
download | serverdata-189d41d88e229a7a1b5572d2dcdd95818703f664.tar.gz serverdata-189d41d88e229a7a1b5572d2dcdd95818703f664.tar.bz2 serverdata-189d41d88e229a7a1b5572d2dcdd95818703f664.tar.xz serverdata-189d41d88e229a7a1b5572d2dcdd95818703f664.zip |
Spice up things at Fortress Town Siege - The Five Heroes are immune to the stun
Diffstat (limited to 'npc')
-rw-r--r-- | npc/025-1/ctrl.c | 3 | ||||
-rw-r--r-- | npc/functions/main.txt | 25 |
2 files changed, 27 insertions, 1 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c index 1bd138488..1b42e6c7f 100644 --- a/npc/025-1/ctrl.c +++ b/npc/025-1/ctrl.c @@ -104,7 +104,8 @@ function script FTStatue { if (askyesno() == ASK_YES) { if ($@FORTRESS_STATUE & .@id) return false; - sc_start SC_STUN, 10000, 1; + if (!islegendary()) + sc_start SC_STUN, 10000, 1; doevent("Gate#F::OnStatueBreach"); mapannounce("025-1", strcharinfo(0)+" has broken a statue!", bc_map); $@FORTRESS_STATUE=$@FORTRESS_STATUE|.@id; diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 787c230a1..2818d1fb7 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -327,6 +327,31 @@ function script getmap { return .@mapName$; } +// Get unit BL from type +// ( unittype ) +function script getunitbl { + switch (getarg(0)) { + case UNITTYPE_PC: + return BL_PC; + case UNITTYPE_NPC: + return BL_NPC; + case UNITTYPE_PET: + return BL_PET; + case UNITTYPE_MOB: + return BL_MOB; + case UNITTYPE_HOM: + return BL_HOM; + case UNITTYPE_MER: + return BL_MER; + case UNITTYPE_ELEM: + return BL_ELEM; + default: + consolewarn("Invalid unit type on getunitbl: %d", getarg(0)); + return BL_ALL; + } + return 0; +} + // isin( map, x1, y1, {[x2, y2][radius]} ) function script isin { if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0) |