summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-04 08:22:53 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-04 08:22:53 +0000
commit1c5e4a6caf2e70592c80202e7222e895a67b5f10 (patch)
tree1de75be79bf2539b1bb55e460dc8d4b3504624d1 /npc
parent5a0c79ee6c863ffeed86c325d4ecd7708cc12b58 (diff)
downloadhercules-1c5e4a6caf2e70592c80202e7222e895a67b5f10.tar.gz
hercules-1c5e4a6caf2e70592c80202e7222e895a67b5f10.tar.bz2
hercules-1c5e4a6caf2e70592c80202e7222e895a67b5f10.tar.xz
hercules-1c5e4a6caf2e70592c80202e7222e895a67b5f10.zip
* Added the md5() script command. (follow up to r13719)
- Changed kafra storage password to be stored as md5 hash in #kafra_code$. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13728 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc')
-rw-r--r--npc/Changelog.txt1
-rw-r--r--npc/custom/eAAC_Scripts/quest_warper.txt5
-rw-r--r--npc/kafras/functions_kafras.txt15
3 files changed, 12 insertions, 9 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 0bd383e2e..b79a4ee6b 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -1,6 +1,7 @@
Date Added
======
2009/05/04
+ - The md5 checksum of the kafra code is now stored in #kafra_code$ [brianluau]
- Added a missing zeny check in the Jawaii Bartender. (bugreport:2897) [brianluau]
- Added a missing 'close' in the Mage quest Bookshelf. (bugreport:2873)
2009/05/03
diff --git a/npc/custom/eAAC_Scripts/quest_warper.txt b/npc/custom/eAAC_Scripts/quest_warper.txt
index 7ff06cd2e..650ee3a6e 100644
--- a/npc/custom/eAAC_Scripts/quest_warper.txt
+++ b/npc/custom/eAAC_Scripts/quest_warper.txt
@@ -71,6 +71,7 @@
// - Special warpname menu option name bug fixed
//-2.1 Updated names to fall within retrictions. [L0ne_W0lf]
//-2.2 #kafra_code is now stored as is. [brianluau]
+//-2.2b The md5() of their kafra code is now stored in #kafra_code$ [brianluau]
//=================================================================
//========================Function=&=Script========================
@@ -597,11 +598,11 @@ L_Storage:
end;
F_CheckKafCode:
- if(#kafra_code==0) return;
+ if(#kafra_code$=="") return;
mes "Enter your storage password:";
set @code_,0;
input @code_;
- if(@code_ != #kafra_code) {
+ if(md5(@code_) != #kafra_code$) {
dispbottom "Wrong storage password.";
close;
}
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index 4b65bbc9a..56382a31f 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -58,6 +58,7 @@
//= 6.1 Added menu for Turbo Track Kafra Staff. [L0ne_W0lf]
//= 6.2 Updated/Fixed warp cords. [Kisuka]
//= 6.3 #kafra_code is now stored as is. [brianluau]
+//= 6.3b The md5() of their kafra code is now stored in #kafra_code$ [brianluau]
//============================================================
@@ -557,11 +558,11 @@ function script F_KafEnd {
// Check Storage Password Function ====================
function script F_CheckKafCode {
- if(#kafra_code==0) return;
+ if(#kafra_code$=="") return;
mes "Enter your storage password:";
set @code_,0;
input @code_;
- if(@code_ != #kafra_code) {
+ if(md5(@code_) != #kafra_code$) {
dispbottom "Wrong storage password.";
close2;
cutin "",255;
@@ -576,7 +577,7 @@ function script F_CheckKafCode {
// getarg(0) = NPC Name, getarg(1) = Company Name
function script F_SetKafCode {
mes getarg(0);
- if(#kafra_code) {
+ if(#kafra_code$) {
mes "Your storage is protected with a password. What would you do now?";
next;
menu "Change old password -> 5000z",-,
@@ -593,7 +594,7 @@ function script F_SetKafCode {
mes getarg(0);
mes "At first, please enter your ^0000FFold password^000000.";
set @code,callfunc("F_EntKafCode");
- if(@code==0 || @code != #kafra_code) {
+ if(@code==0 || md5(@code) != #kafra_code$) {
mes "Wrong password. You can't set a new password.";
emotion e_hmm;
goto M_END;
@@ -615,7 +616,7 @@ M_SET:
set Zeny,Zeny-5000;
//set RESRVPTS, RESRVPTS + (5000/50); //hardcoded password doesn't add pts
- set #kafra_code,@code;
+ set #kafra_code$,md5(@code);
mes "You've protected your storage with a secret password.";
mes "Thank you for using "+getarg(1)+".";
emotion e_thx;
@@ -635,8 +636,8 @@ M_CLEAR:
if(Zeny < 1000) goto L_ZENY;
set Zeny,Zeny-1000;
//set RESRVPTS, RESRVPTS + (1000/50); //hardcoded password doesn't add pts
- if(@code == #kafra_code) {
- set #kafra_code,0;
+ if(md5(@code) == #kafra_code$) {
+ set #kafra_code$,"";
mes "You've successfully cleared your storage password.";
mes "Thank you for using "+getarg(1)+".";
emotion e_thx;