kronobr Posted June 18, 2022 Group: Members Topic Count: 32 Topics Per Day: 0.02 Content Count: 71 Reputation: 0 Joined: 06/24/19 Last Seen: September 18, 2022 Share Posted June 18, 2022 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 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 15, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2361 Joined: 10/28/11 Last Seen: Yesterday at 10:31 AM Share Posted October 15, 2022 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; } Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted June 18, 2022 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 931 Reputation: 173 Joined: 04/05/13 Last Seen: 3 hours ago Share Posted June 18, 2022 If you don't mind, you can use atcommand "@whereis " + .@input$"; Quote Link to comment Share on other sites More sharing options...
Question
kronobr
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
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.