Переглянути джерело

Reverted and optimized treasure room protection script, and disabled by default since isn't working anymore on official servers.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16557 54d463be-8e91-2dee-dedb-b68131a5f0ec
daegaladh 13 роки тому
батько
коміт
47e59df253
3 змінених файлів з 41 додано та 66 видалено
  1. 39 64
      npc/guild/trs_rp.txt
  2. 1 1
      npc/guild2/arug_cas01.txt
  3. 1 1
      npc/scripts_guild.conf

+ 39 - 64
npc/guild/trs_rp.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Masao
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= rAthena
 //===== Description: ========================================= 
@@ -11,72 +11,47 @@
 //= Guildleader.
 //===== Additional Comments: ================================= 
 //= 1.0 Converted from the official script.
+//= 1.1 Reverted back and optimized. [Daegaladh]
 //============================================================ 
 
--	script	ban_warp#1::prtg	139,6,6,{
+-       script  Gld_Trea_Protect::Gld_Trea_Protect      -1,{
 
 OnTouch:
-	set .@GID,getcharid(2);
-	if (GetGuildMaster(.@GID) != strcharinfo(0)) {
-		warp "prontera",119,64;
-		end;
-	}
-	end;
+	// Store the Guild ID of castle occupant.
+	set .@GID, getcastledata(strnpcinfo(2),1);
+        if (strcharinfo(0) != getguildmaster(.@GID)) {
+                if (compare(strnpcinfo(2),"aldeg"))
+                        warp "aldebaran",143,112;
+                else if (compare(strnpcinfo(2),"gefg"))
+                        warp "geffen",120,38;
+                else if (compare(strnpcinfo(2),"payg"))
+                        warp "payon",100,100;
+                else if (compare(strnpcinfo(2),"prtg"))
+                        warp "prontera",119,64;
+        }
+        end;
 }
 
