Advertisement
johnlol

Friend Warper

May 19th, 2019
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ________________     ______            ________      
  3. ___    |_____  /________  /______      ___  __ \_____
  4. __  /| |  __  /_  __ \_  __ \  _ \     __  /_/ /  __ \
  5. _  ___ / /_/ / / /_/ /  /_/ /  __/     _  _, _// /_/ /
  6. /_/  |_\__,_/  \____//_.___/\___/      /_/ |_| \____/
  7.  
  8. */
  9.  
  10. sec_in02.gat,148,180,2  script  Friend Warper   794,{
  11.     query_sql( "SELECT `char_id`,`account_id`,`name` FROM `char` WHERE `char_id` IN ( SELECT `friend_id` FROM `friends` WHERE `char_id`='"+getcharid(0)+"' )",.@char_id,.@account_id,.@name$ );
  12.     .@total = getarraysize( .@char_id );
  13.     if( .@total ){
  14.         for( .@i = 0; .@i < .@total; .@i++ )
  15.             .@menu$ = .@menu$ + ( ( isloggedin( .@account_id[.@i],.@char_id[.@i] ) )?"^0055FF[ ONLINE ]":"^FF0000[ OFFLINE ]" )+" "+.@name$[.@i] +"^000000:";
  16.        
  17.         .@i = select( implode( .@menu$,":" ) ) - 1;
  18.         if( isloggedin( .@account_id[.@i],.@char_id[.@i] ) ){
  19.             getmapxy( .@map$,.@x,.@y,0,.@name$[.@i] );
  20.             warp .@map$,.@x,.@y;
  21.         }else{
  22.             mes "Your friends is not online.";
  23.         }
  24.    
  25.     }else{
  26.         mes "You dont have any friends.";
  27.     }
  28.     close;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement