summaryrefslogtreecommitdiff
path: root/npc/016-7
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-11 21:37:20 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-11 21:37:20 -0300
commita29dcaf5e42333c0162bc20e37e8d21fa8ca987c (patch)
tree1abc80d0b91888c9b9377ef830477b8283b72017 /npc/016-7
parent2a481fa9faeb1b52318c79a17d1f3441bc28c4f7 (diff)
downloadserverdata-a29dcaf5e42333c0162bc20e37e8d21fa8ca987c.tar.gz
serverdata-a29dcaf5e42333c0162bc20e37e8d21fa8ca987c.tar.bz2
serverdata-a29dcaf5e42333c0162bc20e37e8d21fa8ca987c.tar.xz
serverdata-a29dcaf5e42333c0162bc20e37e8d21fa8ca987c.zip
BRACE YOURSELVES! PIRATE ATTACK!!
Diffstat (limited to 'npc/016-7')
-rw-r--r--npc/016-7/_import.txt2
-rw-r--r--npc/016-7/main.txt47
-rw-r--r--npc/016-7/mapflags.txt1
3 files changed, 50 insertions, 0 deletions
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