//http://rathena.org/board/topic/72558-can-i-request-security-using-can-trade-false/ umbala,94,153,2 script Account Manager 57,{ mes "[Account Manager]"; mes "Hello " + strcharinfo(0) + "."; mes "How may I assist you today?"; next; switch(select(((!#AccLock)? "Lock Account:":":Unlock Account")+":Information:Cancel")) { case 1: mes "[Account Manager]"; mes "So if you would like to lock your account, you will need to input a password after next."; mes "^808080Tips: Input 0 to cancel.^000000"; next; input .@Pass$; if (.@Pass$ == "0") { mes "[Account Manager]"; mes "Alright, you can always talk me to again if you changed your mind."; close; } mes "[Account Manager]"; mes "Good. So the password would be:"; mes "^0055FF" + .@Pass$ + "^000000"; mes "Proceed?"; next; if (select("Confirm:Cancel") == 2) { mes "[Account Manager]"; mes "Alright. Talk to me again anytime."; close; } mes "[Account Manager]"; mes "Password is now set. Account will be locked upon log out."; set .@Pass$, #AccPass$; set #AccLock, 1; atcommand "@adjgroup 1 " + strcharinfo(0); close; case 2: mes "[Account Manager]"; mes "Please input your password."; mes "^808080Tips: Input 0 to cancel.^000000"; set @Attempt, .Attempt; next; input .@Pass$; if (.@Pass$ == "0") { mes "[Account Manager]"; mes "Alright, you can always talk me to again if you changed your mind."; close; } while (.@Pass$ != #AccPass$) { if (@Attempt == 0) { mes "[Account Manager]"; mes "You have entered wrong password too many times!"; close2; atcommand "@kick " + strcharinfo(0); end; } set @Attempt, @Attempt - 1; mes "[Account Manager]"; mes "Wrong password! You have " + @Attempt + " attempt left."; next; input .@Pass$; } mes "[Account Manager]"; mes "Account unlocked. You can always talk to me if you intended to lock your account again."; set #AccLock, 0; atcommand "@adjgroup 0 " + strcharinfo(0); close; case 3: mes "[Account Manager]"; mes "If you feel unsafe with your account, you can always use my service and lock them with a password. Upon logging in, password will be asked and will give no access on wrong password."; close; case 4: mes "[Account Manager]"; mes "See you again!"; close; } OnInit: set .Attempt, 3; // Number of attempts if wrong password entered. end; } - script AccLock -1,{ OnLock: if (#AccLock == 1) { dispbottom "Lock failed! Your account is already locked."; end; } if (.@atcmd_parameters$ == "") { dispbottom "Lock failed! Password cannot be empty."; end; } if (getstrlen(.@atcmd_parameters$) < 4) { dispbottom "Lock failed! Password must be at least 4 characters."; end; } set #AccPass$, .@atcmd_parameters$; set #AccLock, 1; atcommand "@adjgroup 1 " + strcharinfo(0); dispbottom "Account locked successfully! Password is " + #AccPass$ + "."; end; OnUnlock: if (#AccLock == 0) { dispbottom "Unlock failed! Your account is already unlocked."; end; } if (.@atcmd_parameters$ == "" || .@atcmd_parameters$ != #AccPass$) { dispbottom "Unlock failed! Wrong password!"; end; } set #AccLock, 0; atcommand "@adjgroup 0 " + strcharinfo(0); dispbottom "Account unlocked successfully."; end; OnPCLoginEvent: if (#AccLock == 1) { atcommand "@adjgroup 1 " + strcharinfo(0); } end; OnInit: bindatcmd("lock","AccLock::OnLock"); bindatcmd("unlock","AccLock::OnUnlock"); set .Attempt, 3; // Number of attempts if wrong password entered. end; }