Показать сообщение отдельно
Непрочитано 04.11.2011, 17:37   #11
Пользователь

Автор темы (Топик Стартер) Re: [JAVA] маленький скрипт

спасибо! что-то вроде этого?

Код:
public class RebornCorpse  extends Quest implements Runnable
{
	public RebornCorpse(int questId, String name, String descr)
	{
	super(questId, name, descr);
	}
	List<L2NpcInstance> _currentMobs = new ArrayList<L2NpcInstance>();
	//_currentMobs={21336,21378,21381};
	int _activePhase = 0;

public String onKill(L2NpcInstance npc, L2PcInstance killer, boolean isPet) 
{
    _currentMobs.remove(npc);
    if(_currentMobs.isEmpty())
       nextPhase();
    return null;
}
private void nextPhase() 
	{
    _activePhase++;
    if(_activePhase>3) _activePhase = 1;
    switch(_activePhase) 
	{
    case 1:
		_currentMobs.add(addSpawn(21336, 119319, 112238, -3695, 9074, false, 0));
		_currentMobs.add(addSpawn(21336, 119247, 112349, -3691, 9438, false, 0));
		_currentMobs.add(addSpawn(21336, 119225, 112176, -3698, 7247, false, 0));
		_currentMobs.add(addSpawn(21336, 119139, 112318, -3690, 6712, false, 0));
		break;
	case 2:
		_currentMobs.add(addSpawn(21378, 119319, 112238, -3695, 9074, false, 0));
		_currentMobs.add(addSpawn(21378, 119247, 112349, -3691, 9438, false, 0));
		_currentMobs.add(addSpawn(21378, 119225, 112176, -3698, 7247, false, 0));
		_currentMobs.add(addSpawn(21378, 119139, 112318, -3690, 6712, false, 0));
	case 3:
		_currentMobs.add(addSpawn(21381, 119319, 112238, -3695, 9074, false, 0));
		_currentMobs.add(addSpawn(21381, 119247, 112349, -3691, 9438, false, 0));
		_currentMobs.add(addSpawn(21381, 119225, 112176, -3698, 7247, false, 0));
		_currentMobs.add(addSpawn(21381, 119139, 112318, -3690, 6712, false, 0));
    break;
    }
	}
    @Override
    public void run()
    {
    }
}
но чето оно не хочет фурычить(
__________________
mego4el вне форума Ответить с цитированием