summaryrefslogtreecommitdiff
path: root/npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt
diff options
context:
space:
mode:
authoreaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-21 21:15:39 +0000
committereaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-21 21:15:39 +0000
commit945b5710110eefaf9ddacbfac8f78b6556751015 (patch)
tree3d5010e39b5e7e67599cacb7ea0a1ba24b001b5f /npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt
parent904f0fd88b48db84db26f842f65ac9d2d7c110ea (diff)
downloadhercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.gz
hercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.bz2
hercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.xz
hercules-945b5710110eefaf9ddacbfac8f78b6556751015.zip
* Update to the eAAC Scripts (don't ask...). [eAAC]
*= Removed disguiser.txt as it seems to error, thus failing to comply with eAAC terms git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10801 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt')
-rw-r--r--npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt b/npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt
index 43cd6478d..dc65a1d8d 100644
--- a/npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt
+++ b/npc/custom/eAAC_Scripts/kafraExpress/ke_bank.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Skotlex
//===== Current Version: =====================================
-//= 2.7
+//= 2.8
//===== Compatible With: =====================================
//= eAthena SVN R3524+
//===== Description: =========================================
@@ -14,7 +14,7 @@
//= See config.txt for configuration.
//============================================================
-- script keInit_bank -1,{
+- script keInit_bank {
OnInit: //Load Config
donpcevent "keConfig::OnLoadBank";
end;
@@ -156,7 +156,12 @@ function SF_calcInterest {
}
set @qty,0;
if (#ke_bank > $@kebk_monMaintenance && #ke_bank < $@kebk_capacity)
- set @qty,#ke_bank*$@kebk_dayInterest*(@banktick-#ke_banktick)/10000;
+ {
+ if (#ke_bank > 1000000) //Overflow protection
+ set @qty,(#ke_bank/10000)*$@kebk_dayInterest*(@banktick-#ke_banktick);
+ else
+ set @qty,#ke_bank*$@kebk_dayInterest*(@banktick-#ke_banktick)/10000;
+ }
set #ke_banktick,@banktick;
if (@qty == 0) return;
if (@qty < 0) {
@@ -172,3 +177,4 @@ function SF_calcInterest {
} //SF end
}
+