Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,155,188,0 script Reset Position 910,{
- mes "[Reset Position]";
- mes "I can reset the position of your char on ^0000FFanother^000000 account.";
- next;
- mes "(For your char that is stuck)";
- mes "Enter your username:";
- input .@userid$;
- mes "Enter your password:";
- input .@user_pass$;
- next;
- query_sql "SELECT account_id FROM login WHERE userid='"+.@userid$+"' AND user_pass='"+(.@use_MD5_passwords ? md5(.@user_pass$):.@user_pass$)+"'", .@account_id;
- if (!.@account_id) {
- set @bruteforce, @bruteforce +1;
- if (@bruteforce >= 5) {
- mes "^FF0000 Unable to process your request, please contact a GM.";
- } else {
- mes "^FF0000 Invalid username/password, or account does not exist.";
- }
- close;
- } else if (.@account_id == playerattached()) {
- mes "^FF0000 You are already logged into this account!";
- close;
- }
- // get list of chars on that account
- query_sql "SELECT char_id,`name` FROM `char` WHERE account_id="+.@account_id, .@char_id, .@name$;
- if (getarraysize(.@char_id) == 0) {
- mes "^FF0000 There are no chars on that account.";
- close;
- }
- for (set .@i,0; .@i<getarraysize(.@char_id); set .@i,.@i+1)
- set .@menu$, .@menu$ + .@name$[.@i]+":";
- mes "Which char do you want to reset position?";
- set .@num, select(.@menu$) -1;
- if (isloggedin(.@account_id)) {
- mes "^FF0000 You must log off all chars on that account first.";
- close;
- }
- // reset position
- query_sql "UPDATE `char` SET last_map=save_map, last_x=save_x, last_y=save_y WHERE char_id="+.@char_id[.@num];
- mes "^0000FF"+.@name$[.@num]+"'s^000000 position has been reset. ^_^";
- close;
- OnInit:
- set .@use_MD5_passwords, 0; // set to 1 for "yes"
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement