From be12ec3ffb1632d8f9f7727ae9a17ea137bde375 Mon Sep 17 00:00:00 2001 From: Lupus Date: Thu, 23 Dec 2004 20:20:06 +0000 Subject: Added LOGMES script command implemented an example: kafra_bank.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@759 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/other/kafra_bank.txt | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'npc/other/kafra_bank.txt') diff --git a/npc/other/kafra_bank.txt b/npc/other/kafra_bank.txt index 8d8bf4fc9..6e6fd8635 100644 --- a/npc/other/kafra_bank.txt +++ b/npc/other/kafra_bank.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Lupus (1.0) //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= eAthena 1.x //===== Description: ========================================= @@ -13,11 +13,12 @@ // #kafrabank/1000 = 0.1% of interest per day // #kafrabank/100 = 1% of interest per day // #kafrabank/10 = 10% of interest per day +// +// 1.1 Added log of bank operation -> logmes "some info"; //============================================================ -prontera.gat,131,190,1 script Bank Clerk 112,{ - cutin "kafra_06",2; - mes"[Manya]"; +prontera.gat,131,190,1 script Bank Clerk 833,{ + mes"[Maniss]"; mes strcharinfo(0)+", welcome to the 2nd Bank of Prontera!"; set @kb_int,(gettime(6)*31)+gettime(5); //today's number @@ -29,7 +30,7 @@ L_NoIncomeToday: set #kb_int,@kb_int; //reset days timer if(#kafrabank==0) mes "We could open you an account."; - if(@income>0) mes "Today's income ^135445" + @income + "^000000 zeny."; + if(@income>0) mes "Today's income: ^135445" + @income + "^000000 zeny."; set #kafrabank,#kafrabank+@income; if(#kafrabank>0) mes "Your account: ^135445" + #kafrabank + "^000000 zeny."; mes "What would you like?"; @@ -37,58 +38,61 @@ L_NoIncomeToday: if(#kafrabank==0) menu "-Open a bank account",-,"-Quit",B_EXIT2; if(#kafrabank>0) menu "-Deposit money",-,"-Withdraw money",M_WITHDRAW,"-Quit",B_EXIT2; - mes"[Manya]"; + mes"[Maniss]"; mes "Please, tell me how much zeny you would like to deposit."; next; input @kafrabank; if(@kafrabank<1000) goto L_LESS_1000; - if(@kafrabank>1000000) goto L_TOO_BIG_AMOUNT; + if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT; if(@kafrabank>zeny) goto L_NOT_ENOUGH; set zeny,zeny-@kafrabank; set #kafrabank,#kafrabank+@kafrabank; - mes"[Manya]"; + mes"[Maniss]"; mes "You've made a deposit of ^135445" + @kafrabank + "z^000000."; - +//we log these zeny operations into the log db + logmes "Bank %: " + @income +"z, Deposit: "+ @kafrabank +"z, Final: "+ #kafrabank +"z"; goto B_EXIT; M_WITHDRAW: if(#kafrabank==0) goto L_ZERO_ACCOUNT; - mes"[Manya]"; + mes"[Maniss]"; mes "Your account: ^135445" + #kafrabank + "^000000 zeny."; mes "How much zeny would you like to withdraw?"; next; input @kafrabank; if(@kafrabank<1) goto B_EXIT2; - if(@kafrabank>1000000) goto L_TOO_BIG_AMOUNT; + if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT; if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH; set #kafrabank,#kafrabank-@kafrabank; set zeny,zeny+@kafrabank; - mes"[Manya]"; + mes"[Maniss]"; mes "Here is your ^135445" + @kafrabank + "z^000000, put your sign here..."; +//we log these zeny operations into the log db + logmes "Bank %: " + @income +"z, Withdraw: "+ @kafrabank +"z, Final: "+ #kafrabank +"z"; goto B_EXIT; L_NOT_ENOUGH: - mes"[Manya]"; + mes"[Maniss]"; mes "You don't have enough zeny for this operation."; next; goto B_EXIT2; L_ZERO_ACCOUNT: - mes"[Manya]"; + mes"[Maniss]"; mes "You don't have any zeny on your account!"; next; goto B_EXIT2; L_TOO_BIG_AMOUNT: - mes"[Manya]"; - mes "Sorry. The maximum deposit you can make on a time is 1,000,000 zeny."; + mes"[Maniss]"; + mes "Sorry. The maximum deposit you can make on a time is 10,000,000 zeny."; next; goto B_EXIT2; L_LESS_1000: - mes"[Manya]"; + mes"[Maniss]"; mes "We're sorry, the minimum amount of zeny you can deposit is 1,000 zeny."; next; goto B_EXIT2; @@ -98,9 +102,11 @@ B_EXIT: next; B_EXIT2: - mes"[Manya]"; + mes"[Maniss]"; mes "Thank you for using our Bank Service. We hope to see you again soon."; - cutin "kafra_06",255; close; - -} \ No newline at end of file +} + +geffen.gat,125,73,3 duplicate(bankg) Bank Clerk#2 833 +izlude.gat,145,107,1 duplicate(bankg) Bank Clerk#3 833 +morocc.gat,147,84,7 duplicate(bankg) Bank Clerk#4 833 -- cgit v1.2.3-70-g09d2 From 3c0dc9f900f2d7b6af555995189877555554a5ed Mon Sep 17 00:00:00 2001 From: celest Date: Mon, 27 Dec 2004 19:27:43 +0000 Subject: git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@825 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/Changelog.txt | 1 + npc/other/kafra_bank.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'npc/other/kafra_bank.txt') diff --git a/npc/Changelog.txt b/npc/Changelog.txt index 79e4eeff0..df8e7cd02 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -35,6 +35,7 @@ Other Ppl Date Added ====== 12/27 + * kafra_bank.txt was missing an npc label [celest] * Reverted gldfunc_dunsw.txt back. Some people report RC5 bugs, which have been fixed some months ago. Next time always CHECK and READ the code, before implementing some stupid "fixes" from the forums 8) Peace [Lupus] PS I'm reverting more guild files soon, to make them show the flags. diff --git a/npc/other/kafra_bank.txt b/npc/other/kafra_bank.txt index 6e6fd8635..fbb71a039 100644 --- a/npc/other/kafra_bank.txt +++ b/npc/other/kafra_bank.txt @@ -17,7 +17,7 @@ // 1.1 Added log of bank operation -> logmes "some info"; //============================================================ -prontera.gat,131,190,1 script Bank Clerk 833,{ +prontera.gat,131,190,1 script Bank Clerk::bankg 833,{ mes"[Maniss]"; mes strcharinfo(0)+", welcome to the 2nd Bank of Prontera!"; -- cgit v1.2.3-70-g09d2 From b9d0ad6565a655649c6905cceb959c7274398011 Mon Sep 17 00:00:00 2001 From: Lupus Date: Mon, 27 Dec 2004 20:30:35 +0000 Subject: added an extra exploit protection git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@826 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/Changelog.txt | 1 + npc/other/kafra_bank.txt | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'npc/other/kafra_bank.txt') diff --git a/npc/Changelog.txt b/npc/Changelog.txt index df8e7cd02..c8b56285a 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -35,6 +35,7 @@ Other Ppl Date Added ====== 12/27 + * kafra_bank.txt added an extra exploit protection [Lupus] * kafra_bank.txt was missing an npc label [celest] * Reverted gldfunc_dunsw.txt back. Some people report RC5 bugs, which have been fixed some months ago. Next time always CHECK and READ the code, before implementing some stupid "fixes" from the forums 8) Peace [Lupus] diff --git a/npc/other/kafra_bank.txt b/npc/other/kafra_bank.txt index fbb71a039..970581ce7 100644 --- a/npc/other/kafra_bank.txt +++ b/npc/other/kafra_bank.txt @@ -1,9 +1,9 @@ //===== eAthena Script ======================================= -//= 2nd Bank of Prontera ( with daily 0.01% income! ) +//= The 2nd Bank of Prontera ( with daily 0.01% income! ) //===== By: ================================================== //= Lupus (1.0) //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Compatible With: ===================================== //= eAthena 1.x //===== Description: ========================================= @@ -15,6 +15,8 @@ // #kafrabank/10 = 10% of interest per day // // 1.1 Added log of bank operation -> logmes "some info"; +// 1.2 Set max income to 100,000z. It would help to avoid +// zeny exploits when you change DATE at your server //============================================================ prontera.gat,131,190,1 script Bank Clerk::bankg 833,{ @@ -25,7 +27,9 @@ prontera.gat,131,190,1 script Bank Clerk::bankg 833,{ set @income,0; //calculate % if (#kafrabank<=0 || #kb_int>=@kb_int) goto L_NoIncomeToday; - set @income,(#kafrabank/1000)*(@kb_int-#kb_int); //@income == % of the summ + set @income,(#kafrabank/1000)*(@kb_int-#kb_int); //@income == % of the sum +//max income constant: + if (@income>100000) set @income,100000; L_NoIncomeToday: set #kb_int,@kb_int; //reset days timer @@ -35,7 +39,7 @@ L_NoIncomeToday: if(#kafrabank>0) mes "Your account: ^135445" + #kafrabank + "^000000 zeny."; mes "What would you like?"; next; - if(#kafrabank==0) menu "-Open a bank account",-,"-Quit",B_EXIT2; + if(#kafrabank==0) menu "-Open an account",-,"-Quit",B_EXIT2; if(#kafrabank>0) menu "-Deposit money",-,"-Withdraw money",M_WITHDRAW,"-Quit",B_EXIT2; mes"[Maniss]"; -- cgit v1.2.3-70-g09d2