summaryrefslogtreecommitdiff
path: root/world/map/npc/025-4
diff options
context:
space:
mode:
authorcoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-03 10:03:13 -0300
committercoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-03 10:03:13 -0300
commit5362f0739c124be81a8724a8759e20ef4d07e1aa (patch)
treebe4e5086f519e15ec673eb14b4b66b4e25ab3127 /world/map/npc/025-4
parent70adc42c045cc081185f0ddb256d2f4896ad7b50 (diff)
downloadserverdata-5362f0739c124be81a8724a8759e20ef4d07e1aa.tar.gz
serverdata-5362f0739c124be81a8724a8759e20ef4d07e1aa.tar.bz2
serverdata-5362f0739c124be81a8724a8759e20ef4d07e1aa.tar.xz
serverdata-5362f0739c124be81a8724a8759e20ef4d07e1aa.zip
Reviews the way the script checks for a rid attached.
Diffstat (limited to 'world/map/npc/025-4')
-rw-r--r--world/map/npc/025-4/battlecaves.txt68
1 files changed, 53 insertions, 15 deletions
diff --git a/world/map/npc/025-4/battlecaves.txt b/world/map/npc/025-4/battlecaves.txt
index 89a16305..5b6d50fd 100644
--- a/world/map/npc/025-4/battlecaves.txt
+++ b/world/map/npc/025-4/battlecaves.txt
@@ -36,10 +36,14 @@ L_Summon:
set $@cave1_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave1::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave1, $@wave_cave1 + 1;
set $@cave1_kills, 0;
- attachrid(getcharid(3,$@cave1fighter$));
+ if (attachrid(getcharid(3,$@cave1fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -188,10 +192,14 @@ L_Summon:
set $@cave2_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave2::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave2, $@wave_cave2 + 1;
set $@cave2_kills, 0;
- attachrid(getcharid(3,$@cave2fighter$));
+ if (attachrid(getcharid(3,$@cave2fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -266,10 +274,14 @@ L_Summon:
set $@cave3_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave3::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave3, $@wave_cave3 + 1;
set $@cave3_kills, 0;
- attachrid(getcharid(3,$@cave3fighter$));
+ if (attachrid(getcharid(3,$@cave3fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -345,10 +357,14 @@ L_Summon:
set $@cave4_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave4::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave4, $@wave_cave4 + 1;
set $@cave4_kills, 0;
- attachrid(getcharid(3,$@cave4fighter$));
+ if (attachrid(getcharid(3,$@cave4fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -427,10 +443,14 @@ L_Summon:
set $@cave5_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave5::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave5, $@wave_cave5 + 1;
set $@cave5_kills, 0;
- attachrid(getcharid(3,$@cave5fighter$));
+ if (attachrid(getcharid(3,$@cave5fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -509,10 +529,14 @@ L_Summon:
set $@cave6_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave6::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave6, $@wave_cave6 + 1;
set $@cave6_kills, 0;
- attachrid(getcharid(3,$@cave6fighter$));
+ if (attachrid(getcharid(3,$@cave6fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -591,10 +615,14 @@ L_Summon:
set $@cave7_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave7::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave7, $@wave_cave7 + 1;
set $@cave7_kills, 0;
- attachrid(getcharid(3,$@cave7fighter$));
+ if (attachrid(getcharid(3,$@cave7fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -675,10 +703,14 @@ L_Summon:
set $@cave8_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave8::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave8, $@wave_cave8 + 1;
set $@cave8_kills, 0;
- attachrid(getcharid(3,$@cave8fighter$));
+ if (attachrid(getcharid(3,$@cave8fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -759,10 +791,14 @@ L_Summon:
set $@cave9_loop, 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave9::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave9, $@wave_cave9 + 1;
set $@cave9_kills, 0;
- attachrid(getcharid(3,$@cave9fighter$));
+ if (attachrid(getcharid(3,$@cave9fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -840,16 +876,20 @@ L_Summon:
end;
L_SummonBoss:
- attachrid(getcharid(3,$@cave10fighter$));
+ if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort;
areamonster "025-4.gat",142, 24, 172, 48,"",$@BOSS,1,"#StartBossCaveFight::OnBossDeath";
stopnpctimer;
setnpctimer 0;
end;
+L_Abort:
+ donpcevent "#WarpBattleCave10::OnNoRid";
+ end;
+
L_Done:
set $@wave_cave10, $@wave_cave10 + 1;
set $@cave10_kills, 0;
- attachrid(getcharid(3,$@cave10fighter$));
+ if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort;
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
@@ -884,9 +924,7 @@ L_CleaningNorid:
end;
OnTimer4000:
- if (isloggedin(getcharid(3,$@cave10fighter$))==0)
- goto L_CleaningNorid;
- attachrid(getcharid(3,$@cave10fighter$));
+ if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort;
set @boss, @boss + 1;
if (@boss == 1)
message strcharinfo(0), "You feel something strange... Looks like something terrible is about to show up in this cave.";
@@ -902,7 +940,7 @@ OnMonsterDeath:
end;
OnBossDeath:
- attachrid(getcharid(3,$@cave10fighter$));
+ if (attachrid(getcharid(3,$@cave10fighter$)) == 0) goto L_Abort;
message strcharinfo(0), "What a harsh battle... You should hurry and save Julia!";
set Rossy_Quest, 16;
getexp 100000, 0;