summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authoreaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-27 18:20:15 +0000
committereaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-27 18:20:15 +0000
commit1f708096369b1447e4b970ab6cfb497e8317fce6 (patch)
treeb78280fd27e49be3ff589aa7109fcc38a361287a /npc
parent9b2e07da37f032d7347adc1c9ccdd618142d7d60 (diff)
downloadhercules-1f708096369b1447e4b970ab6cfb497e8317fce6.tar.gz
hercules-1f708096369b1447e4b970ab6cfb497e8317fce6.tar.bz2
hercules-1f708096369b1447e4b970ab6cfb497e8317fce6.tar.xz
hercules-1f708096369b1447e4b970ab6cfb497e8317fce6.zip
- Updating Thanatos quest with a check to prevent multiple Thanatos spawning.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9329 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc')
-rw-r--r--npc/Changelog.txt2
-rw-r--r--npc/custom/eAAC_Scripts/banker.txt32
-rw-r--r--npc/quests/thana_quest.txt33
3 files changed, 45 insertions, 22 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 911266f50..cf2b8861a 100644
--- a/npc/Changelog.txt
+++ b/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]
diff --git a/npc/custom/eAAC_Scripts/banker.txt b/npc/custom/eAAC_Scripts/banker.txt
index 6e3460d75..7e0ac7584 100644
--- a/npc/custom/eAAC_Scripts/banker.txt
+++ b/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";
diff --git a/npc/quests/thana_quest.txt b/npc/quests/thana_quest.txt
index f06efba06..71fe4810b 100644
--- a/npc/quests/thana_quest.txt
+++ b/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;
}