summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/Changelog.txt2
-rw-r--r--npc/guild/agit_template.txt17
-rw-r--r--npc/guild2/arug_cas01.txt24
-rw-r--r--npc/guild2/arug_cas02.txt24
-rw-r--r--npc/guild2/arug_cas03.txt24
-rw-r--r--npc/guild2/arug_cas04.txt24
-rw-r--r--npc/guild2/arug_cas05.txt24
-rw-r--r--npc/guild2/schg_cas01.txt24
-rw-r--r--npc/guild2/schg_cas02.txt24
-rw-r--r--npc/guild2/schg_cas03.txt24
-rw-r--r--npc/guild2/schg_cas04.txt24
-rw-r--r--npc/guild2/schg_cas05.txt24
12 files changed, 226 insertions, 33 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 0cd27b923..e1ebcecaa 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -1,5 +1,7 @@
Date Added
======
+2011/05/23
+ * Rev. 14833 Fixed a possible exploit in guild castle investment. (bugreport:4929, topic:272783) [Brian]
2011/04/08
* Rev. 14780 Added missing Hair Dressers and Hair Dyer to Lighthalzen. [L0ne_W0lf]
- Hair Dresser will change hair styles ranging between 20 to 27
diff --git a/npc/guild/agit_template.txt b/npc/guild/agit_template.txt
index f43536978..68e9e7f3a 100644
--- a/npc/guild/agit_template.txt
+++ b/npc/guild/agit_template.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.7
+//= 1.8
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -49,6 +49,7 @@
//= 1.6b Moved where investments are added to eco/def. [L0ne_W0lf]
//= 1.7 Updated Agitbreak announcements, added bc_woe [L0ne_W0lf]
//= and added extended anouncement format for mapannounce.
+//= 1.8 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
// AGIT Manager Template
@@ -525,7 +526,7 @@ OnRecvCastle:
mes "^ff0000But the commercial growth level of our castle is peaked at 100%. It doesn't need any more investment. As I expected you have a great acumen, Master.^000000";
close;
}
- if (GetCastleData(strnpcinfo(2),4) == 2) {
+ if (GetCastleData(strnpcinfo(2),4) >= 2) {
mes "^ff0000But you already invested twice today so you cannot invest any more.^000000 I expect our riches to increase in growth level.";
close;
}
@@ -538,6 +539,11 @@ OnRecvCastle:
next;
switch(select("Invest in commercial growth:Cancel")) {
case 1:
+ if (GetCastleData(strnpcinfo(2),4) >= 2) {
+ mes "[ Steward " + .@name$ + " ]";
+ mes "I'm sorry but you already invested twice today so you cannot invest any more.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward " + .@name$ + " ]";
mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master.";
@@ -588,7 +594,7 @@ OnRecvCastle:
mes "^ff0000But the safeguard level of our castle is peaked at 100%. It doesn't need any more investment. As I expected you have a great acumen, Master.^000000";
close;
}
- if (GetCastleData(strnpcinfo(2),5) == 2) {
+ if (GetCastleData(strnpcinfo(2),5) >= 2) {
mes "^ff0000But you already invested twice today so you cannot invest any more.^000000 I expect our riches to increase in growth level.";
close;
}
@@ -601,6 +607,11 @@ OnRecvCastle:
next;
switch(select("Invest in safeguard.:Cancel")) {
case 1:
+ if (GetCastleData(strnpcinfo(2),5) >= 2) {
+ mes "[ Steward " + .@name$ + " ]";
+ mes "I'm sorry but you already invested twice today so you cannot invest any more.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward " + .@name$ + " ]";
mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master.";
diff --git a/npc/guild2/arug_cas01.txt b/npc/guild2/arug_cas01.txt
index 62c39d3a5..4f76e6496 100644
--- a/npc/guild2/arug_cas01.txt
+++ b/npc/guild2/arug_cas01.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.8
+//= 2.0
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -23,6 +23,7 @@
//= 1.8 Applied updated eco/def systems. [L0ne_W0lf]
//= 1.9 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 2.0 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
arug_cas01,1,1,0 script Manager#aru01_02 111,{
@@ -2361,7 +2362,7 @@ arug_cas01,92,380,3 script Steward#aru01 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("arug_cas01",4) == 2) {
+ if (GetCastleData("arug_cas01",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2387,6 +2388,14 @@ arug_cas01,92,380,3 script Steward#aru01 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas01",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2455,7 +2464,7 @@ arug_cas01,92,380,3 script Steward#aru01 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("arug_cas01",5) == 2) {
+ if (GetCastleData("arug_cas01",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2479,6 +2488,15 @@ arug_cas01,92,380,3 script Steward#aru01 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas01",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/arug_cas02.txt b/npc/guild2/arug_cas02.txt
index 369475d19..c29643ba7 100644
--- a/npc/guild2/arug_cas02.txt
+++ b/npc/guild2/arug_cas02.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.2
+//= 2.3
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -26,6 +26,7 @@
//= 2.1 Applied updated eco/def systems. [L0ne_W0lf]
//= 2.2 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 2.3 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
arug_cas02,1,1,0 script Manager#aru02_02 111,{
@@ -2322,7 +2323,7 @@ arug_cas02,303,341,3 script Steward#aru02 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("arug_cas02",4) == 2) {
+ if (GetCastleData("arug_cas02",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2348,6 +2349,14 @@ arug_cas02,303,341,3 script Steward#aru02 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas02",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2416,7 +2425,7 @@ arug_cas02,303,341,3 script Steward#aru02 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("arug_cas02",5) == 2) {
+ if (GetCastleData("arug_cas02",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2440,6 +2449,15 @@ arug_cas02,303,341,3 script Steward#aru02 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas02",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/arug_cas03.txt b/npc/guild2/arug_cas03.txt
index 535434406..9bae4be4b 100644
--- a/npc/guild2/arug_cas03.txt
+++ b/npc/guild2/arug_cas03.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.0
+//= 2.1
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -25,6 +25,7 @@
//= 1.9 Applied updated eco/def systems. [L0ne_W0lf]
//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 2.1 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
arug_cas03,1,1,0 script Manager#aru03_02 111,{
@@ -2367,7 +2368,7 @@ arug_cas03,328,98,3 script Steward#aru03 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("arug_cas03",4) == 2) {
+ if (GetCastleData("arug_cas03",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2393,6 +2394,14 @@ arug_cas03,328,98,3 script Steward#aru03 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas03",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2461,7 +2470,7 @@ arug_cas03,328,98,3 script Steward#aru03 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("arug_cas03",5) == 2) {
+ if (GetCastleData("arug_cas03",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2485,6 +2494,15 @@ arug_cas03,328,98,3 script Steward#aru03 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas03",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/arug_cas04.txt b/npc/guild2/arug_cas04.txt
index ba75931a6..7a7ad1b0f 100644
--- a/npc/guild2/arug_cas04.txt
+++ b/npc/guild2/arug_cas04.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.2
+//= 2.3
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -26,6 +26,7 @@
//= Can no longer gain eco/def higher than 100.
//= 2.1 Fixed setcell extending more than it should on 3rd barricade. (bugreport:4323) [L0ne_W0lf]
//= 2.2 Corrected exterior flag positions. (bugreport:4436) [L0ne_W0lf]
+//= 2.3 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
arug_cas04,1,1,0 script Manager#aru04_02 111,{
@@ -2371,7 +2372,7 @@ arug_cas04,328,98,3 script Steward#aru04 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("arug_cas04",4) == 2) {
+ if (GetCastleData("arug_cas04",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2397,6 +2398,14 @@ arug_cas04,328,98,3 script Steward#aru04 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas04",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2465,7 +2474,7 @@ arug_cas04,328,98,3 script Steward#aru04 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("arug_cas04",5) == 2) {
+ if (GetCastleData("arug_cas04",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2489,6 +2498,15 @@ arug_cas04,328,98,3 script Steward#aru04 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas04",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/arug_cas05.txt b/npc/guild2/arug_cas05.txt
index 4c4f4334d..5abdd6c85 100644
--- a/npc/guild2/arug_cas05.txt
+++ b/npc/guild2/arug_cas05.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.2
+//= 2.3
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -26,6 +26,7 @@
//= Can no longer gain eco/def higher than 100.
//= 2.1 Fixed setcell extending more than it should on 3rd barricade. (bugreport:4323) [L0ne_W0lf]
//= 2.2 Fixed exterior flag placements. [L0ne_W0lf]
+//= 2.3 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
arug_cas05,1,1,0 script Manager#aru05_02 111,{
@@ -2371,7 +2372,7 @@ arug_cas05,328,98,3 script Steward#aru05 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("arug_cas05",4) == 2) {
+ if (GetCastleData("arug_cas05",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2397,6 +2398,14 @@ arug_cas05,328,98,3 script Steward#aru05 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas05",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2465,7 +2474,7 @@ arug_cas05,328,98,3 script Steward#aru05 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("arug_cas05",5) == 2) {
+ if (GetCastleData("arug_cas05",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2489,6 +2498,15 @@ arug_cas05,328,98,3 script Steward#aru05 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("arug_cas05",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/schg_cas01.txt b/npc/guild2/schg_cas01.txt
index 59990be8b..0b565e6c6 100644
--- a/npc/guild2/schg_cas01.txt
+++ b/npc/guild2/schg_cas01.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.0
+//= 2.1
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -24,6 +24,7 @@
//= 1.9 Applied updated eco/def systems. [L0ne_W0lf]
//= 2.0 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 2.1 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
schg_cas01,1,1,0 script Manager#sch01_02 111,{
@@ -2369,7 +2370,7 @@ schg_cas01,247,305,3 script Steward#sch01 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("schg_cas01",4) == 2) {
+ if (GetCastleData("schg_cas01",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2395,6 +2396,14 @@ schg_cas01,247,305,3 script Steward#sch01 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas01",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2463,7 +2472,7 @@ schg_cas01,247,305,3 script Steward#sch01 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("schg_cas01",5) == 2) {
+ if (GetCastleData("schg_cas01",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2487,6 +2496,15 @@ schg_cas01,247,305,3 script Steward#sch01 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas01",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/schg_cas02.txt b/npc/guild2/schg_cas02.txt
index 2c3d5be69..575c1d128 100644
--- a/npc/guild2/schg_cas02.txt
+++ b/npc/guild2/schg_cas02.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.1
+//= 2.2
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -26,6 +26,7 @@
//= 2.0a Corrected investment data being reset before applied.
//= 2.1 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 2.2 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
schg_cas02,1,1,0 script Manager#sch02_02 111,{
@@ -2303,7 +2304,7 @@ schg_cas02,105,378,3 script Steward#sch02 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("schg_cas02",4) == 2) {
+ if (GetCastleData("schg_cas02",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2329,6 +2330,14 @@ schg_cas02,105,378,3 script Steward#sch02 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas02",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2397,7 +2406,7 @@ schg_cas02,105,378,3 script Steward#sch02 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("schg_cas02",5) == 2) {
+ if (GetCastleData("schg_cas02",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2421,6 +2430,15 @@ schg_cas02,105,378,3 script Steward#sch02 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas02",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/schg_cas03.txt b/npc/guild2/schg_cas03.txt
index 7d7015f25..2960a6e61 100644
--- a/npc/guild2/schg_cas03.txt
+++ b/npc/guild2/schg_cas03.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.3
+//= 2.4
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -29,6 +29,7 @@
//= 2.2 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
//= 2.3 Fixed invalid corridinates when spawning a guardian. [L0ne_W0lf]
+//= 2.4 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
schg_cas03,1,1,0 script Manager#sch03_02 111,{
@@ -2362,7 +2363,7 @@ schg_cas03,88,90,3 script Steward#sch03 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("schg_cas03",4) == 2) {
+ if (GetCastleData("schg_cas03",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2388,6 +2389,14 @@ schg_cas03,88,90,3 script Steward#sch03 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas03",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2456,7 +2465,7 @@ schg_cas03,88,90,3 script Steward#sch03 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("schg_cas03",5) == 2) {
+ if (GetCastleData("schg_cas03",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2480,6 +2489,15 @@ schg_cas03,88,90,3 script Steward#sch03 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas03",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/schg_cas04.txt b/npc/guild2/schg_cas04.txt
index cc4128f98..733fd4c74 100644
--- a/npc/guild2/schg_cas04.txt
+++ b/npc/guild2/schg_cas04.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.7
+//= 1.8
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -21,6 +21,7 @@
//= 1.6 Applied updated eco/def systems. [L0ne_W0lf]
//= 1.7 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 1.8 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
schg_cas04,1,1,0 script Manager#sch04_02 111,{
@@ -2366,7 +2367,7 @@ schg_cas04,247,305,3 script Steward#sch04 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("schg_cas04",4) == 2) {
+ if (GetCastleData("schg_cas04",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2392,6 +2393,14 @@ schg_cas04,247,305,3 script Steward#sch04 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas04",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2460,7 +2469,7 @@ schg_cas04,247,305,3 script Steward#sch04 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("schg_cas04",5) == 2) {
+ if (GetCastleData("schg_cas04",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2484,6 +2493,15 @@ schg_cas04,247,305,3 script Steward#sch04 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas04",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
diff --git a/npc/guild2/schg_cas05.txt b/npc/guild2/schg_cas05.txt
index 912506785..59465623b 100644
--- a/npc/guild2/schg_cas05.txt
+++ b/npc/guild2/schg_cas05.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.7
+//= 1.8
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -21,6 +21,7 @@
//= 1.6 Applied updated eco/def systems. [L0ne_W0lf]
//= 1.7 Fixed eco/def not actually incrementing. [L0ne_W0lf]
//= Can no longer gain eco/def higher than 100.
+//= 1.8 Fixed a possible exploit in guild castle investment. [Brian]
//============================================================
schg_cas05,1,1,0 script Manager#sch05_02 111,{
@@ -2366,7 +2367,7 @@ schg_cas05,247,305,3 script Steward#sch05 55,{
mes "any further than that.";
close;
}
- if (GetCastleData("schg_cas05",4) == 2) {
+ if (GetCastleData("schg_cas05",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -2392,6 +2393,14 @@ schg_cas05,247,305,3 script Steward#sch05 55,{
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas05",4) >= 2) {
+ mes "[ Steward ]";
+ mes "You've already made two";
+ mes "investments today, so you'll";
+ mes "have to wait until tomorrow";
+ mes "to make another investment.";
+ close;
+ }
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
@@ -2460,7 +2469,7 @@ schg_cas05,247,305,3 script Steward#sch05 55,{
mes "cannot be increased further.";
close;
}
- if (GetCastleData("schg_cas05",5) == 2) {
+ if (GetCastleData("schg_cas05",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -2484,6 +2493,15 @@ schg_cas05,247,305,3 script Steward#sch05 55,{
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
+ if (GetCastleData("schg_cas05",5) >= 2) {
+ mes "[ Steward ]";
+ mes "Master, you've already";
+ mes "invested in Defense twice";
+ mes "today. You'll need to wait";
+ mes "until tomorrow if you really";
+ mes "want to increase our defenses.";
+ close;
+ }
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";