summaryrefslogtreecommitdiff
path: root/npc/guild
diff options
context:
space:
mode:
Diffstat (limited to 'npc/guild')
-rw-r--r--npc/guild/agit_template.txt28
1 files changed, 15 insertions, 13 deletions
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.