From 647998c0b4bda1600c59323a4370be252701bc15 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Wed, 4 Mar 2009 18:28:22 +0000 Subject: Follow up to r13559, r13560 and r13561. Moved some stuff around in the WoESE agits, and corrected a few mistakes I made. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13566 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/guild/agit_template.txt | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'npc/guild/agit_template.txt') diff --git a/npc/guild/agit_template.txt b/npc/guild/agit_template.txt index 9c1f5330f..486f34c1c 100644 --- a/npc/guild/agit_template.txt +++ b/npc/guild/agit_template.txt @@ -46,6 +46,7 @@ //= Second invest is now quadruple the value of the first //= Investing now happens at the turn of the day. //= 1.6a Corrected conditions in the new investing blocks. [L0ne_W0lf] +//= 1.6b Moved where investments are added to eco/def. [L0ne_W0lf] //============================================================ // AGIT Manager Template @@ -1253,32 +1254,33 @@ OnClock0001: end; } - // Spawn boxes in proper order. - for (set .@i,0; .@i <= .@Treasure ; set .@i,.@i+1) { - // set treasure box ID - set .@boxid, .@treasurebox + (.@i+2) % 2; - set .@box,1 << .@i; - // Spawn or do not spawn chests if one already exists. - if ((getd("$@"+strnpcinfo(2)+"_treasure") & .@box) == 0) { - monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"+.@i; - setd "$@"+strnpcinfo(2)+"_treasure",getd("$@"+strnpcinfo(2)+"_treasure") | .@box; - } - } - // Apply investment to Eco. and Def. Only happens if there were investments made. // Permanent Development can only happen once per day. if (GetCastleData(strnpcinfo(2),4)) { set .@Economy,GetCastleData(strnpcinfo(2),2); - SetCastleData strnpcinfo(2),2,.@Economy + GetCastleData(strnpcinfo(2),4) + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014)); + SetCastleData strnpcinfo(2),2,.@Economy + GetCastleData(strnpcinfo(2),4) + (rand(2) && getgdskilllv(.@GID,10014)); + if (GetCastleData(strnpcinfo(2),2) > 100) SetCastleData strnpcinfo(2),2,100; } if (GetCastleData(strnpcinfo(2),5)) { set .@Defence,GetCastleData(strnpcinfo(2),3); SetCastleData strnpcinfo(2),3,.@Defence + GetCastleData(strnpcinfo(2),5); + if (GetCastleData(strnpcinfo(2),3) > 100) SetCastleData strnpcinfo(2),3,100; } // Reset daily investment limits. setcastledata strnpcinfo(2),4,0; setcastledata strnpcinfo(2),5,0; + // Spawn boxes in proper order. + for (set .@i,0; .@i <= .@Treasure ; set .@i,.@i+1) { + // set treasure box ID + set .@boxid, .@treasurebox + (.@i+2) % 2; + set .@box,1 << .@i; + // Spawn or do not spawn chests if one already exists. + if ((getd("$@"+strnpcinfo(2)+"_treasure") & .@box) == 0) { + monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"+.@i; + setd "$@"+strnpcinfo(2)+"_treasure",getd("$@"+strnpcinfo(2)+"_treasure") | .@box; + } + } end; // Individual "You killed a chest" events to ensure proper spawning at the change of day. -- cgit v1.2.3-60-g2f50