diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-23 21:44:22 -0300 |
commit | a7c45a192268da2601cef47a4cdba987ae2327ca (patch) | |
tree | c5fb5b97db109fe7106496dd96498c475881046b /npc/011-3 | |
download | serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2 serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip |
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/011-3')
-rw-r--r-- | npc/011-3/_import.txt | 5 | ||||
-rw-r--r-- | npc/011-3/_mobs.txt | 22 | ||||
-rw-r--r-- | npc/011-3/_warps.txt | 4 | ||||
-rw-r--r-- | npc/011-3/flood.txt | 117 |
4 files changed, 148 insertions, 0 deletions
diff --git a/npc/011-3/_import.txt b/npc/011-3/_import.txt new file mode 100644 index 0000000..b931fb1 --- /dev/null +++ b/npc/011-3/_import.txt @@ -0,0 +1,5 @@ +// Map 011-3: Eternal Swamps - Landbridge +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/011-3/_mobs.txt", +"npc/011-3/_warps.txt", +"npc/011-3/flood.txt", diff --git a/npc/011-3/_mobs.txt b/npc/011-3/_mobs.txt new file mode 100644 index 0000000..42dde23 --- /dev/null +++ b/npc/011-3/_mobs.txt @@ -0,0 +1,22 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-3: Eternal Swamps - Landbridge mobs +011-3,39,205,19,14 monster Angry Red Scorpion 1130,10,100000,30000 +011-3,40,206,19,14 monster Fire Goblin 1067,10,100000,30000 +011-3,38,207,19,14 monster Old Snake 1199,5,100000,30000 +011-3,38,174,18,13 monster Sarracenus 1125,7,100000,30000 +011-3,37,176,18,13 monster Black Scorpion 1074,4,100000,30000 +011-3,39,175,18,13 monster Snake 1122,6,100000,30000 +011-3,40,145,19,11 monster Snake 1122,3,100000,30000 +011-3,39,144,19,11 monster Sarracenus 1125,4,100000,30000 +011-3,38,146,19,11 monster Desert Bandit 1124,5,100000,30000 +011-3,40,101,36,26 monster Fire Fairy 1183,15,100000,30000 +011-3,39,99,36,26 monster Bandit 1124,13,100000,30000 +011-3,37,103,36,26 monster Robin Bandit 1153,7,100000,30000 +011-3,37,56,24,14 monster Sea Slime 1093,5,100000,30000 +011-3,39,55,24,14 monster Red Mushroom 1042,5,100000,30000 +011-3,38,54,24,14 monster Grass Snake 1169,4,100000,30000 +011-3,37,32,19,7 monster Sea Slime 1093,5,100000,30000 +011-3,39,32,19,7 monster Tipiou 1016,3,900000,300000 +011-3,38,31,19,7 monster Vicious Squirrel 1187,5,100000,30000 +011-3,51,113,3,4 monster Fire Fairy 1183,1,100000,30000 +011-3,30,89,3,4 monster Fire Fairy 1183,1,100000,30000 diff --git a/npc/011-3/_warps.txt b/npc/011-3/_warps.txt new file mode 100644 index 0000000..22caef9 --- /dev/null +++ b/npc/011-3/_warps.txt @@ -0,0 +1,4 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-3: Eternal Swamps - Landbridge warps +011-3,37,20,0 warp #011-3_37_20 2,0,014-2,56,102 +011-3,37,221,0 warp #011-3_37_221 4,0,009-1,71,25 diff --git a/npc/011-3/flood.txt b/npc/011-3/flood.txt new file mode 100644 index 0000000..9353322 --- /dev/null +++ b/npc/011-3/flood.txt @@ -0,0 +1,117 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Controls Eternal Swamps. +// Contains functions to flood the map (hide the bridges - mask 1024 + mask 2) +// Flood happens at random and causes BluePar to be spawn. Runs every 6/4 minutes. +// At the 6th minute of an hour (6, 16, 26, 36, 46, 56) +// At the 2nd minute of an hour (2, 14 ... 44, 54) + +011-3,0,0,0 script #EternalSwampCore NPC_HIDDEN,{ + end; + +OnSwampMob: + end; + +OnInit: + addmapmask "011-3", MASK_SPECIAL; + bindatcmd "es_flood", "#EternalSwampCore::OnSkipFlood", 99, 99, 1; + end; + +OnMinute02: +OnMinute06: +OnMinute12: +OnMinute16: +OnMinute22: +OnMinute26: +OnMinute32: +OnMinute36: +OnMinute42: +OnMinute46: +OnMinute52: +OnMinute56: + // Check if auto-restart was scheduled + SchedRestart(); +OnSkipFlood: + if ($@GM_OVERRIDE) debugmes "[Flood] Cycle begin"; + .@fd=!(getmapmask("011-3")&MASK_SPECIAL); // .@fd - is flooded? + + if (.@fd) { + if ($@GM_OVERRIDE) debugmes "[Flood] UF - Unflooding"; + // If it is flooded, unflood it to prevent players getting struck for too long + killmonster("011-3", "#EternalSwampCore::OnSwampMob"); + addmapmask "011-3", MASK_SPECIAL; + //debugmes "[Flood] UF - Del Cells"; + delcells "ESwpBridge1"; + delcells "ESwpBridge2"; + delcells "ESwpBridge3"; + delcells "ESwpBridge4"; + delcells "ESwpBridge5"; + delcells "ESwpBridge6"; + delcells "ESwpBridge7"; + mapannounce "011-3", "Eternal Swamps: The flood ceases!",bc_all|bc_npc; + } else { + // 40% chances to flood, 75% during night + .@odds=40; + if (is_night()) + .@odds+=35; + + /* + // Bugfix + if ($@GM_OVERRIDE) + .@odds=100; + else + .@odds=0; + debugmes "[Flood] Analysis with %d odds to flood", .@odds; + */ + + // Maybe we should flood it + if (rand(0,100) < .@odds) { + if ($@GM_OVERRIDE) debugmes "[Flood] F - Flooding"; + removemapmask "011-3", MASK_SPECIAL; + + //debugmes "[Flood] F - Adding Cells"; + setcells "011-3", 37, 22, 39, 24, 1, "ESwpBridge1"; + setcells "011-3", 37, 34, 39, 41, 1, "ESwpBridge2"; + setcells "011-3", 31, 67, 33, 73, 1, "ESwpBridge3"; + setcells "011-3", 40, 96, 42, 102, 1, "ESwpBridge4"; + setcells "011-3", 38, 130, 40, 136, 1, "ESwpBridge5"; + setcells "011-3", 41, 157, 43, 163, 1, "ESwpBridge6"; + setcells "011-3", 36, 187, 38, 193, 1, "ESwpBridge7"; + + //debugmes "[Flood] F - Spawn and Announce"; + areamonster "011-3", 20, 20, 60, 220, "Bluepar", Bluepar, rand(8,26), "#EternalSwampCore::OnSwampMob"; + mapannounce "011-3", "Eternal Swamps: A flood starts!",bc_all|bc_npc; + + // TODO: Handle players in bridges + //debugmes "[Flood] F - Map Timer OK"; + maptimer("011-3", 100, "#EternalSwampCore::OnBridgeDown"); + } + + } + if ($@GM_OVERRIDE) debugmes "[Flood] Cycle finished"; + end; + +// Fix players struck by setcells +OnBridgeDown: + //debugmes "[Flood] [OnBD] Bridge is Down"; + if (isin("011-3", 37, 22, 39, 24)) + slide 38, 21; + else if (isin("011-3", 37, 34, 39, 41)) + slide 38, 33; + else if (isin("011-3", 31, 67, 33, 73)) + slide 32, 65; + else if (isin("011-3", 40, 96, 42, 102)) + slide 41, 95; + else if (isin("011-3", 38, 130, 40, 136)) + slide 39, 128; + else if (isin("011-3", 41, 157, 43, 163)) + slide 42, 155; + else if (isin("011-3", 36, 187, 38, 193)) + slide 37, 185; + //debugmes "[Flood] [OnBD] Finished"; + + end; +} + |