summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 11:14:20 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 11:14:20 +0000
commit61c9ecdec07f41a48e65a238d7f7338bb543c4e7 (patch)
treee0bbfd0b46cdeab2b1b60f0a093150487d9f6070
parent4cbc9454fca17c95515554992b2ccc4e5fe71e72 (diff)
downloadhercules-61c9ecdec07f41a48e65a238d7f7338bb543c4e7.tar.gz
hercules-61c9ecdec07f41a48e65a238d7f7338bb543c4e7.tar.bz2
hercules-61c9ecdec07f41a48e65a238d7f7338bb543c4e7.tar.xz
hercules-61c9ecdec07f41a48e65a238d7f7338bb543c4e7.zip
optimized warps scripts
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6748 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--npc/Changelog.txt2
-rw-r--r--npc/warps/cities/yuno.txt82
-rw-r--r--npc/warps/dungeons/alde_ct.txt65
-rw-r--r--npc/warps/dungeons/ant_hell.txt22
-rw-r--r--npc/warps/dungeons/payon_dun.txt6
-rw-r--r--npc/warps/fields/morroc_fild.txt8
6 files changed, 89 insertions, 96 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index d396406b3..c7d23aca5 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -30,6 +30,8 @@ Evera
Date Added
======
+05/25
+ * Optimized a bit scripted warps, got rid of 'anthell' perm var [Lupus]
05/24
* Removed Blue Potions from Yuno Shops [Playtester]
* Fixed the Thanatos Floor 12 warp [Playtester]
diff --git a/npc/warps/cities/yuno.txt b/npc/warps/cities/yuno.txt
index 81446eebb..b70ca4961 100644
--- a/npc/warps/cities/yuno.txt
+++ b/npc/warps/cities/yuno.txt
@@ -4,7 +4,7 @@
//= Nana (1.0)
//= Sara-chan (1.1)
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Compatible With: =====================================
//= Any Athena Version; RO Episode 5+
//===== Description: =========================================
@@ -13,6 +13,7 @@
//= 1.1 - Added Yuno Airport warps
//= 1.2 Moved all airports to Airplane Warps [Lupus]
//= 1.3 Dr.Evil's yuno_05 warps update [Lupus]
+//= 1.4 optimized [Lupus]
//============================================================
//= Yuno City ================================================
@@ -81,113 +82,110 @@ yuno_in02.gat,82,14,0 warp yun61 1,1,yuno_in05.gat,192,194
yuno_in05.gat,196,194,0 warp yun62 1,1,yuno_in02.gat,85,14
// Yuno In05 (Entering Random Warps) -------------------------------------------
yuno_in05.gat,153,141,0 script #yun63 45,1,1,{
- set @warp0,rand(2);
- if(@warp0==0) goto w1;
- if(@warp0==1) goto w2;
-w1: warp "yuno_in05",192,102; end;
-w2: warp "yuno_in05",145,82; end;
+ if(rand(2)){
+ warp "yuno_in05",192,102;
+ } else {
+ warp "yuno_in05",145,82;
+ }
+ end;
}
// Yuno In05 (Random Warps - Cross Shaped) -------------------------------------
yuno_in05.gat,196,102,0 script #yun64 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",169,102; end;
+ warp "yuno_in05",169,102; end;
w2: warp "yuno_in05",128,82; end;
w3: warp "yuno_in05",156,141; end;
}
yuno_in05.gat,181,116,0 script #yun65 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,94; end;
+ warp "yuno_in05",181,94; end;
w2: warp "yuno_in05",176,13; end;
w3: warp "yuno_in05",136,75; end;
}
yuno_in05.gat,165,102,0 script #yun66 45,1,1,{
- set @warp0,rand(2);
- if(@warp0==0) goto w1;
- if(@warp0==1) goto w2;
-w1: warp "yuno_in05",192,102; end;
-w2: warp "yuno_in05",145,82; end;
+ if(rand(2)){
+ warp "yuno_in05",192,102;
+ } else {
+ warp "yuno_in05",145,82;
+ }
+ end;
}
yuno_in05.gat,181,91,0 script #yun67 45,1,1,{
- set @warp0,rand(2);
- if(@warp0==0) goto w1;
- if(@warp0==1) goto w2;
-w1: warp "yuno_in05",181,112; end;
-w2: warp "yuno_in05",176,48; end;
+ if(rand(2)){
+ warp "yuno_in05",181,112;
+ } else {
+ warp "yuno_in05",176,48;
+ }
+ end;
}
// Yuno In05 (Random Warps - T-Shaped) -----------------------------------------
yuno_in05.gat,148,82,0 script #yun68 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",169,102; end;
+ warp "yuno_in05",169,102; end;
w2: warp "yuno_in05",128,82; end;
w3: warp "yuno_in05",156,141; end;
}
yuno_in05.gat,125,82,0 script #yun69 45,1,1,{
- set @warp0,rand(2);
- if(@warp0==0) goto w1;
- if(@warp0==1) goto w2;
-w1: warp "yuno_in05",192,102; end;
-w2: warp "yuno_in05",145,82; end;
+ if(rand(2)){
+ warp "yuno_in05",192,102;
+ } else {
+ warp "yuno_in05",145,82;
+ }
+ end;
}
yuno_in05.gat,136,71,0 script #yun70 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,112; end;
+ warp "yuno_in05",181,112; end;
w2: warp "yuno_in05",16,185; end;
w3: warp "yuno_in05",176,48; end;
}
// Yuno In05 (Random Warps - Other) --------------------------------------------
yuno_in05.gat,16,188,0 script #yun71 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,94; end;
+ warp "yuno_in05",181,94; end;
w2: warp "yuno_in05",176,13; end;
w3: warp "yuno_in05",136,75; end;
}
yuno_in05.gat,176,9,0 script #yun72 45,1,1,{
- set @warp0,rand(2);
- if(@warp0==0) goto w1;
- if(@warp0==1) goto w2;
-w1: warp "yuno_in05",181,112; end;
-w2: warp "yuno_in05",176,48; end;
+ if(rand(2)){
+ warp "yuno_in05",181,112;
+ } else {
+ warp "yuno_in05",176,48;
+ }
+ end;
}
yuno_in05.gat,176,52,0 script #yun73 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,94; end;
+ warp "yuno_in05",181,94; end;
w2: warp "yuno_in05",176,13; end;
w3: warp "yuno_in05",136,75; end;
}
// Yuno In05 (Destination - Room) ----------------------------------------------
yuno_in05.gat,40,178,0 script #yun74 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,94; end;
+ warp "yuno_in05",181,94; end;
w2: warp "yuno_in05",176,13; end;
w3: warp "yuno_in05",136,75; end;
}
yuno_in05.gat,47,186,0 script #yun75 45,1,1,{
set @warp0,rand(3);
- if(@warp0==0) goto w1;
if(@warp0==1) goto w2;
if(@warp0==2) goto w3;
-w1: warp "yuno_in05",181,94; end;
+ warp "yuno_in05",181,94; end;
w2: warp "yuno_in05",176,13; end;
w3: warp "yuno_in05",136,75; end;
}
diff --git a/npc/warps/dungeons/alde_ct.txt b/npc/warps/dungeons/alde_ct.txt
index 69d2a6df7..2ec503dc2 100644
--- a/npc/warps/dungeons/alde_ct.txt
+++ b/npc/warps/dungeons/alde_ct.txt
@@ -3,14 +3,14 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= Any Athena Version; RO Episode 2+
//===== Description: =========================================
//= Warp Points for Clock Tower
//===== Additional Comments: =================================
-//= Split off Aldebaran.txt
-//= 1.1 fixed clt007 warp
+//= Split off Aldebaran.txt 1.1 fixed clt007 warp
+//= 1.3 Optimized [Lupus]
//============================================================
//= Al De Baran Clock Tower
@@ -27,10 +27,9 @@ c_tower2.gat,273,26,0 warp clt005 1,1,c_tower1.gat,235,223
//= Random 2-1 ===============================================
c_tower2.gat,13,288,4 script clt006r 45,1,1,{
set @r,rand(3);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",13,282; end;
+ warp "c_tower2.gat",13,282; end;
w2: warp "alde_dun03.gat",175,131; end;
w3: warp "c_tower3.gat",235,7; end;
}
@@ -38,10 +37,9 @@ c_tower2.gat,13,288,4 script clt006r 45,1,1,{
//= Random 2-2 ===============================================
c_tower2.gat,223,267,4 script clt007r 45,1,1,{
set @r,rand(3);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",288,267; end;
+ warp "c_tower2.gat",288,267; end;
w2: warp "alde_dun03.gat",130,130; end;
w3: warp "c_tower3.gat",252,29; end;
}
@@ -55,20 +53,20 @@ c_tower3.gat,146,8,0 warp clt013 1,1,c_tower1.gat,235,223
//============================================================
//= Random 3-1 ===============================================
c_tower3.gat,163,252,4 script clt014r 45,1,1,{
- set @r,rand(2);
- if(@r==0) goto w1;
- if(@r==1) goto w2;
- w1: warp "c_tower3.gat",168,252; end;
- w2: warp "alde_dun02.gat",262,41; end;
+ if(rand(2)) {
+ warp "c_tower3.gat",168,252;
+ } else {
+ warp "alde_dun02.gat",262,41;
+ }
+ end;
}
//============================================================
//= Random 3-2 ===============================================
c_tower3.gat,240,7,4 script clt015r 45,1,1,{
set @r,rand(3);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",13,282; end;
+ warp "c_tower2.gat",13,282; end;
w2: warp "alde_dun03.gat",175,131; end;
w3: warp "c_tower3.gat",235,7; end;
}
@@ -76,10 +74,9 @@ c_tower3.gat,240,7,4 script clt015r 45,1,1,{
//= Random 3-3 ===============================================
c_tower3.gat,252,24,4 script clt016r 45,1,1,{
set @r,rand(3);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",228,267; end;
+ warp "c_tower2.gat",228,267; end;
w2: warp "alde_dun03.gat",130,130; end;
w3: warp "c_tower3.gat",252,29; end;
}
@@ -99,11 +96,10 @@ c_tower4.gat,204,57,0 warp clt026 1,1,c_tower4.gat,65,77
//= Random 4-1 ===============================================
c_tower4.gat,75,156,4 script clt027r 45,0,0,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower3.gat",168,252; end;
+ warp "c_tower3.gat",168,252; end;
w2: warp "alde_dun02.gat",262,41; end;
w3: warp "c_tower4.gat",73,154; end;
w4: warp "c_tower4.gat",140,149; end;
@@ -112,11 +108,10 @@ c_tower4.gat,75,156,4 script clt027r 45,0,0,{
//= Random 4-2 ===============================================
c_tower4.gat,68,79,4 script clt028r 45,0,0,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower2.gat",13,282; end;
+ warp "c_tower2.gat",13,282; end;
w2: warp "alde_dun03.gat",175,131; end;
w3: warp "c_tower3.gat",235,7; end;
w4: warp "c_tower4.gat",65,77; end;
@@ -125,11 +120,10 @@ c_tower4.gat,68,79,4 script clt028r 45,0,0,{
//= Random 4-3 ===============================================
c_tower4.gat,142,151,4 script clt029r 45,0,0,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower3.gat",168,252; end;
+ warp "c_tower3.gat",168,252; end;
w2: warp "alde_dun02.gat",262,41; end;
w3: warp "c_tower4.gat",73,154; end;
w4: warp "c_tower4.gat",140,149; end;
@@ -138,11 +132,10 @@ c_tower4.gat,142,151,4 script clt029r 45,0,0,{
//= Random 4-4 ===============================================
c_tower4.gat,151,96,4 script clt030r 45,0,0,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower2.gat",228,267; end;
+ warp "c_tower2.gat",228,267; end;
w2: warp "alde_dun03.gat",130,130; end;
w3: warp "c_tower3.gat",252,29; end;
w4: warp "c_tower4.gat",152,95; end;
@@ -151,11 +144,10 @@ c_tower4.gat,151,96,4 script clt030r 45,0,0,{
//= Random 4-5 ===============================================
c_tower4.gat,189,40,4 script clt031r 45,2,2,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower2.gat",228,267; end;
+ warp "c_tower2.gat",228,267; end;
w2: warp "alde_dun03.gat",130,130; end;
w3: warp "c_tower3.gat",252,29; end;
w4: warp "c_tower4.gat",152,95; end;
@@ -172,11 +164,12 @@ alde_dun02.gat,187,234,0 warp ald007 2,2,c_tower3.gat,65,147
//============================================================
//= Random B2 ================================================
alde_dun02.gat,267,41,4 script clt008r 45,1,1,{
- set @r,rand(2);
- if(@r==0) goto w1;
- if(@r==1) goto w2;
- w1: warp "c_tower3.gat",168,252; end;
- w2: warp "alde_dun02.gat",262,141; end;
+ if(rand(2)) {
+ warp "c_tower3.gat",168,252;
+ } else {
+ warp "alde_dun02.gat",262,141;
+ }
+ end;
}
alde_dun03.gat,12,267,0 warp aldd09 2,2,alde_dun02.gat,273,250
alde_dun03.gat,277,183,0 warp ald010 2,2,c_tower2.gat,27,27
@@ -187,10 +180,9 @@ alde_dun03.gat,276,48,0 warp ald012 2,2,c_tower1.gat,235,223
//= Random B3-1 ================================================
alde_dun03.gat,130,125,4 script clt014r 45,1,1,{
set @r,rand(3);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",228,267; end;
+ warp "c_tower2.gat",228,267; end;
w2: warp "alde_dun03.gat",130,130; end;
w3: warp "c_tower3.gat",252,29; end;
}
@@ -198,10 +190,9 @@ alde_dun03.gat,130,125,4 script clt014r 45,1,1,{
//= Random 3-2 ===============================================
alde_dun03.gat,171,127,4 script clt015r 45,1,1,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
- w1: warp "c_tower2.gat",13,282; end;
+ warp "c_tower2.gat",13,282; end;
w2: warp "alde_dun03.gat",175,131; end;
w3: warp "c_tower3.gat",235,7; end;
}
@@ -213,14 +204,12 @@ alde_dun04.gat,208,58,0 warp aldd20 2,2,alde_dun04.gat,268,74
alde_dun04.gat,272,74,0 warp aldd021 2,2,alde_dun04.gat,204,62
alde_dun04.gat,80,34,4 script clt022r 45,1,1,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "c_tower2.gat",13,282; end;
+ warp "c_tower2.gat",13,282; end;
w2: warp "alde_dun03.gat",175,131; end;
w3: warp "c_tower3.gat",235,7; end;
w4: warp "alde_dun04.gat",84,36; end;
}
//============================================================
-//============================================================
diff --git a/npc/warps/dungeons/ant_hell.txt b/npc/warps/dungeons/ant_hell.txt
index 808f5c4b2..94d12ea1c 100644
--- a/npc/warps/dungeons/ant_hell.txt
+++ b/npc/warps/dungeons/ant_hell.txt
@@ -3,25 +3,31 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= Any Athena Version
//===== Description: =========================================
//= Warp Points for Ant Hell
//===== Additional Comments: =================================
-//= No Comment!
+//= 1.3 Changed var anthell to @anthell. Optimized [Lupus]
//============================================================
//= Ant Hell =================================================
anthell01.gat,35,267,0 script ant001 45,1,1,{
- if( anthell==1) goto moc15;
- warp "moc_fild04.gat",213,327; end;
-moc15: warp "moc_fild15.gat",251,248; end;
+ if(@anthell) {
+ warp "moc_fild15.gat",251,248;
+ } else {
+ warp "moc_fild04.gat",213,327;
+ }
+ end;
}
anthell02.gat,171,169,0 script ant001 45,1,2,{
- if(anthell==0) goto moc15;
- warp "moc_fild04.gat",213,327; end;
-moc15: warp "moc_fild15.gat",251,248; end;
+ if(@anthell) {
+ warp "moc_fild04.gat",213,327;
+ } else {
+ warp "moc_fild15.gat",251,248;
+ }
+ end;
}
anthell01.gat,253,32,0 warp ant01 2,1,anthell02.gat,34,263
anthell02.gat,32,267,0 warp ant01-1 2,2,anthell01.gat,253,35
diff --git a/npc/warps/dungeons/payon_dun.txt b/npc/warps/dungeons/payon_dun.txt
index b337a0aed..1857a3c86 100644
--- a/npc/warps/dungeons/payon_dun.txt
+++ b/npc/warps/dungeons/payon_dun.txt
@@ -3,13 +3,12 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.1a
+//= 1.2
//===== Compatible With: =====================================
//= Any eAthena Mod
//===== Description: =========================================
//= Payon Dungeon Warps
//===== Additional Comments: =================================
-//= No Comment
//= 1.1a Fixed 'payd04r' warping players to a non-existant tile [MasterOfMuppets]
//============================================================
@@ -23,11 +22,10 @@ pay_dun02.gat,16,63,0 warp payd02-1 2,7,pay_dun01.gat,283,28
pay_dun03.gat,155,161,0 warp payd03-1 2,1,pay_dun02.gat,137,126
pay_dun03.gat,127,62,4 script payd04r 45,2,2,{
set @r,rand(4);
- if(@r==0) goto w1;
if(@r==1) goto w2;
if(@r==2) goto w3;
if(@r==3) goto w4;
- w1: warp "pay_dun04.gat",201,204; end;
+ warp "pay_dun04.gat",201,204; end;
w2: warp "pay_dun04.gat",189,43; end;
w3: warp "pay_dun04.gat",43,40; end;
w4: warp "pay_dun04.gat",34,202; end;
diff --git a/npc/warps/fields/morroc_fild.txt b/npc/warps/fields/morroc_fild.txt
index b42121f6b..37a3c39e9 100644
--- a/npc/warps/fields/morroc_fild.txt
+++ b/npc/warps/fields/morroc_fild.txt
@@ -3,13 +3,13 @@
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Any Athena Version
//===== Description: =========================================
//= Warp Points for Morroc Fields
//===== Additional Comments: =================================
-//= No Comment!
+//= 1.1 changed 'anthell' to @anthell [Lupus]
//============================================================
//= Sograt Dessert ===========================================
@@ -37,7 +37,7 @@ moc_fild04.gat,14,146,0 warp mocf07-2 1,11,moc_fild05.gat,378,119
moc_fild04.gat,14,98,0 warp mocf07 1,11,moc_fild05.gat,378,119
moc_fild04.gat,175,18,0 warp mocf08 3,2,moc_fild08.gat,170,380
moc_fild04.gat,19,206,0 warp mocf09 3,15,moc_fild05.gat,373,208
-moc_fild04.gat,219,327,0 script mocf016 45,3,4,{ set anthell,0; warp "anthell01.gat",35,262; }
+moc_fild04.gat,219,327,0 script mocf016 45,3,4,{ set @anthell,0; warp "anthell01.gat",35,262; }
moc_fild04.gat,292,381,0 warp mocf01-2 10,1,moc_fild01.gat,76,25
moc_fild04.gat,314,381,0 warp mocf01-3 10,1,moc_fild01.gat,76,25
moc_fild04.gat,336,381,0 warp mocf01-4 10,1,moc_fild01.gat,76,25
@@ -86,7 +86,7 @@ moc_fild14.gat,16,278,0 warp mocf25 2,6,moc_fild15.gat,364,276
moc_fild14.gat,196,382,0 warp mocf16-1 4,2,moc_fild08.gat,204,19
moc_fild15.gat,104,16,0 warp mocf26 9,2,moc_fild16.gat,125,380
moc_fild15.gat,158,363,0 warp mocf18-1 6,2,moc_fild09.gat,126,23
-moc_fild15.gat,258,253,0 script mocf017 45,3,3,{ set anthell,1; warp "anthell01.gat",35,262; }
+moc_fild15.gat,258,253,0 script mocf017 45,3,3,{ set @anthell,1; warp "anthell01.gat",35,262; }
moc_fild15.gat,348,18,0 warp mocf27 5,2,moc_fild16.gat,334,379
moc_fild15.gat,367,276,0 warp mocf25-1 2,4,moc_fild14.gat,19,278
moc_fild15.gat,38,105,0 warp mocf23-1 2,4,moc_fild11.gat,376,197