diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-08-02 10:15:11 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-08-02 10:19:39 -0300 |
commit | db843bc101eb73e77b9299e101f3b13d0a278ae0 (patch) | |
tree | 825e3bec03c363806183082c1bc569b252eb385c /npc/functions | |
parent | 86ab132256fee6ba1684e46dd3da0be44ab07753 (diff) | |
download | serverdata-db843bc101eb73e77b9299e101f3b13d0a278ae0.tar.gz serverdata-db843bc101eb73e77b9299e101f3b13d0a278ae0.tar.bz2 serverdata-db843bc101eb73e77b9299e101f3b13d0a278ae0.tar.xz serverdata-db843bc101eb73e77b9299e101f3b13d0a278ae0.zip |
SeasonReload() function
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/seasons.txt | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt index be49e80f7..a93cc78f9 100644 --- a/npc/functions/seasons.txt +++ b/npc/functions/seasons.txt @@ -49,6 +49,19 @@ function script SeasonControl { } while (@menu != 3); return; } +function script SeasonReload { + // Summer extra drops + if (season() == SUMMER && $@SEASON != SUMMER) { + donpcevent("#SeasonCore::OnSummerStart"); + } + // Summer end delete drops + if (season() == AUTUMN && $@SEASON == SUMMER) { + donpcevent("#SeasonCore::OnSummerEnd"); + } + + $@SEASON=season(); + return; +} 000-0,0,0,0 script #SeasonCore NPC_HIDDEN,{ end; @@ -117,17 +130,7 @@ OnSummerEnd: OnInit: OnHour00: if ($@SEASON != season()) { - - // Summer extra drops - if (season() == SUMMER && $@SEASON != SUMMER) { - donpcevent("#SeasonCore::OnSummerStart"); - } - // Summer end delete drops - if (season() == AUTUMN && $@SEASON == SUMMER) { - donpcevent("#SeasonCore::OnSummerEnd"); - } - - $@SEASON=season(); + SeasonReload(); } end; } |