Jump to content
  • 0

Only me can login


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

hello, can somebody help me on this script.

i need the script to only accept me.. i mean it'll only accept the account i'm using right now

like for example im using the account -->> user123 and pass123

if i enter the user1234 and pass1234 which exist it'll tell me that

you are currently logged in as "user123" please provide the info for this account only to logged-in.

 

mes "[ In-Game Control Panel ]";
mes " ";
mes "^0000ff*Enter Your Username*^000000";
input .@userid$;
mes "^0000ff*Enter Your Password*^000000";
input .@user_pass$;
query_sql "SELECT account_id FROM login WHERE userid='"+escape_sql(.@userid$)+"' AND user_pass='"+escape_sql(.@user_pass
$)+"'", .@account_id;
if (.@account_id) {
next;
mes "[ In-Game Control Panel ]";
mes " ";
mes "^ff0000*You are now logged-In*^000000";
next;
} else {
next;
mes "[ In-Game Control Panel ]";
mes "^ff0000ERROR^000000 :";
mes "- Invalid Username/Password.";
mes "- Account Does Not Exist.";
close;
}


BUMP........

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

It's hard for me to tell what you want you want here. Do you just want it to say your username?

If you want the script exclusive to your person there are only a few ways to do it... Firstly I'd like to ask if you have harmony, if so, we can go from your mac address.

If not we can go from your last_ip used. Also I would like to add that this will not work if you're using MD5 passwords.

If you do not like all of those could also add a secondary password.

 

 

mes "[ In-Game Control Panel ]";
mes " ";
mes "^0000ff*Enter Your Username*^000000";
input .@userid$;
mes "^0000ff*Enter Your Password*^000000";
input .@user_pass$;
query_sql "SELECT account_id FROM login WHERE userid='"+escape_sql(.@userid$)+"' AND user_pass='"+escape_sql(.@user_pass$)+"' AND last_ip = 'YourIPaddresshere';", .@account_id;
if (.@account_id) {
    next;
    mes "[ In-Game Control Panel ]";
    mes " ";
    mes "^ff0000*You are now logged-In as "+.@userid$+"*^000000";
    next;
} else {
    next;
    mes "[ In-Game Control Panel ]";
    mes "^ff0000ERROR^000000 :";
    mes "- Invalid Username/Password.";
    mes "- Account Does Not Exist.";
    close;
}

 

Where it says YourIPaddresshere add your ip address.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

It's hard for me to tell what you want you want here. Do you just want it to say your username?

If you want the script exclusive to your person there are only a few ways to do it... Firstly I'd like to ask if you have harmony, if so, we can go from your mac address.

If not we can go from your last_ip used. Also I would like to add that this will not work if you're using MD5 passwords.

If you do not like all of those could also add a secondary password.

 

 

mes "[ In-Game Control Panel ]";
mes " ";
mes "^0000ff*Enter Your Username*^000000";
input .@userid$;
mes "^0000ff*Enter Your Password*^000000";
input .@user_pass$;
query_sql "SELECT account_id FROM login WHERE userid='"+escape_sql(.@userid$)+"' AND user_pass='"+escape_sql(.@user_pass$)+"' AND last_ip = 'YourIPaddresshere';", .@account_id;
if (.@account_id) {
    next;
    mes "[ In-Game Control Panel ]";
    mes " ";
    mes "^ff0000*You are now logged-In as "+.@userid$+"*^000000";
    next;
} else {
    next;
    mes "[ In-Game Control Panel ]";
    mes "^ff0000ERROR^000000 :";
    mes "- Invalid Username/Password.";
    mes "- Account Does Not Exist.";
    close;
}

 

Where it says YourIPaddresshere add your ip address.

Thank you so much for fast reply sir skorm...

what basically i wan't is the npc will only accept the username and password of the account i'm using..

for example

i'm logging in as 

user : boom123

pass : pass123

when i go the npc and talk to it it'll ask for username and password before getting into the in-game control panel...

but if i enter my 2nd account which is

user : 2nd123

pass : pass456

it's accepting it... and also the different account user and password as long as they exist..

i wan't it to only accept the account user and pass where my char right now is..... 

and no.. i don't have harmony.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

mes "[ In-Game Control Panel ]";
mes " ";
mes "^0000ff*Enter Your Username*^000000";
input .@userid$;
mes "^0000ff*Enter Your Password*^000000";
input .@user_pass$;
query_sql "SELECT account_id FROM login WHERE userid='"+escape_sql(.@userid$)+"' AND user_pass='"+escape_sql(.@user_pass$)+"' AND last_ip = 'YourIPaddresshere';", .@account_id;
if (.@account_id==getcharid(3)) {
    next;
    mes "[ In-Game Control Panel ]";
    mes " ";
    mes "^ff0000*You are now logged-In as "+.@userid$+"*^000000";
    next;
} else {
    next;
    mes "[ In-Game Control Panel ]";
    mes "^ff0000ERROR^000000 :";
    mes "- Invalid Username/Password.";
    mes "- Account Does Not Exist.";
    close;
}
Link to comment
Share on other sites

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.

×
×
  • Create New...