summaryrefslogtreecommitdiff
path: root/npc/guild2/schg_cas02.txt
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-24 07:59:43 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-24 07:59:43 +0000
commitb1334e2e32b405ed43569f5482ff7b3d9988d1b8 (patch)
treebb3aeef01d5cd8b83f3ab81258ba8419c2780401 /npc/guild2/schg_cas02.txt
parent7e5da9f35dec37d88a490207b54dd41853db93f9 (diff)
downloadhercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.gz
hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.bz2
hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.xz
hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.zip
- Fixed a possible exploit in guild castle investment. (bugreport:4929, topic:272783)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14833 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/guild2/schg_cas02.txt')
-rw-r--r--npc/guild2/schg_cas02.txt24
1 files changed, 21 insertions, 3 deletions
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";