Jump to content
  • 0

Can I request npc only for reset position


Famous

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

I need an npc that can player reset position of there character w/o doing it on control pannel

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   8
  • Joined:  12/27/11
  • Last Seen:  


- script ResetPosition -1,{

OnWhisperGlobal:

if (@whispervar0$ == "reset") {

save "new_1-1",53,111;

warp "new_1-1",53,111;

end;

}

}

Edited by arzzzae
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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.

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:  

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 by caspa
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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;

}

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

OnInit:
	set .@use_MD5_passwords, 0; // set to 1 for "yes"
	end;

Small error if he put 1 ;)

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...