summaryrefslogtreecommitdiff
path: root/world/map/npc/025-3
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/025-3')
-rw-r--r--world/map/npc/025-3/barriers.txt573
1 files changed, 464 insertions, 109 deletions
diff --git a/world/map/npc/025-3/barriers.txt b/world/map/npc/025-3/barriers.txt
index 22879eb5..8b57bee1 100644
--- a/world/map/npc/025-3/barriers.txt
+++ b/world/map/npc/025-3/barriers.txt
@@ -5,8 +5,7 @@
025-3.gat,78,127,0 script #WarpBattleCave1 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 26, 63, 60, 97) >= 1) goto L_SomeoneInside;
- if ($@timercontrol1 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 26, 63, 60, 97) >= 1 || $@battlecave1 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE1) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -24,18 +23,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave1fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone1 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone1, 1;
end;
L_Block:
@@ -45,24 +38,50 @@ L_Block:
OnTimer5000:
if ($@battlecave1 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave1fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 26, 63, 60, 97) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave1fighter$));
+ if (cavefights & BATTLE_CAVE1) goto L_Win;
+ if (getareausers("025-4.gat", 26, 63, 60, 97) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave1start >= $@CAVE1_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave1fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave1fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave1start) < 60) set $@cave1start, $@cave1start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave1_timer, $@cave1_timer + 5;
+ if ($@cave1_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave1, 0;
set $@cave1_kills, 0;
set $@cave1start, 0;
set $@cave1fighter$, "";
set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
killmonster "025-4.gat", "#StartCaveFight1::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 78, 129;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave1, 0;
+ set $@cave1_kills, 0;
+ set $@cave1start, 0;
+ set $@cave1fighter$, "";
+ set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave1fighter$));
warp "025-3.gat", 78, 129;
@@ -72,6 +91,7 @@ L_Cleaning:
set $@cave1start, 0;
set $@cave1fighter$, "";
set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
killmonster "025-4.gat", "#StartCaveFight1::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -86,6 +106,7 @@ L_CleaningDead:
set $@cave1start, 0;
set $@cave1fighter$, "";
set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
killmonster "025-4.gat", "#StartCaveFight1::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -97,13 +118,26 @@ L_CleaningNorid:
set $@cave1start, 0;
set $@cave1fighter$, "";
set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
killmonster "025-4.gat", "#StartCaveFight1::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave1fighter$));
+ warp "025-3.gat", 78, 129;
+ set $@wave_cave1, 0;
+ set $@cave1_kills, 0;
+ set $@cave1start, 0;
+ set $@cave1fighter$, "";
+ set $@cave1fighterdeaths$, 0;
+ set $@battlecave1, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol1, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -115,8 +149,7 @@ L_AlreadyClean:
025-3.gat,53,107,0 script #WarpBattleCave2 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 97, 62, 126, 96) >= 1) goto L_SomeoneInside;
- if ($@timercontrol2 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 97, 62, 126, 96) >= 1 || $@battlecave2 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE2) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -134,18 +167,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave2fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone2 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone2, 1;
end;
L_Block:
@@ -155,24 +182,50 @@ L_Block:
OnTimer5000:
if ($@battlecave2 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave2fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 97, 62, 126, 96) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave2fighter$));
+ if (cavefights & BATTLE_CAVE2) goto L_Win;
+ if (getareausers("025-4.gat", 97, 62, 126, 96) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave2start >= $@CAVE2_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave2fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave2fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave2start) < 60) set $@cave2start, $@cave2start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave2_timer, $@cave2_timer + 5;
+ if ($@cave2_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave2, 0;
set $@cave2_kills, 0;
set $@cave2start, 0;
set $@cave2fighter$, "";
set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
killmonster "025-4.gat", "#StartCaveFight2::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 53, 109;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave1, 0;
+ set $@cave2_kills, 0;
+ set $@cave2start, 0;
+ set $@cave2fighter$, "";
+ set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave2fighter$));
warp "025-3.gat", 53, 109;
@@ -182,6 +235,7 @@ L_Cleaning:
set $@cave2start, 0;
set $@cave2fighter$, "";
set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
killmonster "025-4.gat", "#StartCaveFight2::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -196,6 +250,7 @@ L_CleaningDead:
set $@cave2start, 0;
set $@cave2fighter$, "";
set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
killmonster "025-4.gat", "#StartCaveFight2::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -207,13 +262,26 @@ L_CleaningNorid:
set $@cave2start, 0;
set $@cave2fighter$, "";
set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
killmonster "025-4.gat", "#StartCaveFight2::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave2fighter$));
+ warp "025-3.gat", 53, 109;
+ set $@wave_cave2, 0;
+ set $@cave2_kills, 0;
+ set $@cave2start, 0;
+ set $@cave2fighter$, "";
+ set $@cave2fighterdeaths$, 0;
+ set $@battlecave2, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol2, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -224,8 +292,7 @@ L_AlreadyClean:
025-3.gat,71,83,0 script #WarpBattleCave3 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 150, 84, 177, 117) >= 1) goto L_SomeoneInside;
- if ($@timercontrol3 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 150, 84, 177, 117) >= 1 || $@battlecave3 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE3) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -243,18 +310,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave3fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone3 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone3, 1;
end;
L_Block:
@@ -264,24 +325,50 @@ L_Block:
OnTimer5000:
if ($@battlecave3 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave3fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 150, 84, 177, 117) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave3fighter$));
+ if (cavefights & BATTLE_CAVE3) goto L_Win;
+ if (getareausers("025-4.gat", 150, 84, 177, 117) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave3start >= $@CAVE3_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave3fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave3fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave3start) < 60) set $@cave3start, $@cave3start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave3_timer, $@cave3_timer + 5;
+ if ($@cave3_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave3, 0;
set $@cave3_kills, 0;
set $@cave3start, 0;
set $@cave3fighter$, "";
set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
killmonster "025-4.gat", "#StartCaveFight3::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 71, 85;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave3, 0;
+ set $@cave3_kills, 0;
+ set $@cave3start, 0;
+ set $@cave3fighter$, "";
+ set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave3fighter$));
warp "025-3.gat", 71, 85;
@@ -291,6 +378,7 @@ L_Cleaning:
set $@cave3start, 0;
set $@cave3fighter$, "";
set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
killmonster "025-4.gat", "#StartCaveFight3::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -305,6 +393,7 @@ L_CleaningDead:
set $@cave3start, 0;
set $@cave3fighter$, "";
set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
killmonster "025-4.gat", "#StartCaveFight3::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -316,13 +405,26 @@ L_CleaningNorid:
set $@cave3start, 0;
set $@cave3fighter$, "";
set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
killmonster "025-4.gat", "#StartCaveFight3::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave3fighter$));
+ warp "025-3.gat", 71, 85;
+ set $@wave_cave3, 0;
+ set $@cave3_kills, 0;
+ set $@cave3start, 0;
+ set $@cave3fighter$, "";
+ set $@cave3fighterdeaths$, 0;
+ set $@battlecave3, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol3, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -333,8 +435,7 @@ L_AlreadyClean:
025-3.gat,80,83,0 script #WarpBattleCave4 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 28, 124, 57, 156) >= 1) goto L_SomeoneInside;
- if ($@timercontrol4 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 28, 124, 57, 156) >= 1 || $@battlecave4 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE4) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -352,18 +453,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave4fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone4 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone4, 1;
end;
L_Block:
@@ -373,24 +468,50 @@ L_Block:
OnTimer5000:
if ($@battlecave4 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave4fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 28, 124, 57, 156) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave4fighter$));
+ if (cavefights & BATTLE_CAVE4) goto L_Win;
+ if (getareausers("025-4.gat", 28, 124, 57, 156) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave4start >= $@CAVE4_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave4fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave4fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave4start) < 60) set $@cave4start, $@cave4start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave4_timer, $@cave4_timer + 5;
+ if ($@cave4_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave4, 0;
set $@cave4_kills, 0;
set $@cave4start, 0;
set $@cave4fighter$, "";
set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
killmonster "025-4.gat", "#StartCaveFight4::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 80, 85;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave4, 0;
+ set $@cave4_kills, 0;
+ set $@cave4start, 0;
+ set $@cave4fighter$, "";
+ set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave4fighter$));
warp "025-3.gat", 80, 85;
@@ -400,6 +521,7 @@ L_Cleaning:
set $@cave4start, 0;
set $@cave4fighter$, "";
set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
killmonster "025-4.gat", "#StartCaveFight4::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -414,6 +536,7 @@ L_CleaningDead:
set $@cave4start, 0;
set $@cave4fighter$, "";
set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
killmonster "025-4.gat", "#StartCaveFight4::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -425,13 +548,26 @@ L_CleaningNorid:
set $@cave4start, 0;
set $@cave4fighter$, "";
set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
killmonster "025-4.gat", "#StartCaveFight4::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave4fighter$));
+ warp "025-3.gat", 80, 85;
+ set $@wave_cave4, 0;
+ set $@cave4_kills, 0;
+ set $@cave4start, 0;
+ set $@cave4fighter$, "";
+ set $@cave4fighterdeaths$, 0;
+ set $@battlecave4, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol4, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -442,8 +578,7 @@ L_AlreadyClean:
025-3.gat,71,30,0 script #WarpBattleCave5 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 91, 131, 124, 160) >= 1) goto L_SomeoneInside;
- if ($@timercontrol5 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 91, 131, 124, 160) >= 1 || $@battlecave5 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE5) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -461,18 +596,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave5fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone5 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone5, 1;
end;
L_Block:
@@ -482,24 +611,50 @@ L_Block:
OnTimer5000:
if ($@battlecave5 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave5fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 91, 131, 124, 160) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave5fighter$));
+ if (cavefights & BATTLE_CAVE5) goto L_Win;
+ if (getareausers("025-4.gat", 91, 131, 124, 160) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave5start >= $@CAVE5_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave5fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave5fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave5start) < 60) set $@cave5start, $@cave5start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave5_timer, $@cave5_timer + 5;
+ if ($@cave5_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave5, 0;
set $@cave5_kills, 0;
set $@cave5start, 0;
set $@cave5fighter$, "";
set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
killmonster "025-4.gat", "#StartCaveFight5::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 71, 32;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave5, 0;
+ set $@cave5_kills, 0;
+ set $@cave5start, 0;
+ set $@cave5fighter$, "";
+ set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave5fighter$));
warp "025-3.gat", 71, 32;
@@ -509,6 +664,7 @@ L_Cleaning:
set $@cave5start, 0;
set $@cave5fighter$, "";
set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
killmonster "025-4.gat", "#StartCaveFight5::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -523,6 +679,7 @@ L_CleaningDead:
set $@cave5start, 0;
set $@cave5fighter$, "";
set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
killmonster "025-4.gat", "#StartCaveFight5::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -534,13 +691,26 @@ L_CleaningNorid:
set $@cave5start, 0;
set $@cave5fighter$, "";
set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
killmonster "025-4.gat", "#StartCaveFight5::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave5fighter$));
+ warp "025-3.gat", 71, 32;
+ set $@wave_cave5, 0;
+ set $@cave5_kills, 0;
+ set $@cave5start, 0;
+ set $@cave5fighter$, "";
+ set $@cave5fighterdeaths$, 0;
+ set $@battlecave5, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol5, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -551,8 +721,7 @@ L_AlreadyClean:
025-3.gat,128,35,0 script #WarpBattleCave6 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 153, 143, 178, 174) >= 1) goto L_SomeoneInside;
- if ($@timercontrol6 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 153, 143, 178, 174) >= 1 || $@battlecave6 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE6) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -570,18 +739,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave6fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone6 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone6, 1;
end;
L_Block:
@@ -591,24 +754,50 @@ L_Block:
OnTimer5000:
if ($@battlecave6 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave6fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 153, 143, 178, 174) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave6fighter$));
+ if (cavefights & BATTLE_CAVE6) goto L_Win;
+ if (getareausers("025-4.gat", 153, 143, 178, 174) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave6start >= $@CAVE6_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave6fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave6fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave6start) < 60) set $@cave6start, $@cave6start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave6_timer, $@cave6_timer + 5;
+ if ($@cave6_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave6, 0;
set $@cave6_kills, 0;
set $@cave6start, 0;
set $@cave6fighter$, "";
set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
killmonster "025-4.gat", "#StartCaveFight6::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 128, 37;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave6, 0;
+ set $@cave6_kills, 0;
+ set $@cave6start, 0;
+ set $@cave6fighter$, "";
+ set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave6fighter$));
warp "025-3.gat", 128, 37;
@@ -618,6 +807,7 @@ L_Cleaning:
set $@cave6start, 0;
set $@cave6fighter$, "";
set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
killmonster "025-4.gat", "#StartCaveFight6::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -632,6 +822,7 @@ L_CleaningDead:
set $@cave6start, 0;
set $@cave6fighter$, "";
set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
killmonster "025-4.gat", "#StartCaveFight6::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -643,13 +834,26 @@ L_CleaningNorid:
set $@cave6start, 0;
set $@cave6fighter$, "";
set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
killmonster "025-4.gat", "#StartCaveFight6::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave6fighter$));
+ warp "025-3.gat", 128, 37;
+ set $@wave_cave6, 0;
+ set $@cave6_kills, 0;
+ set $@cave6start, 0;
+ set $@cave6fighter$, "";
+ set $@cave6fighterdeaths$, 0;
+ set $@battlecave6, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol6, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -660,8 +864,7 @@ L_AlreadyClean:
025-3.gat,70,57,0 script #WarpBattleCave7 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 27, 185, 61, 219) >= 1) goto L_SomeoneInside;
- if ($@timercontrol7 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 27, 185, 61, 219) >= 1 || $@battlecave7 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE7) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -679,18 +882,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave7fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone7 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone7, 1;
end;
L_Block:
@@ -700,24 +897,50 @@ L_Block:
OnTimer5000:
if ($@battlecave7 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave7fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 27, 185, 61, 219) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave7fighter$));
+ if (cavefights & BATTLE_CAVE7) goto L_Win;
+ if (getareausers("025-4.gat", 27, 185, 61, 219) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave7start >= $@CAVE7_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave7fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave7fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave7start) < 60) set $@cave7start, $@cave7start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave7_timer, $@cave7_timer + 5;
+ if ($@cave7_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave7, 0;
set $@cave7_kills, 0;
set $@cave7start, 0;
set $@cave7fighter$, "";
set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
killmonster "025-4.gat", "#StartCaveFight7::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 70, 59;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave7, 0;
+ set $@cave7_kills, 0;
+ set $@cave7start, 0;
+ set $@cave7fighter$, "";
+ set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave7fighter$));
warp "025-3.gat", 70, 59;
@@ -727,6 +950,7 @@ L_Cleaning:
set $@cave7start, 0;
set $@cave7fighter$, "";
set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
killmonster "025-4.gat", "#StartCaveFight7::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -741,6 +965,7 @@ L_CleaningDead:
set $@cave7start, 0;
set $@cave7fighter$, "";
set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
killmonster "025-4.gat", "#StartCaveFight7::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -752,13 +977,26 @@ L_CleaningNorid:
set $@cave7start, 0;
set $@cave7fighter$, "";
set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
killmonster "025-4.gat", "#StartCaveFight7::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave7fighter$));
+ warp "025-3.gat", 70, 59;
+ set $@wave_cave7, 0;
+ set $@cave7_kills, 0;
+ set $@cave7start, 0;
+ set $@cave7fighter$, "";
+ set $@cave7fighterdeaths$, 0;
+ set $@battlecave7, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol7, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -769,8 +1007,7 @@ L_AlreadyClean:
025-3.gat,138,92,0 script #WarpBattleCave8 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 90, 193, 119, 216) >= 1) goto L_SomeoneInside;
- if ($@timercontrol8 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 90, 193, 119, 216) >= 1 || $@battlecave8 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE8) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -788,18 +1025,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave8fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone8 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone8, 1;
end;
L_Block:
@@ -809,24 +1040,50 @@ L_Block:
OnTimer5000:
if ($@battlecave8 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave8fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 90, 193, 119, 216) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave8fighter$));
+ if (cavefights & BATTLE_CAVE8) goto L_Win;
+ if (getareausers("025-4.gat", 90, 193, 119, 216) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave8start >= $@CAVE8_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave8fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave8fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave8start) < 60) set $@cave8start, $@cave8start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave8_timer, $@cave8_timer + 5;
+ if ($@cave8_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave8, 0;
set $@cave8_kills, 0;
set $@cave8start, 0;
set $@cave8fighter$, "";
set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
killmonster "025-4.gat", "#StartCaveFight8::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 138, 94;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave8, 0;
+ set $@cave8_kills, 0;
+ set $@cave8start, 0;
+ set $@cave8fighter$, "";
+ set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave8fighter$));
warp "025-3.gat", 138, 94;
@@ -836,6 +1093,7 @@ L_Cleaning:
set $@cave8start, 0;
set $@cave8fighter$, "";
set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
killmonster "025-4.gat", "#StartCaveFight8::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -850,6 +1108,7 @@ L_CleaningDead:
set $@cave8start, 0;
set $@cave8fighter$, "";
set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
killmonster "025-4.gat", "#StartCaveFight8::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -861,13 +1120,26 @@ L_CleaningNorid:
set $@cave8start, 0;
set $@cave8fighter$, "";
set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
killmonster "025-4.gat", "#StartCaveFight8::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave8fighter$));
+ warp "025-3.gat", 138, 94;
+ set $@wave_cave8, 0;
+ set $@cave8_kills, 0;
+ set $@cave8start, 0;
+ set $@cave8fighter$, "";
+ set $@cave8fighterdeaths$, 0;
+ set $@battlecave8, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol8, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -878,8 +1150,7 @@ L_AlreadyClean:
025-3.gat,138,160,0 script #WarpBattleCave9 45,1,1,{
if (Rossy_Quest >= 16 || FLAGS & FLAG_ROSSI_COMPLETED) goto L_AlreadyHelped;
- if (getareausers("025-4.gat", 144, 192, 173, 226) >= 1) goto L_SomeoneInside;
- if ($@timercontrol9 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 144, 192, 173, 226) >= 1 || $@battlecave9 == 1) goto L_SomeoneInside;
if (cavefights & BATTLE_CAVE9) goto L_AlreadyDone;
if (Rossy_Quest < 15) goto L_Block;
@@ -897,18 +1168,12 @@ L_SomeoneInside:
message strcharinfo(0), $@cave9fighter$ + " is already inside. The cave seems to be blocked.";
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_AlreadyDone:
- message strcharinfo(0), "I already defeated the monsters in this cave.";
+ message strcharinfo(0), "I already eliminated this source of energy.";
end;
L_AlreadyHelped:
- if (@juliadone9 == 1) end;
message strcharinfo(0), "There is nothing more than dead monster corpses in this cave.";
- set @juliadone9, 1;
end;
L_Block:
@@ -918,24 +1183,50 @@ L_Block:
OnTimer5000:
if ($@battlecave9 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave9fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 144, 192, 173, 226) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave9fighter$));
+ if (cavefights & BATTLE_CAVE9) goto L_Win;
+ if (getareausers("025-4.gat", 144, 192, 173, 226) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave9start >= $@CAVE9_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave9fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave9fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave9start) < 60) set $@cave9start, $@cave9start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave9_timer, $@cave9_timer + 5;
+ if ($@cave9_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave9, 0;
set $@cave9_kills, 0;
set $@cave9start, 0;
set $@cave9fighter$, "";
set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
killmonster "025-4.gat", "#StartCaveFight9::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-3.gat", 138, 158;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run away!";
+ set $@wave_cave9, 0;
+ set $@cave9_kills, 0;
+ set $@cave9start, 0;
+ set $@cave9fighter$, "";
+ set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave9fighter$));
warp "025-3.gat", 138, 158;
@@ -945,6 +1236,7 @@ L_Cleaning:
set $@cave9start, 0;
set $@cave9fighter$, "";
set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
killmonster "025-4.gat", "#StartCaveFight9::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -959,6 +1251,7 @@ L_CleaningDead:
set $@cave9start, 0;
set $@cave9fighter$, "";
set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
killmonster "025-4.gat", "#StartCaveFight9::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
@@ -970,13 +1263,26 @@ L_CleaningNorid:
set $@cave9start, 0;
set $@cave9fighter$, "";
set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
killmonster "025-4.gat", "#StartCaveFight9::OnMonsterDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave9fighter$));
+ warp "025-3.gat", 138, 158;
+ set $@wave_cave9, 0;
+ set $@cave9_kills, 0;
+ set $@cave9start, 0;
+ set $@cave9fighter$, "";
+ set $@cave9fighterdeaths$, 0;
+ set $@battlecave9, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol9, 0;
stopnpctimer;
setnpctimer 0;
end;
@@ -998,8 +1304,7 @@ L_AlreadyClean:
if (cavefights & BATTLE_CAVE8) set @barrier_force, @barrier_force + 1;
if (cavefights & BATTLE_CAVE9) set @barrier_force, @barrier_force + 1;
if (@barrier_force != 0) goto L_Hurt;
- if (getareausers("025-4.gat", 142, 24, 172, 48) >= 1) goto L_SomeoneInside;
- if ($@timercontrol10 != 0) goto L_Wait;
+ if (getareausers("025-4.gat", 142, 24, 172, 48) >= 1 || $@battlecave10 == 1) goto L_SomeoneInside;
if (@barrier_force == 0) goto L_StartFight;
end;
@@ -1009,13 +1314,9 @@ L_Hurt:
warp "025-3.gat", 77, 164;
end;
-L_Wait:
- message strcharinfo(0), "Someone just got out of the cave, but it is still blocked. I should try to enter again.";
- end;
-
L_StartFight:
message strcharinfo(0), "You go through the magic barrier without problems... you can hear screams that seem to be very close.";
- set $@battlebosscave, 1;
+ set $@battlecave10, 1;
warp "025-4.gat", 157, 44;
set $@cave10fighter$, strcharinfo(0);
set $@cave10fighterdeaths, PC_DIE_COUNTER;
@@ -1033,27 +1334,53 @@ L_AlreadyHelped:
end;
OnTimer5000:
- if ($@battlebosscave == 0) goto L_AlreadyClean;
+ if ($@battlecave10 == 0) goto L_AlreadyClean;
if (isloggedin(getcharid(3,$@cave10fighter$))==0) goto L_CleaningNorid;
- if (getareausers("025-4.gat", 142, 24, 172, 48) < 1) goto L_Ranaway;
attachrid(getcharid(3,$@cave10fighter$));
+ if (Rossy_Quest == 16) goto L_Win;
+ if (getareausers("025-4.gat", 142, 24, 172, 48) < 1) goto L_Ranaway;
if (gettimetick(2) - $@cave10start >= $@CAVE10_TIME) goto L_Cleaning;
if (PC_DIE_COUNTER > $@cave10fighterdeaths) goto L_CleaningDead;
setnpctimer 0;
end;
+L_Win:
+ attachrid(getcharid(3,$@cave10fighter$));
+ message strcharinfo(0), "It is getting more and more difficult to breathe inside this cave... You feel like you are almost passing out.";
+ if ((gettimetick(2) - $@cave10start) < 60) set $@cave10start, $@cave10start + 60;
+ if (Hp - (MaxHp*5)/100 <= 0) goto L_BadAir;
+ percentheal -5, 0;
+ set $@cave10_timer, $@cave10_timer + 5;
+ if ($@cave10_timer >= 60) goto L_BadAir;
+ setnpctimer 0;
+ end;
+
L_Ranaway:
set $@wave_cave10, 0;
set $@cave10_kills, 0;
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
killmonster "025-4.gat", "#StartBossCaveFight::OnMonsterDeath";
killmonster "025-4.gat", "#StartBossCaveFight::OnBossDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_BadAir:
+ warp "025-4.gat", 93, 33;
+ message strcharinfo(0), "You can't stand the foul air inside the cave and run as fast as you can to save Julia!";
+ set $@wave_cave10, 0;
+ set $@cave10_kills, 0;
+ set $@cave10start, 0;
+ set $@cave10fighter$, "";
+ set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_Cleaning:
attachrid(getcharid(3,$@cave10fighter$));
warp "025-3.gat", 77, 168;
@@ -1063,6 +1390,7 @@ L_Cleaning:
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
killmonster "025-4.gat", "#StartBossCaveFight::OnMonsterDeath";
killmonster "025-4.gat", "#StartBossCaveFight::OnBossDeath";
stopnpctimer;
@@ -1079,6 +1407,7 @@ L_CleaningDead:
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
killmonster "025-4.gat", "#StartBossCaveFight::OnMonsterDeath";
killmonster "025-4.gat", "#StartBossCaveFight::OnBossDeath";
stopnpctimer;
@@ -1091,14 +1420,40 @@ L_CleaningNorid:
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
killmonster "025-4.gat", "#StartBossCaveFight::OnMonsterDeath";
killmonster "025-4.gat", "#StartBossCaveFight::OnBossDeath";
stopnpctimer;
setnpctimer 0;
end;
+OnGetout:
+ attachrid(getcharid(3,$@cave10fighter$));
+ warp "025-3.gat", 77, 168;
+ set $@wave_cave10, 0;
+ set $@cave10_kills, 0;
+ set $@cave10start, 0;
+ set $@cave10fighter$, "";
+ set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+OnWin:
+ attachrid(getcharid(3,$@cave10fighter$));
+ warp "025-4.gat", 93, 33;
+ set $@wave_cave10, 0;
+ set $@cave10_kills, 0;
+ set $@cave10start, 0;
+ set $@cave10fighter$, "";
+ set $@cave10fighterdeaths$, 0;
+ set $@battlecave10, 0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
L_AlreadyClean:
- set $@timercontrol10, 0;
stopnpctimer;
setnpctimer 0;
end;