Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
- package ai.group_template;
- import java.util.concurrent.ScheduledFuture;
- import com.l2jserver.gameserver.ThreadPoolManager;
- import com.l2jserver.gameserver.model.actor.L2Npc;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.util.Rnd;
- public class customRaidboss extends L2AttackableAIScript
- {
- private static final int[] _RBs = {
- //TODO: some fucking IDs here
- };
- private static final int[][] _spawns = {
- //TODO: Some spawns here
- { 83421, 148551, -3408 },
- { 83300, 148551, -3408 }
- };
- private static L2Npc _currentSpawn;
- private static ScheduledFuture<?> _RBcontrol = null;
- public customRaidboss(int questId, String name, String descr)
- {
- super(questId, name, descr);
- for (int id : _RBs)
- {
- addAttackId(id);
- addSpawnId(id);
- addKillId(id);
- }
- _currentSpawn = addSpawn(_RBs[Rnd.get(_RBs.length)], _spawns[Rnd.get(0, 3)][0], _spawns[Rnd.get(0, 3)][1], _spawns[Rnd.get(0, 3)][2], 0, false, 0);
- while (true)
- {
- _RBcontrol = ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
- {
- public void run()
- {
- _currentSpawn.deleteMe();
- _currentSpawn = addSpawn(_RBs[Rnd.get(_RBs.length)], _spawns[Rnd.get(0, 3)][0], _spawns[Rnd.get(0, 3)][1], _spawns[Rnd.get(0, 3)][2], 0, false, 0);
- }
- }, 10 * 60 * 1000);
- }
- }
- @Override
- public String onAttack(L2Npc npc, L2PcInstance player, int damage, boolean isPet)
- {
- return super.onAttack(npc, player, damage, isPet);
- }
- @Override
- public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
- {
- // TODO Auto-generated method stub
- return super.onKill(npc, killer, isPet);
- }
- @Override
- public String onSpawn(L2Npc npc)
- {
- // TODO Auto-generated method stub
- return super.onSpawn(npc);
- }
- public static void main(String[] args)
- {
- new customRaidboss(-1, "customRaidboss", "ai");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement