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/023-2 | |
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/023-2')
-rw-r--r-- | npc/023-2/_import.txt | 6 | ||||
-rw-r--r-- | npc/023-2/_mobs.txt | 6 | ||||
-rw-r--r-- | npc/023-2/_warps.txt | 23 | ||||
-rw-r--r-- | npc/023-2/lightbringer.txt | 31 | ||||
-rw-r--r-- | npc/023-2/mk.txt | 260 |
5 files changed, 326 insertions, 0 deletions
diff --git a/npc/023-2/_import.txt b/npc/023-2/_import.txt new file mode 100644 index 0000000..88b53a1 --- /dev/null +++ b/npc/023-2/_import.txt @@ -0,0 +1,6 @@ +// Map 023-2: Magic Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/023-2/_mobs.txt", +"npc/023-2/_warps.txt", +"npc/023-2/lightbringer.txt", +"npc/023-2/mk.txt", diff --git a/npc/023-2/_mobs.txt b/npc/023-2/_mobs.txt new file mode 100644 index 0000000..3173a20 --- /dev/null +++ b/npc/023-2/_mobs.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-2: Magic Cave mobs +023-2,96,52,17,27 monster Moggun 1070,15,0,0 +023-2,38,77,11,27 monster Water Fairy 1184,4,0,0 +023-2,54,44,21,6 monster Yeti 1064,5,0,0 +023-2,81,61,39,16 monster Angry Bat 1194,8,0,0 diff --git a/npc/023-2/_warps.txt b/npc/023-2/_warps.txt new file mode 100644 index 0000000..f6a5c23 --- /dev/null +++ b/npc/023-2/_warps.txt @@ -0,0 +1,23 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 023-2: Magic Cave warps +023-2,86,80,0 script #023-2_86_80 NPC_HIDDEN,0,0,{ + end; +OnTouch: + slide 86,83; end; +} +023-2,86,82,0 script #023-2_86_82 NPC_HIDDEN,0,0,{ + end; +OnTouch: + slide 86,79; end; +} +023-2,30,108,0 script #023-2_30_108 NPC_HIDDEN,0,0,{ + end; +OnTouch: + slide 30,105; end; +} +023-2,30,106,0 script #023-2_30_106 NPC_HIDDEN,0,0,{ + end; +OnTouch: + slide 30,109; end; +} +023-2,121,38,0 warp #023-2_121_38 0,0,019-3,58,85 diff --git a/npc/023-2/lightbringer.txt b/npc/023-2/lightbringer.txt new file mode 100644 index 0000000..d2186a1 --- /dev/null +++ b/npc/023-2/lightbringer.txt @@ -0,0 +1,31 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// The most powerful sword ever. It's alive. + +023-2,91,86,0 script Lightbringer#NLib NPC_LIGHTBRINGER,{ + if ($NLIB_DAY == 7) goto L_Today; + npctalkonce l("It still isn't time to awake the King Of Holy Swords, Light Bringer."); + end; + +L_Today: + if (strcharinfo(0) != $NLIB_HIGHNAME$) { + npctalk3 l("The sword glows too much. Perhaps @@ could take it.", $NLIB_HIGHNAME$); + end; + } + rentitem Lightbringer, (60*60); + dispbottom l("This live sword drafts itself to your hand. You can wield it during today's event."); + disablenpc .name$; + end; + +OnInit: + .sex = G_MALE; + .distance = 5; + + if (!$NLIB_DAY) + disablenpc .name$; + end; + +} + diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt new file mode 100644 index 0000000..f203796 --- /dev/null +++ b/npc/023-2/mk.txt @@ -0,0 +1,260 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Nivalis Liberation Day + +// The Walking Monster King +023-2,121,35,0 script The Monster King#NLib NPC_MONSTERKING,{ + end; + +OnTouch: + npctalk3 get_race() + "!"; + die(); + end; + +OnInit: + .sex = G_MALE; + .distance = 5; + .sakar = 0; + .MK = 0; + +OnHour00: +OnReprocess: + if (!$NLIB_DAY) { + disablenpc .name$; + end; + } + switch ($NLIB_DAY) { + case 1: + movenpc(.name$, 121, 35, DIR_WEST); break; + case 2: + movenpc(.name$, 105, 37, DIR_NORTH); break; + case 3: + movenpc(.name$, 105, 51, DIR_SOUTH); break; + case 4: + movenpc(.name$, 102, 63, DIR_WEST); break; + case 5: + movenpc(.name$, 81, 59, DIR_NORTH); break; + case 6: + movenpc(.name$, 53, 53, DIR_SOUTH); break; + case 7: + movenpc(.name$, 36, 99, DIR_SOUTH); break; + default: + channelmes("#world", "A bug happened: Monster King # Nivalis Liberation Day - Value Out of Range."); disablenpc .name$; break; + } + + end; + +// Event Handler + +L_Finish: + $MANA_BLVL-=10; // Set level to 30 + // Just being bigger is not enough. Must be over the double for the advantage draw (about 1 player for 10m) + if (.victory_count > (.defeat_count*2)) { + announce "The fight ends in draw! The Monster King did accomplish what he set, though...", bc_all|bc_npc; + channelmes("#world", "Congratulations for the draw, that was a good fight."); + channelmes("#world", "The Monster King stole whatever he wanted and left."); + // Reproduce the same bonus from Alpha Server + $@EXP_EVENT=25; + donpcevent "@exprate::OnPlayerCall"; + $MANA_BLVL-=5; // Set level to 25 + } else if (.victory_count < 100) { // 1 player for 5 minutes is enough to prevent this loss + announce "The Monster King, after moping the floor with the players, accomplish what he set, and left...", bc_all|bc_npc; + channelmes("#world", "The players failed miserably in stopping the Monster King."); + // Reproduce the same penalty from Beta Server + $@EXP_EVENT=rand2(-50, -25); + donpcevent "@exprate::OnPlayerCall"; + } else { + announce "The fight ends in draw, with advantage to the Monster King...", bc_all|bc_npc; + channelmes("#world", "The players weren't capable to really harm the Monster King."); + } +L_Finish2: + killmonsterall("023-2"); + .wcycle=0; + maptimer("023-2", 10, "The Monster King#NLib::OnReturn"); + channelmes("#world", "*FINAL SCORE - PLAYERS "+.victory_count+" : "+.defeat_count+" MONSTERS*"); + + // Game Storyline advances: The Town Blockade Stage is now over + $GAME_STORYLINE=1; + $MK_TEMPVAR=gettimeparam(GETTIME_DAYOFMONTH)+ + MK_IDLE_DURATION+rand2(MK_IDLE_VARIATION); + + // Clean up the event + $NIVALIS_LIBDATE=gettimetick(2); + $NLIB_DAY=0; + $NLIB_HIGHTIME=0; + $NLIB_HIGHNAME$=""; + disablenpc "Lightbringer#NLib"; + enablenpc "#019-1_70_21"; + enablenpc "#019-2_37_55"; + enablenpc "#020-1_70_128"; + enablenpc "#020-1_107_55"; + + removemapflag("019-3", mf_bexp); + removemapflag("019-3", mf_nosave); + removemapflag("020-1", mf_bexp); + removemapflag("020-1", mf_nosave); + removemapflag("023-2", mf_bexp); + removemapflag("023-2", mf_nosave); + removemapflag("023-2", mf_nopenalty); + removemapmask "019-3", MASK_MATTACK; + setmapflag("019-3",mf_bexp,100); + setmapflag("020-1",mf_bexp,100); + setmapflag("023-2",mf_bexp,100); + stopnpctimer; + end; + +OnTimer3000: + .wcycle+=3; + .@pl=getareausers("023-2", 21, 109, 31, 114); + .@pla=getmapusers("023-2"); + if (.@pl <= 0 && .@pla > 0) + mapannounce "023-2", "##1WARNING: Players outside the Monster King room counts toward DEFEAT count!", 0; + .victory_count+=.@pl; + + // Processment + if (.@pl <= 0) { + .defeat_count+=1; + } else if (.wcycle % 30 == 3) { + areamonster "023-2", 21, 109, 31, 114, "Monster", any(AngryScorpion, BlackSlime, BlackScorpion, Wolvern, BlueSlime, SlimeBlast, CaveMaggot), .@pl; + } else if (.wcycle % 30 == 18) { + areamonster "023-2", 21, 109, 31, 114, "Monster", any(BlackSlime, BlueSlime, SlimeBlast), 1; // PS. Drop “Demure Dark Soul” ¬.¬ + } else if (.wcycle % 60 == 0) { + mapannounce "023-2", str(15-(.wcycle/60))+" minute(s) remaining", 0; + } + if (.wcycle >= 900) goto L_Finish; + initnpctimer; + // Andrei Sakar's Fake Chant + if (.wcycle % 15 < 3) { + unittalk(.sakar, sprintf("Come %s %s, and %s %s!", any("great", "magnificent"), any("light", "oath", "sacrament"), any("devastate", "annihilate", "obliterate", "liquidate", "eviscerate"), "nearby")); + harm(.MK, 100, HARM_MISC, Ele_Holy, .sakar); + } + end; + +OnVictory: + channelmes("#world", "The Monster King was defeated by players, and had to flee!"); + channelmes("#world", "Getting magic is now easier!"); + announce "Players have defeated the Monster King! He fleed from the cave after leaving a decoy!", bc_all|bc_npc; + $MANA_BLVL-=10; // Set level to 20 + $@EXP_EVENT=25; + donpcevent "@exprate::OnPlayerCall"; + goto L_Finish2; + end; + +OnBegin: + .defeat_count=0; + .victory_count=0; + .wcycle=0; + channelmes("#world", "The fight against the Monster King ends in 15 minutes. If he is forced to flee, that'll result as victory."); + channelmes("#world", "Each cycle there are players fighting against him will result in victory points. The opposite will result in defeat points."); + channelmes("#world", "More players fighting will result in more victory points. This may affect drastically the result."); + channelmes("#world", "Defeat, decided by a certain threshold of points, will result in MAGIC BEING PERMANENTLY HARDER TO OBTAIN."); + announce "The Alliance attacks the Monster King! 15 minutes! Rules in #world", bc_all|bc_npc; + movenpc(.name$, 0, 0); + .MK=monster("023-2", 24, 111, "The Monster King", MonsterKing, 1, "The Monster King#NLib::OnVictory"); + .sakar=monster("023-2", 30, 109, "Andrei Sakar", AndreiSakar, 1, "The Monster King#NLib::OnSkip", Size_Medium, 1); + areamonster "023-2", 21, 109, 31, 114, "Monster", AngryScorpion, 1; + areamonster "023-2", 21, 109, 31, 114, "Monster", BlackSlime, 2; + areamonster "023-2", 21, 109, 31, 114, "Monster", BlueSlime, 1; + areamonster "023-2", 21, 109, 31, 114, "Monster", CaveMaggot, 1; + initnpctimer; + end; + +OnReturn: + warp "019-2", 43, 55; + end; + +OnSkip: + end; +} + + +// Floor triggers +023-2,121,35,0 script #NLIB_T01 NPC_HIDDEN,1,2,{ + +OnTouch: + if ($NLIB_DAY == 1) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } + end; +} + + +023-2,110,36,0 script #NLIB_T02 NPC_HIDDEN,2,2,{ + +OnTouch: + if ($NLIB_DAY == 2) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } else if ($NLIB_DAY < 2) { + slide 114, 36; + dispbottom l("I should not veer off too much the path."); + } + end; +} + +023-2,105,50,0 script #NLIB_T03 NPC_HIDDEN,2,2,{ + +OnTouch: + if ($NLIB_DAY == 3) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } else if ($NLIB_DAY < 3) { + slide 104, 48; + dispbottom l("I should not veer off too much the path."); + } + end; +} + +023-2,104,62,0 script #NLIB_T04 NPC_HIDDEN,0,0,{ + +OnTouch: + if ($NLIB_DAY == 4) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } else if ($NLIB_DAY < 4) { + slide 104, 61; + dispbottom l("I should not veer off too much the path."); + } + end; +} + +023-2,86,59,0 script #NLIB_T05 NPC_HIDDEN,2,5,{ + +OnTouch: + if ($NLIB_DAY == 5) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } else if ($NLIB_DAY < 5) { + slide 91, 61; + dispbottom l("I should not veer off too much the path."); + } + end; +} + +023-2,53,49,0 script #NLIB_T06 NPC_HIDDEN,0,5,{ + +OnTouch: + if ($NLIB_DAY == 6) { + @QNL3=1; + dispbottom l("I've found the Monster King."); + } else if ($NLIB_DAY < 6) { + slide 55, 48; + dispbottom l("I should not veer off too much the path."); + } + end; +} + +023-2,35,90,0 script #NLIB_T07 NPC_HIDDEN,1,3,{ + +OnTouch: + if ((gettime(2) < 25 || gettime(2) > 45) && !$@GM_OVERRIDE) { + slide 39, 89; + dispbottom l("I should not go ahead... yet."); + } + end; +} + + |