summaryrefslogtreecommitdiff
path: root/world/map/npc/051-3
diff options
context:
space:
mode:
authorVincent Petithory <vincent.petithory@gmail.com>2012-09-24 21:11:33 +0200
committerVincent Petithory <vincent.petithory@gmail.com>2012-12-17 19:55:26 +0100
commit32cbb82b32d4ccbc3b5090ca517ed74feb5c9b5f (patch)
treef960e08320c2bfec54a3220c16734befea0f606e /world/map/npc/051-3
parenta6910cd696eccbef6f056fb0f7f4d0f2b72a2ede (diff)
downloadserverdata-32cbb82b32d4ccbc3b5090ca517ed74feb5c9b5f.tar.gz
serverdata-32cbb82b32d4ccbc3b5090ca517ed74feb5c9b5f.tar.bz2
serverdata-32cbb82b32d4ccbc3b5090ca517ed74feb5c9b5f.tar.xz
serverdata-32cbb82b32d4ccbc3b5090ca517ed74feb5c9b5f.zip
Add Illia quest scripts. Update submodule pointer.
Diffstat (limited to 'world/map/npc/051-3')
-rw-r--r--world/map/npc/051-3/_import.txt6
-rw-r--r--world/map/npc/051-3/ambush.txt176
-rw-r--r--world/map/npc/051-3/jailslimes.txt29
-rw-r--r--world/map/npc/051-3/janitor.txt10
-rw-r--r--world/map/npc/051-3/locks.txt69
-rw-r--r--world/map/npc/051-3/mapflags.txt1
-rw-r--r--world/map/npc/051-3/reinforcements.txt85
7 files changed, 376 insertions, 0 deletions
diff --git a/world/map/npc/051-3/_import.txt b/world/map/npc/051-3/_import.txt
index f46391fd..3f7c2a21 100644
--- a/world/map/npc/051-3/_import.txt
+++ b/world/map/npc/051-3/_import.txt
@@ -3,3 +3,9 @@
map: 051-3.gat
npc: npc/051-3/_mobs.txt
npc: npc/051-3/_warps.txt
+npc: npc/051-3/ambush.txt
+npc: npc/051-3/jailslimes.txt
+npc: npc/051-3/janitor.txt
+npc: npc/051-3/locks.txt
+npc: npc/051-3/mapflags.txt
+npc: npc/051-3/reinforcements.txt
diff --git a/world/map/npc/051-3/ambush.txt b/world/map/npc/051-3/ambush.txt
new file mode 100644
index 00000000..fa9912b4
--- /dev/null
+++ b/world/map/npc/051-3/ambush.txt
@@ -0,0 +1,176 @@
+//-----------------------------------------------------------------------------
+// Bandit cave
+// $@illia_progress = 2
+//
+// Level progress:
+// 0: Did not start the task yet
+// 1: Players are ambushed
+// 2: Players escaped their jails
+// 3: Reinforcements come when they approach the exit of the cave
+// 4: Key of the door found, to leave the cave
+//-----------------------------------------------------------------------------
+
+051-3.gat,40,52,0|script|#WayBlockedTrigger|32767,2,2,{
+ message strcharinfo(0), "There is no way I can pass here. Let's find another way.";
+ end;
+}
+
+051-3.gat,31,70,0|script|#AmbushReadyTrigger|32767,2,2,{
+ set @step, 2;
+ if ($@illia_progress < @step) goto L_ShouldNotBeHere;
+ if (strcharinfo(0) == $@ILLIA_HERO$ && $@illia_level_2_progress == 0) goto L_PrepareAmbush;
+ end;
+
+L_PrepareAmbush:
+ disablenpc "Sneaky Bandit";
+ disablenpc "Another Sneaky Bandit";
+ end;
+
+L_ShouldNotBeHere:
+ percentheal -100, 0;
+ end;
+
+}
+
+051-3.gat,31,93,0|script|#BanditAmbushTrigger|32767,3,3,{
+ set @step, 2;
+ if ($@illia_progress < @step) goto L_ShouldNotBeHere;
+ if ($@illia_level_2_progress == 0 && strcharinfo(0) == $@ILLIA_HERO$) goto L_MakeAmbush;
+ end;
+
+L_MakeAmbush:
+ set $@illia_level_2_progress, 1;
+ cmdothernpc "#BndtTl", "Ambush";
+ end;
+
+L_ShouldNotBeHere:
+ percentheal -100, 0;
+ message strcharinfo(0), "Your throat got cut by a sneaky bandit!";
+ end;
+}
+
+051-3.gat,1,1,0|script|#BndtTl|127,{
+ end;
+
+OnCommandAmbush:
+ initnpctimer;
+ end;
+
+OnTimer1000:
+ enablenpc "Sneaky Bandit";
+ cmdothernpc "Sneaky Bandit", "Talk";
+ enablenpc "Another Sneaky Bandit";
+ cmdothernpc "Another Sneaky Bandit", "Talk";
+ end;
+
+OnTimer9000:
+ areawarp "051-3.gat", 22, 45, 42, 97, "051-3.gat", 101, 13;
+ end;
+
+OnTimer9750:
+ areatimer "051-3.gat", 100, 12, 102, 15, 500, "#BndtTl::onOuch";
+ areatimer "051-3.gat", 100, 12, 102, 15, 3000, "#BndtTl::onA";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+onOuch:
+ message strcharinfo(0), "Ouch my head...";
+ end;
+
+onA:
+ if (strcharinfo(0) == $@ILLIA_HERO$)
+ goto L_CaptureHero;
+ if (strcharinfo(0) == $@ILLIA_HELPER1$)
+ goto L_CaptureHelper1;
+ if (strcharinfo(0) == $@ILLIA_HELPER2$)
+ goto L_CaptureHelper2;
+ if (strcharinfo(0) == $@ILLIA_HELPER3$)
+ goto L_CaptureHelper3;
+ // kill that player otherwise, since not part of the quest.
+ percentheal -100,0;
+ end;
+
+L_CaptureHero:
+ // Simulate the capture of the player.
+ // Unequip all equipments
+ nude;
+ // put the health at 40%.
+ percentheal 100, 0;
+ percentheal -60, 0;
+ warp "051-3.gat", 69, 109;
+ message strcharinfo(0), "Meh... Where am I?";
+ end;
+
+L_CaptureHelper1:
+ // Simulate the capture of the player.
+ // Unequip all equipments
+ nude;
+ // put the health at 40%.
+ percentheal 100, 0;
+ percentheal -60, 0;
+ warp "051-3.gat", 64, 102;
+ message strcharinfo(0), "Meh... Where am I?";
+ end;
+
+L_CaptureHelper2:
+ // Simulate the capture of the player.
+ // Unequip all equipments
+ nude;
+ // put the health at 40%.
+ percentheal 100, 0;
+ percentheal -60, 0;
+ warp "051-3.gat", 62, 102;
+ message strcharinfo(0), "Meh... Where am I?";
+ end;
+
+L_CaptureHelper3:
+ // Simulate the capture of the player.
+ // Unequip all equipments
+ nude;
+ // put the health at 40%.
+ percentheal 100, 0;
+ percentheal -60, 0;
+ warp "051-3.gat", 58, 102;
+ message strcharinfo(0), "Meh... Where am I?";
+ end;
+
+}
+
+051-3.gat,29,94,0|script|Sneaky Bandit|127,{
+ end;
+
+OnCommandTalk:
+ initnpctimer;
+ end;
+
+OnTimer100:
+ npctalk "Did you think you could sneak in our den without a problem?";
+ end;
+
+OnTimer3600:
+ npctalk "Drop your weapons, and come with us!";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+}
+
+051-3.gat,33,95,0|script|Another Sneaky Bandit|127,{
+ end;
+
+OnCommandTalk:
+ initnpctimer;
+ end;
+
+OnTimer1500:
+ npctalk "W00t! More slaves!";
+ end;
+
+OnTimer5500:
+ npctalk "Ahaha, that was easy!";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+}
diff --git a/world/map/npc/051-3/jailslimes.txt b/world/map/npc/051-3/jailslimes.txt
new file mode 100644
index 00000000..a008a8fd
--- /dev/null
+++ b/world/map/npc/051-3/jailslimes.txt
@@ -0,0 +1,29 @@
+// Separate spawns for the copper slimes in the 4 jails
+051-3.gat,57,104,1,1|monster|Copper Slime|1098,1,60000,30000,IlliaCMobs051-3::On1098
+051-3.gat,62,104,1,1|monster|Copper Slime|1098,1,60000,30000,IlliaCMobs051-3::On1098
+051-3.gat,63,104,1,1|monster|Copper Slime|1098,1,60000,30000,IlliaCMobs051-3::On1098
+051-3.gat,70,111,1,1|monster|Copper Slime|1098,1,60000,30000,IlliaCMobs051-3::On1098
+
+051-3.gat,0,0,0|script|IlliaCMobs051-3|-1,{
+
+On1098:
+ if (rand(100) < 80 && $@illia_progress == 2 && ($@illia_level_2_progress == 1 || $@illia_level_2_progress == 2))
+ goto L_LockPicks;
+ goto L_End;
+
+L_LockPicks:
+ if (countitem ("LockPicks") == 0)
+ goto L_GiveLockPicks;
+ goto L_End;
+
+L_GiveLockPicks:
+ message strcharinfo(0), "Hey nice, someone left behind these rusty lock picks.";
+ getitem "LockPicks", 1;
+ goto L_End;
+
+L_End:
+ set @mobID, 1098;
+ callfunc "MobPoints";
+ end;
+
+}
diff --git a/world/map/npc/051-3/janitor.txt b/world/map/npc/051-3/janitor.txt
new file mode 100644
index 00000000..5dfb1c30
--- /dev/null
+++ b/world/map/npc/051-3/janitor.txt
@@ -0,0 +1,10 @@
+// Bandit cave janitor
+051-3.gat,1,1,0|script|#IlliaJanitor2|127,{
+end;
+
+OnCommandClean:
+ // Kill all remaining bandits spawned during the "reinforcements" event
+ killmonster "051-1.gat", "Door::onB";
+ end;
+
+}
diff --git a/world/map/npc/051-3/locks.txt b/world/map/npc/051-3/locks.txt
new file mode 100644
index 00000000..242532ae
--- /dev/null
+++ b/world/map/npc/051-3/locks.txt
@@ -0,0 +1,69 @@
+051-3.gat,69,107,0|script|Jail Lock 1|127,{
+
+ if (isin("051-3.gat", 69, 108, 73, 111)) goto L_Do_Lock_Picking;
+ end;
+
+L_Do_Lock_Picking:
+ callfunc "LockPicking";
+ if (@lock_picking_success > 0)
+ goto L_OpenDoor;
+ close;
+
+L_OpenDoor:
+ set @lock_picking_success, 0;
+ warp "051-3.gat", 69, 104;
+ message strcharinfo(0), "Ok, let's get out of here now.";
+ set $@illia_level_2_progress, 2;
+ close;
+}
+
+051-3.gat,64,100,0|script|Jail Lock 2|127,{
+
+ if (isin("051-3.gat", 64, 101, 66, 104)) goto L_Do_Lock_Picking;
+ end;
+
+L_Do_Lock_Picking:
+ callfunc "LockPicking";
+ if (@lock_picking_success > 0)
+ goto L_OpenDoor;
+ close;
+
+L_OpenDoor:
+ set @lock_picking_success, 0;
+ warp "051-3.gat", 64, 97;
+ close;
+}
+
+051-3.gat,62,100,0|script|Jail Lock 3|127,{
+
+ if (isin("051-3.gat", 61, 101, 62, 104)) goto L_Do_Lock_Picking;
+ end;
+
+L_Do_Lock_Picking:
+ callfunc "LockPicking";
+ if (@lock_picking_success > 0)
+ goto L_OpenDoor;
+ close;
+
+L_OpenDoor:
+ set @lock_picking_success, 0;
+ warp "051-3.gat", 62, 97;
+ close;
+}
+
+051-3.gat,58,100,0|script|Jail Lock 4|127,{
+
+ if (isin("051-3.gat", 57, 101, 58, 104)) goto L_Do_Lock_Picking;
+ end;
+
+L_Do_Lock_Picking:
+ callfunc "LockPicking";
+ if (@lock_picking_success > 0)
+ goto L_OpenDoor;
+ close;
+
+L_OpenDoor:
+ set @lock_picking_success, 0;
+ warp "051-3.gat", 58, 97;
+ close;
+}
diff --git a/world/map/npc/051-3/mapflags.txt b/world/map/npc/051-3/mapflags.txt
new file mode 100644
index 00000000..450ee23b
--- /dev/null
+++ b/world/map/npc/051-3/mapflags.txt
@@ -0,0 +1 @@
+051-3.gat mapflag nosave 007-1,86,76;
diff --git a/world/map/npc/051-3/reinforcements.txt b/world/map/npc/051-3/reinforcements.txt
new file mode 100644
index 00000000..91cfaf37
--- /dev/null
+++ b/world/map/npc/051-3/reinforcements.txt
@@ -0,0 +1,85 @@
+051-3.gat,47,30,0|script|#BndtRnfrcmtsTrigger|32767,2,3,{
+
+ set @step, 2;
+ if ($@illia_progress < @step) goto L_ShouldNotBeHere;
+ if ($@illia_level_2_progress == 2) goto L_CallReinforcements;
+ end;
+
+L_CallReinforcements:
+ donpcevent "Door::OnRnfrcmts";
+ end;
+
+L_ShouldNotBeHere:
+ percentheal -100, 0;
+ end;
+}
+
+051-3.gat,37,24,0|script|Door|127,{
+
+ set @step, 2;
+ if ($@illia_progress < @step) goto L_ShouldNotBeHere;
+ mes "Try open the door?";
+ menu
+ "Yes", L_TryOpen,
+ "Do nothing", -;
+ close;
+
+L_ShouldNotBeHere:
+ percentheal -100, 0;
+ end;
+
+L_TryOpen:
+ if ($@illia_level_2_progress < 4)
+ goto L_KeyNotFound;
+ goto L_Warp;
+ end;
+
+L_KeyNotFound:
+ mes "You do not see a way to open this door.";
+ close;
+
+L_Warp:
+ mes "You place the key in the door and open the lock.";
+ warp "051-1.gat", 118, 55;
+ close;
+
+OnRnfrcmts:
+ set $@illia_level_2_progress, 3;
+ // Spawn 20 bandits
+ areamonster "051-3.gat", 29, 25, 48, 39, "", 1064, 18, "Door::onB";
+ // Spawn 4 bandit lords
+ areamonster "051-3.gat", 29, 25, 48, 39, "", 1065, 3, "Door::onB";
+ initnpctimer;
+ mapannounce "051-3.gat", "Bandit Lords: Do not let them escape!!" , 0;
+ areatimer "051-3.gat", 25, 20, 80, 85, 10, "Door::onDRnfrcmts";
+ end;
+
+onB:
+ end;
+
+onDRnfrcmts:
+ message strcharinfo(0), "Oh no, reinforcements! We must kill them all!";
+ end;
+
+OnTimer2000:
+ setnpctimer 0;
+ if ($@illia_level_2_progress != 3 || $@illia_progress != 2)
+ end;
+ if (mobcount("051-3.gat", "Door::onB") < 0)
+ goto L_OpenDoor;
+ end;
+
+L_OpenDoor:
+ set $@illia_level_2_progress, 4;
+ set $@illia_progress, 3;
+ set $@illia_max_time, $@illia_max_time + 900;
+ areatimer "051-3.gat", 25, 20, 80, 85, 10, "Door::onKeyFound";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+onKeyFound:
+ message strcharinfo(0), "One of the defeated bandit lords had a door key attached to his belt.";
+ end;
+
+}