// eAthena Script / Rathena Script // Created By Rosemount // Current Version 1.2 // Compatible With Any Svn // Description Simple Second Password & Second Password Recovery - script Sample -1,{ OnPcLoginEvent: if( #lockede == 1 ) goto L_Check; menu "~ Setup Second Password",L_Setup,"~ Next time",L_Kick; L_Kick: atcommand "@kick "+strcharinfo(0); end; L_Setup: mes "Please Insert Second Password"; input @secpass$; next; mes "Please Insert Recovery Password"; input @recovery$; next; mes "----------------------------"; mes "Second Password"; mes "^FF0000"+@secpass$+"^000000"; mes "----------------------------"; mes "Recovery Password"; mes "^FF0000"+@recovery$+"^000000"; mes "----------------------------"; close2; menu "~ Setup Again",L_Setup,"~ Confirm",L_Confirm; L_Confirm: set #revpw$,@recovery$; set #secpw$,@secpass$; set #lockede,1; close; L_recover: next; mes "Please Insert Recovery Password"; input @recovery$; if( @recovery$ == #revpw$) goto L_new; if( @recovery$ != #revpw$) goto L_wrong; L_new: next; mes "Please Insert New Password"; input @secpass$; next; mes "----------------------------"; mes "New Second Password"; mes "^FF0000"+@secpass$+"^000000"; mes "----------------------------"; close2; menu "~ Change Password Again",L_new,"~ Confirm",L_Newpw; L_wrong: next; mes "[ ^FF0000Recovery Password^000000 ]"; mes "Please Insert Your Email Address"; next; input .@emaiL$; query_sql "SELECT `email` FROM `login` WHERE `account_id` = "+getcharid(3), .@RecoEmail$; if(.@RecoEmail$ == .@emaiL$) goto L_new; if(.@RecoEmail$ != .@emaiL$) atcommand "@kick "+strcharinfo(0); end; L_Newpw: mes "Password Changed"; set #secpw$,@secpass$; sleep2 1000; atcommand "@kick "+strcharinfo(0); end; OnCheck: L_Check: atcommand "@option 2 "+strcharinfo(0); sc_start SC_BERSERK,10000000,1; mes "Type ' ^FF0000Recovery^000000 ' if you lose second password."; next; mes "Please Insert Second Password"; input @secpass$; if( @secpass$ == "Recovery") goto L_recover; if( @secpass$ == #secpw$) { next; atcommand "@option 0 "+strcharinfo(0); sc_end SC_BERSERK; mes "Thank you and have a nice day!"; close; } atcommand "@kick "+strcharinfo(0); end; OnInit: bindatcmd "@warp",strnpcinfo(3)+"::OnCheck"; bindatcmd "@jump",strnpcinfo(3)+"::OnCheck"; end; }