Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== eAthena Script =======================================
- //= Account Locker
- //===== By: ==================================================
- //= eathenanabs
- //===== Current Version: =====================================
- //= 1.0
- //===== Compatible With: =====================================
- //= eAthena SVN (SQL ONLY)
- //===== Description: =========================================
- //= Locks Account.
- //= Disables Trade / Drop / Vend / Storage of players.
- //===== Additional Comments: =================================
- //= Special Thanks to:
- //= theultramage
- //============================================================
- prontera.gat,174,142,3 script Bogart the Locksmith 63,{
- if (getgmlevel() >= 2) goto L_forbidden;
- if (#locked == 1) goto L_aunlock;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Hello, do you want to use my account locking powers?";
- mes "In this world now, no one is your friend because we are in the Era of Money War";
- menu "Yes Master.",-,"No thanks.",L_noty;
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Well you have to input 10 Numbers for your password as long as you can remember it.";
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Example: 10 207 4 1 2 6 48 7 37 8";
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "If you leave it to 0, you will have to set it again.";
- next;
- mes "^FF0000Note: GM's are NOT reliable if you forgot your password / secret answer! and they will not entertain such problems.^000000";
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 1st number";
- input #pas1;
- next;
- if (#pas1 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 2nd number";
- input #pas2;
- next;
- if (#pas2 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 3rd number";
- input #pas3;
- next;
- if (#pas3 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 4th number";
- input #pas4;
- next;
- if (#pas4 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 5th number";
- input #pas5;
- next;
- if (#pas5 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 6th number";
- input #pas6;
- next;
- if (#pas6 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 7th number";
- input #pas7;
- next;
- if (#pas7 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 8th number";
- input #pas8;
- next;
- if (#pas8 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 9th number";
- input #pas9;
- next;
- if (#pas9 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input 10th number";
- input #pas10;
- set #locked,1;
- next;
- if (#pas10 == 0) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Password cannot contain Zero!";
- close;
- }
- if (#setsecreta == 1) goto Lyessecret;
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please Input your secret word. Incase you forgot your password, we will be asking for this information..";
- input #secret$;
- if(#secret$==" " || #secret$==null) goto Lnosecret;
- set #setsecreta,1;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Account is now Locked";
- atcommand "@adjgmlvl 1 "+ strcharinfo(0);
- close;
- Lnosecret:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "You cannot input a blank word.. do it again";
- close;
- Lyessecret:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your Account is now Locked";
- atcommand "@adjgmlvl 1 "+ strcharinfo(0);
- close;
- L_forbidden:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "You are a Staff! You can't use this NPC!";
- close;
- L_aunlock:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Hi there, do you want to unlock your account?";
- mes "You only have 5 times to enter the CORRECT password, if you enter the incorrect password for 5 times, you'll be banned for 5 minutes";
- menu "Yes",-,"No",L_ayawpa,"Forgot Password",L_forgot;
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 1st number of your password";
- input upas1;
- if (upas1 != #pas1) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if (upas1 == #pas1);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 2nd number of your password";
- input upas2;
- if (upas2 != #pas2) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if (upas2 == #pas2);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 3rd number of your password";
- input upas3;
- if (upas3 != #pas3) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if (upas3 == #pas3);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 4th number of your password";
- input upas4;
- if (upas4 != #pas4) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas4 == #pas4);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 5th number of your password";
- input upas5;
- if (upas5 != #pas5) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if (upas5 == #pas5);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 6th number of your password";
- input upas6;
- if (upas6 != #pas6) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas6 == #pas6);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 7th number of your password";
- input upas7;
- if (upas7 != #pas7) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas7 == #pas7);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 8th number of your password";
- input upas8;
- if (upas8 != #pas8) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas8 == #pas8);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 9th number of your password";
- input upas9;
- if (upas9 != #pas9) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas9 == #pas9);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Please input the 10th number of your password";
- input upas10;
- if (upas10 != #pas10) {
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Password!";
- set incorrectpass,incorrectpass+1;
- if(incorrectpass >= 5)
- {
- set incorrectpass,0;
- atcommand "@ban 5mn "+strcharinfo(0);
- }
- close;
- }
- if(upas10 == #pas10);
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- set #locked,0;
- mes "Your account is now unlocked!";
- atcommand "@adjgmlvl 0 "+ strcharinfo(0);
- set incorrectpass,0;
- close;
- L_noty:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Okay, come again if you need me.";
- close;
- L_ayawpa:
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Okay, come again if you need me.";
- close;
- L_forgot:
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "You have to enter your email address & your secret answer for you to reset your password";
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- query_sql "SELECT `email` FROM `login` WHERE `account_id` = "+getcharid(3), .@email$;
- mes "Input your email address";
- input .@emailc$;
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Input your secret answer";
- input .@secreta$;
- if(.@secreta$ != #secret$ || .@email$ != .@emailc$) goto L_wrongf;
- if(.@secreta$ == #secret$ && .@email$ == .@emailc$) goto L_correctinfo;
- L_correctinfo:
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Your passwords has been reset and your account has been unlocked";
- set #locked,0;
- atcommand "@adjgmlvl 0 "+ strcharinfo(0);
- close;
- L_wrongf:
- next;
- mes " [ ^FF0000Bogart Mao^000000 ]";
- mes "Incorrect Info!";
- close;
- OnPcLoginEvent:
- if (#locked >= 1 && getgmlevel() < 1)
- {
- atcommand "@adjgmlvl 1 "+ strcharinfo(0);
- message strcharinfo(0),"This account is currently Locked";
- }
- if (#locked >= 1 && getgmlevel() >= 1)
- message strcharinfo(0),"This account is currently Locked";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement