All pastes #40820 Raw Edit

Stuff

public text v1 · immutable
#40820 ·published 2006-02-09 03:55 UTC
rendered paste body
        else if (command.startsWith("admin_event_control_begin"))
        {
            destroyEventNpcs(); 
            npcsDeleted = true;
            L2Event.announceAllPlayers("The event has started and registration has been closed.");
            starting = true;
            try {L2Event.active = true;
            L2Event.players.clear();
            LinkedList<String> link = new LinkedList<String>();
            
            for(int j=0;j<L2Event.teamsNumber;j++){
                link = new LinkedList<String>();
                L2Event.players.put(j+1,link);
                
            }
            int i = 0;
            
            L2Event.connectionLossData = new HashMap<String, HashMap>(L2Event.participatingPlayers.size());
            L2Event.connectionLossData.clear();
            
            while(L2Event.participatingPlayers.size()>0){
                String target = getMaxLeveledPlayer();
                
                if(target!=null) {
                    
                    L2Event.players.get(i+1).add(target);
                    i=(i+1)%L2Event.teamsNumber;
                }
            }
            
            } catch(Exception e) {System.out.println(e);}
            starting = false;
            activeChar.sendMessage("Event successfully started without problems.");
            activeChar.sendMessage("Be sure you sit teams before you teleport them in.");
            showEventControl(activeChar);
        }