Jump to content
  • 0

Question

18 answers to this question

Recommended Posts

Posted (edited)

Alright, guess I'll just upload mine for him :P

Here you go:

//===== rAthena Script =======================================
//= Account Locker
//===== By: ==================================================
//= darristan ([email protected])
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Additional Comments: =================================
//= 1.0 Initial release
//= 1.1 Added wrong password attempt
//= 1.2 Added atcmd binding
//============================================================
aria_in,46,166,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;
 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;
 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;
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;
dispbottom "Account unlocked successfully.";
end;

OnPCLoginEvent:
if (#AccLock == 1) {
 specialeffect2 9;
 atcommand "@option 2 0 "+(64|(checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 set @Attempt, .Attempt;
 mes "[Account Manager]";
 mes "Please input your password to continue.";
 next;
 input .@Pass$;
 while (.@Pass$ != #AccPass$) {
  if (@Attempt == 1) {
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 "You may continue your game now.";
 atcommand "@option 0 0 " + ((checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 close;
}
end;
OnInit:
bindatcmd("lock","AccLock::OnLock");
bindatcmd("unlock","AccLock::OnUnlock");
set .Attempt, 3; // Number of attempts if wrong password entered.
end;
}

Usage:

@lock <password>

@unlock <password>

or talk to the NPC.

Edited by darristan
Posted

Alright, guess I'll just upload mine for him :P

Here you go:

//===== rAthena Script =======================================
//= Account Locker
//===== By: ==================================================
//= darristan ([email protected])
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Additional Comments: =================================
//= 1.0 Initial release
//= 1.1 Added wrong password attempt
//= 1.2 Added atcmd binding
//============================================================
aria_in,46,166,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;
 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;
 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;
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;
dispbottom "Account unlocked successfully.";
end;

OnPCLoginEvent:
if (#AccLock == 1) {
 specialeffect2 9;
 atcommand "@option 2 0 "+(64|(checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 set @Attempt, .Attempt;
 mes "[Account Manager]";
 mes "Please input your password to continue.";
 next;
 input .@Pass$;
 while (.@Pass$ != #AccPass$) {
  if (@Attempt == 1) {
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 "You may continue your game now.";
 atcommand "@option 0 0 " + ((checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 close;
}
end;
OnInit:
bindatcmd("lock","AccLock::OnLock");
bindatcmd("unlock","AccLock::OnUnlock");
set .Attempt, 3; // Number of attempts if wrong password entered.
end;
}

Usage:

@lock <password>

@unlock <password>

or talk to the NPC.

error found. im using old eA revision. See the image below.

post-524-0-56587600-1350663688_thumb.jpg

Posted

@darristan

Dunno how to fix it. I will give my svn revision to you so that you can fix it for me? :)

r16471

this is the diff file...

and not sure its compatible with eA or not ...since rA got alot things changed ~

beside....if you check the Old eA Forum ...

i believe you can find it mod made by @ToastOfDoom in source release section.

  • Upvote 1
Posted (edited)

Alright, guess I'll just upload mine for him :P

Here you go:

//===== rAthena Script =======================================
//= Account Locker
//===== By: ==================================================
//= darristan ([email protected])
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN
//===== Additional Comments: =================================
//= 1.0 Initial release
//= 1.1 Added wrong password attempt
//= 1.2 Added atcmd binding
//============================================================
aria_in,46,166,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;
 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;
 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;
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;
dispbottom "Account unlocked successfully.";
end;

OnPCLoginEvent:
if (#AccLock == 1) {
 specialeffect2 9;
 atcommand "@option 2 0 "+(64|(checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 set @Attempt, .Attempt;
 mes "[Account Manager]";
 mes "Please input your password to continue.";
 next;
 input .@Pass$;
 while (.@Pass$ != #AccPass$) {
  if (@Attempt == 1) {
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 "You may continue your game now.";
 atcommand "@option 0 0 " + ((checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
 close;
}
end;
OnInit:
bindatcmd("lock","AccLock::OnLock");
bindatcmd("unlock","AccLock::OnUnlock");
set .Attempt, 3; // Number of attempts if wrong password entered.
end;
}

Usage:

@lock <password>

@unlock <password>

or talk to the NPC.

Is it enough to run the script?

no need to change anything?

or change -> conf -> group.conf :

groups: (
{
id: 0 /* group 0 is the default group for every new account */
name: "Player"
level: 0
inherit: ( /*empty list*/ )
commands: {
	/* no commands by default */
}
permissions: {
	/* without this basic permissions regular players could not
	trade or party */
	can_trade: true ----> change false ?
	can_party: true
}
},

instructions please, thank you

Edited by Yasunari Ishibashi
Posted (edited)

Use my script with Annie's little fix and on group.conf:

groups: (
{
id: 1
...
permissions: {
...
 can_trade: false
}
},

Only change permission, don't replace whole group block.

Edited by darristan

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...