keep treasure box count on reboot

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8742 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lupus 2006-09-14 08:10:13 +00:00
parent 4e0274eac0
commit 29582c3a3a
2 changed files with 17 additions and 11 deletions

View File

@ -36,6 +36,8 @@ Date Added
* Fixed typos in Gunslinger & Thief Job Quest & various NPCs [Lupus] * Fixed typos in Gunslinger & Thief Job Quest & various NPCs [Lupus]
thanks to cbmaster & $ephiroth thanks to cbmaster & $ephiroth
- Fixed Guild Defence / Economy underflow, thx2 kyoki - Fixed Guild Defence / Economy underflow, thx2 kyoki
- Zoc's fix to keep number of unopened boxes on reboot
- Now each castle spawns 1st/2nd Treasuer Box type as 50%/50% w/o random
09/11 09/11
* Moved custom Umbalian quests to custom folder [Lupus] * Moved custom Umbalian quests to custom folder [Lupus]
* Added back Guild Storage. Confirmed kRO feature. [Lupus] * Added back Guild Storage. Confirmed kRO feature. [Lupus]

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= holyAngelX (1.0) Akaru and ho|yAnge|X (1.1) //= holyAngelX (1.0) Akaru and ho|yAnge|X (1.1)
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.6 //= 1.7
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1+; RO Episode 4+ //= eAthena 1+; RO Episode 4+
//===== Description: ========================================= //===== Description: =========================================
@ -13,9 +13,9 @@
//= Break down of arguments used in the F_GldTreas: //= Break down of arguments used in the F_GldTreas:
//= arg(0): name of guild castle //= arg(0): name of guild castle
//= arg(1): name of script that called the function //= arg(1): name of script that called the function
//= arg(2): not used //= arg(2): the box number amount
//= arg(3): not used //= arg(3): temp variable (count)
//= arg(4): not used //= arg(4): temp variable (box/monster id#)
//= arg(5): box/monster id# //= arg(5): box/monster id#
//= arg(6): x1 coordinate for areamonster call //= arg(6): x1 coordinate for areamonster call
//= arg(7): y1 coordinate for areamonster call //= arg(7): y1 coordinate for areamonster call
@ -36,6 +36,7 @@
//= So you get your first chest only when your Economic Pts >= 4 //= So you get your first chest only when your Economic Pts >= 4
//= 1.5 Fixed treasure number 'round exploit' [Lupus] //= 1.5 Fixed treasure number 'round exploit' [Lupus]
//= 1.6 to Aegis X.2 formula 4..24 Treasure Chests [Lupus] //= 1.6 to Aegis X.2 formula 4..24 Treasure Chests [Lupus]
//= 1.7 Box Count fix by Zoc. Now it spawns 1st/2nd Treasure Chest 50%/50% [Lupus]
//============================================================ //============================================================
@ -43,7 +44,6 @@
// Treasure Spawning Function // Treasure Spawning Function
//================================================ //================================================
function script F_GldTreas { function script F_GldTreas {
if(getarg(10) == 1) goto L_SPAWN; if(getarg(10) == 1) goto L_SPAWN;
setcastledata getarg(0)+".gat",4,0; setcastledata getarg(0)+".gat",4,0;
setcastledata getarg(0)+".gat",5,0; setcastledata getarg(0)+".gat",5,0;
@ -51,15 +51,19 @@ function script F_GldTreas {
if(GetCastleData(getarg(0)+".gat",2) > 100 || GetCastleData(getarg(0)+".gat",1) == 0) return; if(GetCastleData(getarg(0)+".gat",2) > 100 || GetCastleData(getarg(0)+".gat",1) == 0) return;
//sets the counter variable = to the box number amount //sets the counter variable = to the box number amount
if(getarg(0) == "nguild_prt" || getarg(0) == "nguild_alde" || getarg(0) == "nguild_gef" || getarg(0) == "nguild_pay" ) { if(getarg(0) == "nguild_prt" || getarg(0) == "nguild_alde" || getarg(0) == "nguild_gef" || getarg(0) == "nguild_pay" ) {
//Novice Castles can't have more than 1 //Novice Castles can't have more than 1 Treasure Chest
set $@n,1; set getarg(2),1;
}else{ }else{
set $@n,GetCastleData(getarg(0)+".gat",2)/5+4; set getarg(2),GetCastleData(getarg(0)+".gat",2)/5+4;
} }
if (getarg(2) <= 0) return;
set getarg(3), getarg(2); //sets the counter variable = to the box number amount
L_SPAWN: L_SPAWN:
areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(5)+($@n & 1),1,"Treasure_"+getarg(1)+"::OnDied"; set getarg(4), getarg(5)+(getarg(3) & 1); //sets the box id variable = to the box id
set $@n, $@n - 1; areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
if($@n > 0) goto L_SPAWN; set getarg(3), getarg(3) - 1;
if(getarg(3) > 0) goto L_SPAWN;
return; return;
} }