Famous Posted February 19, 2013 Posted February 19, 2013 I need an npc that can player reset position of there character w/o doing it on control pannel Quote
arzzzae Posted February 19, 2013 Posted February 19, 2013 (edited) - script ResetPosition -1,{ OnWhisperGlobal: if (@whispervar0$ == "reset") { save "new_1-1",53,111; warp "new_1-1",53,111; end; } } Edited February 19, 2013 by arzzzae Quote
Brian Posted February 19, 2013 Posted February 19, 2013 Players might not be able to whisper the Reset NPC if their client crashed (ex: from loading on a map they are missing). Instead, you could allow players to log on their other account, talk to the NPC and input the user/pass of their stuck account, select the stuck character, then reset that char's position. Quote
caspa Posted February 19, 2013 Posted February 19, 2013 (edited) sir bry can you provide the script of what you're talking about... it sounds good.. Players might not be able to whisper the Reset NPC if their client crashed (ex: from loading on a map they are missing).Instead, you could allow players to log on their other account, talk to the NPC and input the user/pass of their stuck account, select the stuck character, then reset that char's position. Edited February 19, 2013 by caspa Quote
Brian Posted February 20, 2013 Posted February 20, 2013 http://rathena.kpaste.net/5b80?raw 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; } Quote
Capuche Posted February 20, 2013 Posted February 20, 2013 OnInit: set .@use_MD5_passwords, 0; // set to 1 for "yes" end; Small error if he put 1 Quote
Question
Famous
I need an npc that can player reset position of there character w/o doing it on control pannel
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.