Jump to content
  • 0
saovarott159

Recall character in ID to save point

Question

11 answers to this question

Recommended Posts

  • 0
3 minutes ago, saovarott159 said:

Thank you so much

But don,t work (Bug in Picture)

112233.JPG

haha i thought so, here's an update regarding bug check. sorry i cant test it in office.
 

// Reset Position In-game version

prontera,160,160,4	script	Position Reset	909,{
	mes "[System]";
	mes "Please select a character";
	mes "return to save point...";
	set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),[email protected],[email protected]$);
	set [email protected]$, "";

	for ( set @ctr,0; @ctr < [email protected]; @ctr++ )
		[email protected]$ = [email protected]$ + [email protected]$[@ctr]+":";
	[email protected] = [email protected]$ + "Cancel";

	set [email protected], select([email protected]$)-1;
	next;

	if( [email protected] < [email protected] )
	{
		if( getcharid(0) != [email protected][[email protected]] )
		{
			query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "[email protected][[email protected]]);
			mes [email protected]$[@selectedchar] + "'s position has been reset.";
		}
		else
		{
			// TODO: instead of having if-else, its better not to show the invoker's name in selection.
			mes "you cant reset your own position";
		}
	}
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 1

made this script few hours ago, but im too scared to post it, might have a lot of bugs on it coz didnt tested it yet.

// Reset Position In-game version

prontera,160,160,4	script	Position Reset	909,{
	mes "[System]";
	mes "Please select a character";
	mes "return to save point...";
	set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$);
	set .@menu$, "";

	for ( set @ctr,0; @ctr < .@count; @ctr++ )
		.@menu$ = .@menu$ + .@charname$[@ctr]+":";
	.@menu = .@menu$ + "Cancel";

	set .@selectedchar, select(.@menu)-1;
	next;

	if( .@selectedchar < .@count )
	{
		if( getcharid(0) != .@charid[.@selectedchar] )
		{
			query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "+.@charid[.@selectedchar]);
			mes .@charname$[@selectedchar] + "'s position has been reset.";
		}
		else
		{
			// TODO: instead of having if-else, its better not to show the invoker's name in selection.
			mes "you cant reset your own position";
		}
	}
	end;
}

 

Link to comment
Share on other sites

  • 0

may i know who will use this NPC? anyone or GM only?
is it like, a reset position in-game? so if you have another character that is stuck, you can just character select~>use another char then talk to this npc, list up all your characters then return to savepoint the selected char?
or GM only npc that once accessed, the npc will list up all/online players then return a chosen player to their save point?

Link to comment
Share on other sites

  • 0
2 minutes ago, Athan17 said:

may i know who will use this NPC? anyone or GM only?
is it like, a reset position in-game? so if you have another character that is stuck, you can just character select~>use another char then talk to this npc, list up all your characters then return to savepoint the selected char?
or GM only npc that once accessed, the npc will list up all/online players then return a chosen player to their save point?

Hi..

1.use this NPC? anyone or GM only?  >>  Anyone

2.reset position in-game?  >>  Yes

3.so if you have another character that is stuck, you can just character select~>use another char then talk to this npc, list up all your characters then return to savepoint the selected char?  >> Yes

4.or GM only npc that once accessed >>  Anyone

5.the npc will list up all/online players then return a chosen player to their save point? >> list up offline players in ID

 

Link to comment
Share on other sites

  • 0
55 minutes ago, Athan17 said:

made this script few hours ago, but im too scared to post it, might have a lot of bugs on it coz didnt tested it yet.

// Reset Position In-game version

prontera,160,160,4	script	Position Reset	909,{
	mes "[System]";
	mes "Please select a character";
	mes "return to save point...";
	set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$);
	set .@menu$, "";

	for ( set @ctr,0; @ctr < .@count; @ctr++ )
		.@menu$ = .@menu$ + .@charname$[@ctr]+":";
	.@menu = .@menu$ + "Cancel";

	set .@selectedchar, select(.@menu)-1;
	next;

	if( .@selectedchar < .@count )
	{
		if( getcharid(0) != .@charid[.@selectedchar] )
		{
			query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "+.@charid[.@selectedchar]);
			mes .@charname$[@selectedchar] + "'s position has been reset.";
		}
		else
		{
			// TODO: instead of having if-else, its better not to show the invoker's name in selection.
			mes "you cant reset your own position";
		}
	}
	end;
}

 

Thank you so much

But don,t work (Bug in Picture)

112233.JPG

Link to comment
Share on other sites

  • 0
3 minutes ago, Athan17 said:

haha i thought so, here's an update regarding bug check. sorry i cant test it in office.
 

// Reset Position In-game version

prontera,160,160,4	script	Position Reset	909,{
	mes "[System]";
	mes "Please select a character";
	mes "return to save point...";
	set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),[email protected],[email protected]$);
	set [email protected]$, "";

	for ( set @ctr,0; @ctr < [email protected]; @ctr++ )
		[email protected]$ = [email protected]$ + [email protected]$[@ctr]+":";
	[email protected] = [email protected]$ + "Cancel";

	set [email protected], select([email protected]$)-1;
	next;

	if( [email protected] < [email protected] )
	{
		if( getcharid(0) != [email protected][[email protected]] )
		{
			query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "[email protected][[email protected]selectedchar]);
			mes [email protected]$[@selectedchar] + "'s position has been reset.";
		}
		else
		{
			// TODO: instead of having if-else, its better not to show the invoker's name in selection.
			mes "you cant reset your own position";
		}
	}
	end;
}

 

Thank you very so much....

:D

Link to comment
Share on other sites

  • 0

Hello help me please...

         Script system recall character it work 

but system recall character in jail to save point

How to fix...

// Reset Position In-game version

prontera,179,99,3	script	Position Reset	541,{
	mes "[System recall]";
	mes "Please select character";
	set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$);
	set .@menu$, "";

	for ( set @ctr,0; @ctr < .@count; @ctr++ )
		.@menu$ = .@menu$ + .@charname$[@ctr]+":";
	.@menu = .@menu$ + "Cancel";

	set .@selectedchar, select(.@menu$)-1;
	next;

	if( .@selectedchar < .@count )
	{
		if( getcharid(0) != .@charid[.@selectedchar] )
		{
			query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "+.@charid[.@selectedchar]);
//			mes [email protected]$[@selectedchar] + "'s position has been reset.";  //not work because show name incorrect.
			mes "recalled";
		}
		else
		{
			// TODO: instead of having if-else, its better not to show the invoker's name in selection.
			mes "not recall";
		}
	}
	end;
}

 

 

Link to comment
Share on other sites

  • 0
set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),[email protected],[email protected]$);

change to

set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `last_map` <> 'sec_pri' AND `account_id` = "+getcharid(3),[email protected],[email protected]$);

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
15 minutes ago, Emistry said:
set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),[email protected],[email protected]$);

change to

set [email protected], query_sql("SELECT `char_id`,`name` FROM `char` WHERE `last_map` <> 'sec_pri' AND `account_id` = "+getcharid(3),[email protected],[email protected]$);

 

It work thank you somuch...

How to fix show charector name recall to save point..

Please...

//			mes [email protected]$[@selectedchar] + "'s position has been reset.";  //not work because show name incorrect.
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.