Jump to content
  • 0

Recall character in ID to save point


saovarott159

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

Hello...

    Script request  (for example in Picture...)

Thank you so much

 

1112.JPG

Edited by saovarott159
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   16
  • Joined:  09/26/16
  • Last Seen:  

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 .@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;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   16
  • Joined:  09/26/16
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   16
  • Joined:  09/26/16
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

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 .@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 very so much....

:D

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

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 .@charname$[@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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$);

change to

set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `last_map` <> 'sec_pri' AND `account_id` = "+getcharid(3),.@charid,.@charname$);

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

15 minutes ago, Emistry said:

set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$);

change to


set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `last_map` <> 'sec_pri' AND `account_id` = "+getcharid(3),.@charid,.@charname$);

 

It work thank you somuch...

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

Please...

//			mes .@charname$[@selectedchar] + "'s position has been reset.";  //not work because show name incorrect.
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

1 hour ago, saovarott159 said:

@selectedchar

change to

.@selectedchar

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

11 minutes ago, Emistry said:

change to


.@selectedchar

 

Thank you very so much..

:D

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