Bläddra i källkod

- Updating Thanatos quest with a check to prevent multiple Thanatos spawning.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9329 54d463be-8e91-2dee-dedb-b68131a5f0ec
eaac 18 år sedan
förälder
incheckning
d1a65b601a
3 ändrade filer med 45 tillägg och 22 borttagningar
  1. 2 0
      npc/Changelog.txt
  2. 25 7
      npc/custom/eAAC_Scripts/banker.txt
  3. 18 15
      npc/quests/thana_quest.txt

+ 2 - 0
npc/Changelog.txt

@@ -34,6 +34,8 @@ KarLaeda
 Date		Added
 ======
 11/26
+	* Added a check to prevent spawning of more than one Thanatos in the Thanatos Quest.
+	  Thanks to Kodachi for reporting on IRC [erKURITA]
 	* Enabled Rachel Field spawns so they can be tested [Playtester]
 11/24
 	* Cleaned up global permanent variables in Airship Quest [KarLaeda]

+ 25 - 7
npc/custom/eAAC_Scripts/banker.txt

@@ -53,12 +53,18 @@
 //| 	to the ground because A) Too many coins (more than 30,000 ea)
 //| 	B) Your current weight + total coins weight were greater than
 //| 	your max weight, causing them to drop due to "over-weight".
-//|	Thanks to Niktout for spotting it.
+//|		Thanks to Niktout for spotting it.
 
 //| Revision:
 //| v.2.7: Added a check to the Zeny -> Coin Mix label. It seems you
-//|	can trade with negative zeny (meh...). This should prevent it.
-//|	Thanks to Niktout.
+//|		can trade with negative zeny (meh...). This should prevent it.
+//|		Thanks to Niktout.
+
+//| Revision:
+//| v.2.8: Added a n00b check for the Zeny -> Coin function. Should
+//| 	prevent zeny overflow. Also added a variable cleaning section
+//| 	at the beginning of the Mix function, to prevent old values
+//| 	to be used as a payout.
 
 //| Upcomming possible updates:
 //| v.3.0: Adding a refining system, so you can gather ore and the likes
@@ -86,6 +92,7 @@ set @name1$,getitemname(@bronzecoinid);		//|
 set @name2$,getitemname(@silvercoinid);		//|
 set @name3$,getitemname(@goldcoinid);		//|
 set @name4$,getitemname(@mithrilcoinid);	//|
+set @MAX_ZENY,1000000000;			//|
 //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 mes @npcname$;
@@ -133,16 +140,16 @@ L_Coincheckout:
 switch(getarg(0)) {
 	case @bronzecoinid:
 		set @coinname$,"^996600"+getitemname(getarg(0))+"^000000";
-		goto L_PreInputing;
+		break;
 	case @silvercoinid:
 		set @coinname$,"^999999"+getitemname(getarg(0))+"^000000";
-		goto L_PreInputing;
+		break;
 	case @goldcoinid:
 		set @coinname$,"^FFCC00"+getitemname(getarg(0))+"^000000";
-		goto L_PreInputing;
+		break;
 	case @mithrilcoinid:
 		set @coinname$,"^CCCCCC"+getitemname(getarg(0))+"^000000";
-		goto L_PreInputing;
+		break;
 	}
 
 
@@ -166,6 +173,11 @@ next;
 			mes "You don't have enough coins, please get some";
 			next;
 			goto L_Menu;
+		} else if (@coinamount*getarg(1) > @MAX_ZENY) {
+			mes @npcname$;
+			mes "I'm sorry, the quantity you inputted gives a bigger zeny amount than the max allowed. I can't allow this.";
+			next;
+			goto L_Menu
 		} else
 
 		next;
@@ -310,6 +322,12 @@ L_End:
 //| Mix function
 
 L_Mix:
+	set @totalzeny,0;
+	set @totalcoins,0;
+	set @bronzecoins,0;
+	set @silvercoins,0;
+	set @goldcoins,0;
+	set @mithrilcoins,0;
 	next;
 	mes @npcname$;
 	mes "Ok, let's start with ^996600"+@name1$+"s^000000";

+ 18 - 15
npc/quests/thana_quest.txt

@@ -1578,26 +1578,29 @@ thana_boss.gat,62,171,0	script	Carvings#5	111,{
 // Seal of Thanatos
 thana_boss.gat,141,217,0	script	Carvings#6	111,{
 
-  if ($Thana == 15) {
+	if ($Thana == 15) {
 
     mes "[Carvings]";
     mes "You stepped on the plate, and it seems it activated some sort of mechanism.";
     next;
 
-    stopnpctimer "TimerThana";
-    set $Thana, $Thana | 16;
-    monster "thana_boss.gat",135,119,"Thanatos",1708,1,"TimerThana::OnThanaDead";
-    mapannounce "thana_boss.gat", "The Seal of Thanatos has been broken.",bc_npc;
-
-    mes "[Carvings]";
-    mes "You hear the screams of the undead coming from below...";
-    close;
-
-  }
-
-  mes "[Carvings]";
-  mes "There is a plate here, which seems to be some sort of switch, but it doesn't move.";
-  close;
+    if (!getmapmobs("thana_boss.gat")) {
+		monster "thana_boss.gat",135,119,"Thanatos",1708,1,"TimerThana::OnThanaDead";
+	    stopnpctimer "TimerThana";
+	    set $Thana, $Thana | 16; 
+	    mapannounce "thana_boss.gat", "The Seal of Thanatos has been broken.",bc_npc;
+	    mes "[Carvings]";
+	    mes "You hear the screams of the undead coming from below...";
+	    close;
+	} else {
+		mes "[Carvings]";
+		mes "But nothing happened...";
+		close;
+	}
+
+	mes "[Carvings]";
+	mes "There is a plate here, which seems to be some sort of switch, but it doesn't move.";
+	close;
 
 }