View Single Post
  #6  
Old 08-27-2008, 12:07 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by xXziroXx View Post
Scratch that while loop, you're over complicating things. Try something like this instead:

PHP Code:
for (temp.NULLtemp.players.size(); temp.++) {
  if (
temp.i%10 6) {
    
// The top 6 spots
  
} else if (temp.i%10 10) {
    
// The other 4 spots
  
}

  
// Current 'player object' would be read as:
  // players[temp.i]

That's going to include Events Team members, though.

For your problem, maybe something like this:
PHP Code:
function warpPlayers()
{
    
temp.loc_Convict = {
                           { 
"level.nw"x},
                           { 
"leve2.nw"x}
                       };
  
temp.loc_Guard = {
                     { 
"level.nw"x},
                     { 
"leve2.nw"x}
                   };
  
temp.( @ "loc_Events Team" ) = { { "level.nw"x} };
  
  
temp.count_Convict 0;
  
temp.count_Guard 0;
  
temp.( @ "count_Events Team" ) = 0;
  
  for ( 
temp.pl players )
  {
      
temp.location temp.( @ "loc_" pl.guild );
      
      if ( 
location == null || pl.guild == null )
      {
          continue; 
// No location specified
      
}
      
      
temp.temp.( @ "count_" pl.guild );
      
temp.( @ "count_" pl.guild ) = >= location.size() - 1;
      
temp.( @ "count_" pl.guild );
    
      
pl.setlevel2location[n][0], location[n][1], location[n][2] );
  }

(sorry for the weird formatting, TextMate does that, and I can't get on RC at the moment)
__________________
Reply With Quote