summaryrefslogtreecommitdiff
path: root/npc/020-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-11-01 11:08:46 -0200
committerJesusaves <cpntb1@ymail.com>2018-11-01 11:08:46 -0200
commit359e460edcce2991df20ae2440cb3f9036778e66 (patch)
treea14de007a5a4cdaf37414716064de497dd3b1aaf /npc/020-1
parent75e92b39e6db9084a5a2f4e5ef0c3341e6cf4950 (diff)
downloadserverdata-359e460edcce2991df20ae2440cb3f9036778e66.tar.gz
serverdata-359e460edcce2991df20ae2440cb3f9036778e66.tar.bz2
serverdata-359e460edcce2991df20ae2440cb3f9036778e66.tar.xz
serverdata-359e460edcce2991df20ae2440cb3f9036778e66.zip
Noobs scenario ready. Now only the Main Event missing.
Diffstat (limited to 'npc/020-1')
-rw-r--r--npc/020-1/_import.txt1
-rw-r--r--npc/020-1/siege.txt104
2 files changed, 105 insertions, 0 deletions
diff --git a/npc/020-1/_import.txt b/npc/020-1/_import.txt
index 3f90e1260..4e95fbf32 100644
--- a/npc/020-1/_import.txt
+++ b/npc/020-1/_import.txt
@@ -1,3 +1,4 @@
// Map 020-1: Nivalis
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/020-1/_mobs.txt",
+"npc/020-1/siege.txt",
diff --git a/npc/020-1/siege.txt b/npc/020-1/siege.txt
new file mode 100644
index 000000000..40dcd1e78
--- /dev/null
+++ b/npc/020-1/siege.txt
@@ -0,0 +1,104 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Nivalis Siege for Liberation Day
+// Each player process its own share of monsters. There are 10 waves.
+//
+// Q_NivalisLibday
+// Day, Score, Temporary Time;
+
+020-1,0,0,0 script #NLib_Siege NPC_HIDDEN,{
+
+OnLoop:
+ @nlib_time+=5; // This is looped every 5 s
+
+ // Victory conditions: All monsters dead & number of waves filled. (Or if you reach level 40)
+ if (BaseLevel >= 40 || (@nlib_wave >= 10 && mobcount("020-1", "#NLib_Siege::OnPetDeath") <= 0)) {
+ goto L_Victory;
+
+ // New wave condition: Waves pending and A- All Mobs Dead B- 4 minutes spent
+ if (@nlib_wave < 10 && (mobcount("020-1", "#NLib_Siege::OnPetDeath") <= 0 || @nlib_time >= 240))
+ goto L_NextRound;
+ }
+
+ // reset timer
+ addtimer(5000, "#NLib_Siege::OnLoop");
+ end;
+
+L_NextRound:
+ @nlib_time=0;
+ @nlib_wave = @nlib_wave + 1;
+ // Prepare next round
+ dispbottom l("Wave @@/10", @nlib_wave);
+ .@amount=@nlib_wave+rand(1,2);
+ freeloop(true);
+ for (.@i = 0; .@i < .@amount; ++.@i) {
+ .@mid=rand(1,22);
+ .@monsterId=Piou;
+ switch (.@mid) {
+ case 1:
+ .@monsterId = CaveMaggot ; break;
+ case 2:
+ .@monsterId = GiantMaggot ; break;
+ //.@monsterId = Wolvern ; break;
+ case 3:
+ .@monsterId = WhiteSlime ; break;
+ case 4:
+ .@monsterId = MagicGoblin ; break;
+ case 5:
+ .@monsterId = Bandit ; break;
+ case 6:
+ .@monsterId = GreenSlime ; break;
+ case 7:
+ .@monsterId = LavaSlime ; break;
+ case 8:
+ .@monsterId = CaveSnake ; break;
+ case 9:
+ .@monsterId = DesertBandit ; break;
+ case 10:
+ .@monsterId = Sarracenus ; break;
+ case 11:
+ .@monsterId = AngryRedScorpion ; break;
+ case 12:
+ .@monsterId = IcedFluffy ; break;
+ case 13:
+ .@monsterId = Scorpion ; break;
+ case 14:
+ .@monsterId = RedScorpion ; break;
+ case 15:
+ .@monsterId = BlackSlime ; break;
+ case 16:
+ .@monsterId = Piousse ; break;
+ case 17:
+ .@monsterId = CandiedSlime ; break;
+ case 18:
+ .@monsterId = BlueSlime ; break;
+ case 19:
+ .@monsterId = SlimeBlast ; break;
+ case 20:
+ .@monsterId = BlackSlime ; break;
+ case 21:
+ .@monsterId = RedSlime ; break;
+ default:
+ .@monsterId = AngryScorpion ; break;
+ }
+ areamonster "020-1", 20, 20, 100, 100, strmobinfo(1, .@monsterId), .@monsterId, 1, "#NLib_Siege::OnPetDeath";
+ }
+ freeloop(false);
+
+ // reset timer
+ addtimer(5000, "#NLib_Siege::OnLoop");
+ end;
+
+// Warp you back, and give you a random small score.
+L_CleanUp:
+ .@q2=getq2(Q_NivalisLibday);
+ setq2 Q_NivalisLibday, .@q2+rand(1,5);
+ warp "019-2", 43, 55;
+ end;
+
+OnPetDeath:
+ end;
+
+}