summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/002-4/nard.txt1
-rw-r--r--npc/012-1/_mobs.txt1
-rw-r--r--npc/014-1/_mobs.txt6
-rw-r--r--npc/014-2/_mobs.txt1
-rw-r--r--npc/016-1/marine.txt13
-rw-r--r--npc/016-6/main.txt15
-rw-r--r--npc/016-7/_import.txt2
-rw-r--r--npc/016-7/main.txt47
-rw-r--r--npc/016-7/mapflags.txt1
9 files changed, 84 insertions, 3 deletions
diff --git a/npc/002-4/nard.txt b/npc/002-4/nard.txt
index a205b0ee6..a09abbc78 100644
--- a/npc/002-4/nard.txt
+++ b/npc/002-4/nard.txt
@@ -210,7 +210,6 @@ L_TCandor:
L_TTulim:
Zeny=Zeny-.@price;
PC_DEST$="Tulim";
- addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
@timer_navio_running = 1;
mes "";
diff --git a/npc/012-1/_mobs.txt b/npc/012-1/_mobs.txt
index 60a3b9d76..1f6feba67 100644
--- a/npc/012-1/_mobs.txt
+++ b/npc/012-1/_mobs.txt
@@ -7,3 +7,4 @@
012-1,135,58,7,29 monster Piousse 1003,6,40000,60000
012-1,85,86,52,15 monster Silk Worm 1034,5,30000,30000
012-1,115,69,1,1 monster Training Dummy 1021,1,10000,10000
+012-1,81,59,54,35 monster Squirrel 1032,12,30000,45000
diff --git a/npc/014-1/_mobs.txt b/npc/014-1/_mobs.txt
index 8de224201..7801b55f6 100644
--- a/npc/014-1/_mobs.txt
+++ b/npc/014-1/_mobs.txt
@@ -2,3 +2,9 @@
// Map 014-1: Woodland Mining Camp mobs
014-1,97,59,86,45 monster Silk Worm 1034,15,30000,30000
014-1,97,67,50,45 monster Mouboo 1023,12,30000,45000
+014-1,85,82,54,35 monster Squirrel 1032,12,30000,45000
+014-1,87,80,52,18 monster Tipiou 1016,3,30000,45000
+014-1,135,91,6,28 monster Blub 1008,2,30000,30000
+014-1,95,58,105,59 monster Cobalt Plant 1136,2,45000,50000
+014-1,88,68,104,43 monster Mauve Plant 1135,3,45000,50000
+014-1,66,53,43,62 monster Gamboge Plant 1134,3,45000,50000
diff --git a/npc/014-2/_mobs.txt b/npc/014-2/_mobs.txt
index 4c59f173d..f1bf4fd58 100644
--- a/npc/014-2/_mobs.txt
+++ b/npc/014-2/_mobs.txt
@@ -6,6 +6,7 @@
014-2,68,74,69,27 monster Fluffy 1022,7,30000,30000
014-2,207,65,40,50 monster Sea Slime 1093,6,42000,30000
014-2,125,84,157,54 monster Alpha Mouboo 1056,1,120000,180000
+014-2,132,59,90,35 monster Squirrel 1032,26,30000,42000
014-2,143,74,137,117 monster Cobalt Plant 1136,3,45000,50000
014-2,148,70,137,117 monster Mauve Plant 1135,3,45000,50000
014-2,154,66,137,117 monster Gamboge Plant 1134,3,45000,50000
diff --git a/npc/016-1/marine.txt b/npc/016-1/marine.txt
index c5cd3ef26..3aadf003b 100644
--- a/npc/016-1/marine.txt
+++ b/npc/016-1/marine.txt
@@ -57,6 +57,12 @@ L_THurns:
addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
@timer_navio_running = 1;
warp "016-6", 40, 32;
+
+ // 10% base chance of Pirate Attack!
+ // Each level INCREASES this in 0.1%.
+ // So for a level 40 player, chances are 14%.
+ if (rand(1, 10000) < 1000+(BaseLevel*10))
+ addtimer rand(3000,6000), "#MarineShip::OnEvent";
end;
@@ -96,7 +102,6 @@ L_TTulim:
Zeny=Zeny-.@price;
PC_DEST$="Tulim";
- addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
@timer_navio_running = 1;
mes "";
@@ -108,6 +113,12 @@ L_TTulim:
addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
@timer_navio_running = 1;
warp "016-6", 40, 32;
+
+ // 10% base chance of Pirate Attack!
+ // Each level INCREASES this in 0.1%.
+ // So for a level 40 player, chances are 14%.
+ if (rand(1, 10000) < 1000+(BaseLevel*10))
+ addtimer rand(3000,6000), "#MarineShip::OnEvent";
end;
L_TooWeak:
diff --git a/npc/016-6/main.txt b/npc/016-6/main.txt
index 8573283c6..83571fd8c 100644
--- a/npc/016-6/main.txt
+++ b/npc/016-6/main.txt
@@ -6,6 +6,19 @@
end;
OnEvent:
+ // Clean up pirate ship, if needed.
+ if (mobcount("016-7", "#MarineShipAttack::OnPirateDie") && !getmapusers("016-7")) {
+ killmonster("016-7", "All");
+ }
+ if (mobcount("016-7", "#MarineShipAttack::OnVictory") && !getmapusers("016-7")) {
+ killmonster("016-7", "All");
+ }
+ if (mobcount("016-7", "#MarineShipAttack::OnVictory") > 1) {
+ killmonster("016-7", "#MarineShipAttack::OnVictory");
+ monster "016-7", 38, 27, "Pirate Captain", OceanPirate, "#MarineShipAttack::OnVictory";
+ }
+
+ // Handle travel
if (@timer_navio_running == 0) end;
if (PC_DEST$ == "Hurns") goto L_Hurns;
else if (PC_DEST$ == "Tulim") goto L_Tulim;
@@ -29,7 +42,7 @@ L_Tulim:
end;
L_Error:
- debugmes "ERROR: PLAYER INVALID PC_DEST ON #NardShip: " + PC_DEST$;
+ debugmes "ERROR: PLAYER INVALID PC_DEST ON #MarineShip: " + PC_DEST$;
PC_DEST$ = "";
@timer_navio_running = 0;
warp "000-1", 22, 22;
diff --git a/npc/016-7/_import.txt b/npc/016-7/_import.txt
index 7ca740e41..45f28eecd 100644
--- a/npc/016-7/_import.txt
+++ b/npc/016-7/_import.txt
@@ -1,3 +1,5 @@
// Map 016-7: Pirate Attack
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/016-7/_mobs.txt",
+"npc/016-7/main.txt",
+"npc/016-7/mapflags.txt",
diff --git a/npc/016-7/main.txt b/npc/016-7/main.txt
new file mode 100644
index 000000000..05bf32b35
--- /dev/null
+++ b/npc/016-7/main.txt
@@ -0,0 +1,47 @@
+// TMW2 script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Handles pirate attacks
+
+016-7,0,0,0 script #MarineShipAttack NPC_HIDDEN,117,29,{
+ end;
+
+OnEvent:
+ warp "016-7", 31, 33;
+ dispbottom l("##1The ship is under a pirate's attack! ##BKill all or survive!");
+ addtimer 2000, "#MarineShipAttack::OnStart";
+ end;
+
+OnStart:
+ // Define number of pirates based on player level.
+ // Player count is not important here, as this is run for every player.
+ .@c=(BaseLevel/10);
+ areamonster "016-7", 23, 25, 52, 35, strmobinfo(1, OceanPirate), OceanPirate, .@c, "#MarineShipAttack::OnPirateDie";
+ end;
+
+OnPirateDie:
+ if (!mobcount("016-7", "#MarineShipAttack::OnPirateDie")) {
+ mapannounce l("The pirate ship captain appear! TAKE CARE!!"), bc_map;
+ monster "016-7", 38, 27, "Pirate Captain", OceanPirate, "#MarineShipAttack::OnVictory";
+ }
+ end;
+
+OnVictory:
+ areatimer("016-7", 23, 25, 52, 35, 10, "#MarineShipAttack::OnReward")
+ end;
+
+OnReward:
+ // That would give 10% from missing exp, but I didn't like it.
+ //getexp ((NextBaseExp-BaseExp)/10), 0;
+
+ // Lv 40 rewards: 400 exp, 40 jxp, 200~600 GP
+ getexp BaseLevel*10, BaseLevel;
+ Zeny=Zeny+BaseLevel*rand(5,15);
+ dispbottom l("Congratulations!");
+ if (isin("016-7", 23, 25, 52, 35))
+ warp "016-6", 31, 33;
+ end;
+}
+
diff --git a/npc/016-7/mapflags.txt b/npc/016-7/mapflags.txt
new file mode 100644
index 000000000..b151bf43c
--- /dev/null
+++ b/npc/016-7/mapflags.txt
@@ -0,0 +1 @@
+016-7 mapflag zone ship