Jump to content
  • 0

Question

Posted
prontera,157,178,5    script    dedoduro    757,{
   if ( getgmlevel() < 80 ) end;
   mes "Input Player Name";
   if ( input( .@input$, 4, 23 ) ) {
       mes "invalid name length";
       close;
   }
   if ( set( .@nb, query_sql( "select name, online from `char` where account_id = ( select account_id from `char` where name = '"+ escape_sql(.@input$) +"' ) order by char_num", .@name$, .@online ) ) )
       for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 )
           mes " > "+ .@name$[.@i] +" "+( ( .@online[.@i] )? "^00FF00[Online]" : "^FF0000[Offline]" )+"^000000";
           //here// mes .@name$ + !getmapxy( .@map$, .@x, .@y, 0, .name$[.@s] ) && .@map$ != strcharinfo(3);
   else
       mes "No character found";
   close;
}

HELLO EVERYONE, I need help with this npc. I need this npc to show the map the player is on. I tried to do it but it's not working . Thanks   
 

2 answers to this question

Recommended Posts

  • 0
Posted
prontera,157,178,5    script    dedoduro    757,{
	if ( getgmlevel() < 80 ) end;
	mes "Input Player Name";
	if ( input( .@input$, 4, 23 ) ) {
		mes "invalid name length";
		close;
	}
	.@size = query_sql("SELECT `name`, `online` FROM `char` WHERE `name` LIKE '%"+ escape_sql(.@input$) +"%' ) ORDER BY `online`", .@name$, .@online);
	if (.@size) {
		for (.@i = 0; .@i < .@size; .@i++) {
			mes .@name$[.@i]+" ("+(.@online[.@i] ? "^00FF00[Online]":"^FF0000[Offline]")+"^000000)";
			if (.@online[.@i]) {
				if (!getmapxy(.@map$, .@x, .@y, BL_PC, .@name$[.@i]))
					mes "coordinate: ("+.@map$+", "+.@x+", "+.@y+")";
			}
		}
	}
	else {
		mes "player '"+.@input$+"' not found.";
	}
	close;
}

 

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