Jump to content
  • 0

Recall character in ID to save point


Question

11 answers to this question

Recommended Posts

  • 0
Posted
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
  • 1
Posted

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

 

  • 0
Posted

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?

  • 0
Posted
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

 

  • 0
Posted
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

  • 0
Posted
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

  • 0
Posted

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

 

 

  • 0
Posted
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
  • 0
Posted
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...