-prtg_cas01,11,208,0	duplicate(prtg)	ban_warp#1-2	139,6,6
-prtg_cas02,202,228,0	duplicate(prtg)	ban_warp#2	139,6,6
-prtg_cas03,189,132,0	duplicate(prtg)	ban_warp#3	139,6,6
-prtg_cas04,271,162,0	duplicate(prtg)	ban_warp#4	139,6,6
-prtg_cas05,276,178,0	duplicate(prtg)	ban_warp#5	139,6,6
-
--	script	ban_warp#6::payg	139,6,6,{
-
-OnTouch:
-	set .@GID,getcharid(2);
-	if (GetGuildMaster(.@GID) != strcharinfo(0)) {
-		warp "payon",100,100;
-		end;
-	}
-	end;
-}
-
-payg_cas01,291,8,0	duplicate(payg)	ban_warp#6-2	139,6,6
-payg_cas02,145,144,0	duplicate(payg)	ban_warp#7	139,6,6
-payg_cas03,159,168,0	duplicate(payg)	ban_warp#8	139,6,6
-payg_cas04,147,48,0	duplicate(payg)	ban_warp#9	139,6,6
-payg_cas05,157,132,0	duplicate(payg)	ban_warp#10	139,6,6
-
--	script	ban_warp#11::aldeg	139,8,8,{
-
-OnTouch:
-	set .@GID,getcharid(2);
-	if (GetGuildMaster(.@GID) != strcharinfo(0)) {
-		warp "aldebaran",143,112;
-		end;
-	}
-	end;
-}
-
-aldeg_cas01,118,223,0	duplicate(aldeg)	ban_warp#11-2	139,8,8
-aldeg_cas02,135,230,0	duplicate(aldeg)	ban_warp#12	139,8,8
-aldeg_cas03,225,269,0	duplicate(aldeg)	ban_warp#13	139,8,8
-aldeg_cas04,84,13,0	duplicate(aldeg)	ban_warp#14	139,8,8
-aldeg_cas05,62,12,0	duplicate(aldeg)	ban_warp#15	139,8,8
-
--	script	ban_warp#16::gefg	139,6,6,{
-
-OnTouch:
-	set .@GID,getcharid(2);
-	if (GetGuildMaster(.@GID) != strcharinfo(0)) {
-		warp "geffen",120,38;
-		end;
-	}
-	end;
-}
-
-gefg_cas01,154,112,0	duplicate(gefg)	ban_warp#16-2	139,6,6
-gefg_cas02,140,116,0	duplicate(gefg)	ban_warp#17	139,6,6
-gefg_cas03,271,290,0	duplicate(gefg)	ban_warp#18	139,6,6
-gefg_cas04,116,119,0	duplicate(gefg)	ban_warp#19	139,6,6
-gefg_cas05,144,110,0	duplicate(gefg)	ban_warp#20	139,6,6
+prtg_cas01,11,208,0	duplicate(Gld_Trea_Protect)	ban_warp#prtg_cas01	-1,6,6
+prtg_cas02,202,228,0	duplicate(Gld_Trea_Protect)	ban_warp#prtg_cas02	-1,6,6
+prtg_cas03,189,132,0	duplicate(Gld_Trea_Protect)	ban_warp#prtg_cas03	-1,6,6
+prtg_cas04,271,162,0	duplicate(Gld_Trea_Protect)	ban_warp#prtg_cas04	-1,6,6
+prtg_cas05,276,178,0	duplicate(Gld_Trea_Protect)	ban_warp#prtg_cas05	-1,6,6
+
+payg_cas01,291,8,0	duplicate(Gld_Trea_Protect)	ban_warp#payg_cas01	-1,6,6
+payg_cas02,145,144,0	duplicate(Gld_Trea_Protect)	ban_warp#payg_cas02	-1,6,6
+payg_cas03,159,168,0	duplicate(Gld_Trea_Protect)	ban_warp#payg_cas03	-1,6,6
+payg_cas04,147,48,0	duplicate(Gld_Trea_Protect)	ban_warp#payg_cas04	-1,6,6
+payg_cas05,157,132,0	duplicate(Gld_Trea_Protect)	ban_warp#payg_cas05	-1,6,6
+
+aldeg_cas01,118,223,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas01	-1,8,8
+aldeg_cas02,135,230,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas02	-1,8,8
+aldeg_cas03,225,269,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas03	-1,8,8
+aldeg_cas04,84,13,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas04	-1,8,8
+aldeg_cas05,62,12,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas05	-1,8,8
+
+gefg_cas01,154,112,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas01	-1,6,6
+gefg_cas02,140,116,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas02	-1,6,6
+gefg_cas03,271,290,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas03	-1,6,6
+gefg_cas04,116,119,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas04	-1,6,6
+gefg_cas05,144,110,0	duplicate(Gld_Trea_Protect)	ban_warp#aldeg_cas05	-1,6,6

+ 1 - 1
npc/guild2/arug_cas01.txt

@@ -124,7 +124,7 @@ OnClock0001:
 	set .@Treasure,GetCastleData("arug_cas01",2)/5+4;
 	if (.@Treasure) {
 		monster "arug_cas01",251,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
-		monster "arug_cas01",251,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
+		monster "arug_cas01",252,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
 		monster "arug_cas01",253,369,"Treasure Chest",1943,1,"Manager#aru01_02::OnTreasureDied";
 		monster "arug_cas01",254,369,"Treasure Chest",1324,1,"Manager#aru01_02::OnTreasureDied";
 		if (.@Treasure < 5) end;

+ 1 - 1
npc/scripts_guild.conf

@@ -32,7 +32,7 @@ npc: npc/guild/prtg_cas03.txt
 npc: npc/guild/prtg_cas04.txt
 npc: npc/guild/prtg_cas05.txt
 // - Treasure Room Protection
-npc: npc/guild/trs_rp.txt
+//npc: npc/guild/trs_rp.txt
 
 // --------------- War of Emperium Second Edition ---------------
 // WoE SE scripts in their purest form, unoptomized.