Emistry

[RO] Warp to Friends

Dec 27th, 2015
323
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. // https://rathena.org/board/topic/79145-select-a-friend-to-warp/
  2.  
  3. prontera,155,161,4  script  Sample  757,{
  4.     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$ );
  5.     .@total = getarraysize( .@char_id );
  6.     if( .@total ){
  7.         for( .@i = 0; .@i < .@total; .@i++ )
  8.             .@menu$ = .@menu$ + ( ( isloggedin( .@account_id[.@i],.@char_id[.@i] ) )?"^0055FF[ ONLINE ]":"^FF0000[ OFFLINE ]" )+" "+.@name$[.@i] +"^000000:";
  9.        
  10.         .@i = select( implode( .@menu$,":" ) ) - 1;
  11.         if( isloggedin( .@account_id[.@i],.@char_id[.@i] ) ){
  12.             getmapxy( .@map$,.@x,.@y,0,.@name$[.@i] );
  13.             warp .@map$,.@x,.@y;
  14.         }else{
  15.             mes "Your friends is not online.";
  16.         }
  17.    
  18.     }else{
  19.         mes "You dont have any friends.";
  20.     }
  21.     close;
  22. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment