Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. I was wondering if you would include TzHaar fight pits to unlock obsidian armour and weapons. I have source code that may help.. package com.rs.game.minigames; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.TimerTask; import com.rs.Settings; import com.rs.engine.GameEngine; import com.rs.game.Hit; import com.rs.game.Hit.HitLook; import com.rs.game.World; import com.rs.game.WorldTile; import com.rs.game.item.Item; import com.rs.game.npc.NPC; import com.rs.game.npc.fightpits.FightPitsNPC; import com.rs.game.npc.fightpits.TzKekPits; import com.rs.game.player.Player; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.utils.Logger; import com.rs.utils.Utils; public final class FightPits { private static final int THHAAR_MEJ_KAH = 2618; private static final List<Player> lobby = new ArrayList<Player>(); public static final List<Player> arena = new ArrayList<Player>(); public static final Object lock = new Object(); private static GameTask gameTask; private static boolean startedGame; public static String currentChampion; private static WorldTile[] GAME_TELEPORTS = { new WorldTile(4577, 5086, 0), new WorldTile(4571, 5083, 0), new WorldTile(4564, 5086, 0), new WorldTile(4564, 5097, 0), new WorldTile(4571, 5101, 0), new WorldTile(4578, 5097, 0)}; private static class GameTask extends TimerTask { private int minutes; private List<NPC> spawns; @Override public void run() { try { synchronized (lock) { if(!startedGame) { startedGame = true; passPlayersToArena(); }else{ if(minutes == 0) { for(Player player : arena) player.getDialogueManager().startDialogue("SimpleNPCMessage", THHAAR_MEJ_KAH, "FIGHT!"); }else if (minutes == 5) { //spawn tz-kih //spawns spawns = new ArrayList<NPC>(); for(int i = 0; i < 10; i++) spawns.add(new FightPitsNPC(2734, new WorldTile(GAME_TELEPORTS[Utils.random(GAME_TELEPORTS.length)], 3))); }else if (minutes == 6) { //spawn tz-kek for(int i = 0; i < 10; i++) spawns.add(new TzKekPits(2736, new WorldTile(GAME_TELEPORTS[Utils.random(GAME_TELEPORTS.length)], 3))); }else if (minutes == 7) { //spawn tok-xil for(int i = 0; i < 10; i++) spawns.add(new FightPitsNPC(2739, new WorldTile(GAME_TELEPORTS[Utils.random(GAME_TELEPORTS.length)], 3))); }else if (minutes == 10) { //spawn tz-kek //alot hits appears on players WorldTasksManager.schedule(new WorldTask() { @Override public void run() { if(!startedGame) { stop(); return; } for(Player player : arena) player.applyHit(new Hit(player, 150, HitLook.REGULAR_DAMAGE)); } }, 0, 0); } minutes++; } } }catch(Throwable e) { Logger.handle(e); } } public void removeNPCs() { if(spawns == null) return; for(NPC n : spawns) n.finish(); } } /* * because of the lvl 22s */ public static void addNPC(NPC n) { synchronized (lock) { if(gameTask == null || gameTask.spawns == null) return; gameTask.spawns.add(n); } } public static boolean canFight() { synchronized (lock) { if(gameTask == null) return false; return gameTask.minutes > 0; } } public static void passPlayersToArena() { for (Iterator<Player> it = lobby.iterator(); it.hasNext();) { Player player = it.next(); player.stopAll(); player.getControlerManager().removeControlerWithoutCheck(); enterArena(player); it.remove(); } refreshFoes(); } public static void refreshFoes() { int foes = arena.size()-1; for(Player player : arena) player.getPackets().sendConfig(560, foes); } public static void enterArena(Player player) { player.lock(5); player.getControlerManager().startControler("FightPitsArena"); player.setNextWorldTile(new WorldTile(GAME_TELEPORTS[Utils.random(GAME_TELEPORTS.length)], 3)); player.getDialogueManager().startDialogue("SimpleNPCMessage", THHAAR_MEJ_KAH, "Please wait for the signal before fight."); player.setCanPvp(true); player.setCantTrade(true); arena.add(player); } /* * 0 - logout, 1 - walk, 2 - dead, 3 - teled */ public static void leaveArena(Player player, int type) { synchronized (lock) { arena.remove(player); player.reset(); player.getControlerManager().removeControlerWithoutCheck(); if(type != 3) player.getControlerManager().startControler("FightPitsLobby"); if(type == 0) { player.setLocation(4592, 5073, 0); }else { if(type != 3) lobby.add(player); player.setCanPvp(false); player.setCantTrade(false); player.getPackets().closeInterface(player.getInterfaceManager().hasRezizableScreen() ? 34 : 0); if(player.hasSkull() && player.getSkullId() == 1) {//if has champion skull player.removeSkull(); player.getDialogueManager().startDialogue("SimpleNPCMessage", THHAAR_MEJ_KAH, "Well done in the pit, here take TokKul as reward."); int tokkul = (lobby.size() + arena.size()) * 100; tokkul *= Settings.getDropRate(); //10x more if(!player.getInventory().addItem(6529, tokkul) && type == 1) World.addGroundItem(new Item(6529, tokkul), new WorldTile(4585, 5076, 0), player, true, 180, true); } if(type == 1) { player.lock(5); player.addWalkSteps(4585, 5076, 5, false); }else if(type == 2) player.setNextWorldTile(new WorldTile(new WorldTile(4592, 5073, 0), 2)); } refreshFoes(); checkPlayersAmmount(); if(startedGame && arena.size() <= 1) endGame(); } } public static void enterLobby(Player player, boolean login) { synchronized (lock) { if(!login) { player.lock(5); player.addWalkSteps(4595, 5066, 5, false); player.getControlerManager().startControler("FightPitsLobby"); } lobby.add(player); checkPlayersAmmount(); } } /* * 0 - logout, 1 normal, 2 death/tele */ public static void leaveLobby(Player player, int type) { synchronized (lock) { if(type != 0) { if(type == 1) { player.lock(5); player.addWalkSteps(4597, 5064, 5, false); } player.getControlerManager().removeControlerWithoutCheck(); } lobby.remove(player); checkPlayersAmmount(); } } public static void checkPlayersAmmount() { if(gameTask == null) { if(lobby.size()+arena.size() >= 2) //2players in startGame(false); }else{ if(lobby.size()+arena.size() < 2) cancelGame(); } } public static void startGame(boolean end) { if(end) { gameTask.cancel(); gameTask.removeNPCs(); setChampion(); startedGame = false; } gameTask = new GameTask(); GameEngine.fastExecutor.scheduleAtFixedRate(gameTask, end ? 60000: 10000, 60000); } public static void cancelGame() { gameTask.cancel(); gameTask.removeNPCs(); gameTask = null; if(startedGame) setChampion(); startedGame = false; } public static void setChampion() { if(arena.isEmpty()) return; Player champion = arena.get(0); currentChampion = champion.getDisplayName(); champion.getPackets().sendIComponentText(373, 10, "Current Champion: JaLYt-Ket-" + currentChampion); champion.setFightPitsSkull(); //champion.setWonFightPits(); champion.getDialogueManager().startDialogue("SimpleNPCMessage", THHAAR_MEJ_KAH, "Well done, you were the last person in the pit and won that fight! The next round will start soon, wait for my signal before fighting."); } public static void endGame() { startGame(true); } private FightPits() { } }
  3. Cant wait for the release either. Been on the server had a good luck and hell yea ill max out on this server :D
  4. Just joined, looks decent so far. Hopefully you fix the gender changes though in-game before release.
  5. Last week
  6. Rank me ^^, enjoying the server so far
  7. Earlier
  8. looking forward to tryin out the server :)
  9. Keepsake key

    Use this key on a piece of equipment to store it in your keepsake box.
    When in it's your keepsake box, you can equip it as a cosmetic override

    The Keepsake Key will vanish when used.

    3.00 USD

  10. The Early Bird rank Until the 13th of May, you will be able to claim a forum rank that will be discontinued after this period. To claim this rank, all you have to do is reply below and you'll be given the rank! On Discord, the rank will be given automatically. We will only give the forum rank to players that have replied to this thread. After this period you will never be able to obtain this rank again. So what are you waiting for? Claim this one-time-only rank before it's gone!
  11. By filling out an application to become a member of the Tartarus Staff Team, you agree to the following. 1.) You are not a staff member on another gaming community. 2.) You have no intent to harm the Tartarus community in any form. 3.) You are willing to devote your free time to benefit Tartarus. Requirements & Rules One week since Forum join date. 25 Forums posts. Only one application may be submitted at a time. Do not ask players/staff to view/vouch your application. You must be at least 14 years of age. You must be able to complete an interview via Discord voice. You must have at least 12 hours of weekly play time. You must be able to communicate efficiently in English. <--- English does NOT have to be your primary language. The title of your application (Thread name) must be: Username - (Forum/Game) Application If re-applying, must be 2 weeks since application denial Application Format Name - Age - Position being applied for (Server Support/Forum Moderator) - Username - Discord - Country & Timezone - Availability (Use time, i.e. 9:30 am - 5:00 pm) - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday - Average time played per day (Estimate) - Have you been given an infraction before? If so, what is the reasoning? - Why do you want this position? (150 word requirement) - Give us some information about yourself (Hobbies, interests, fun facts, etc.) - Please understand that we have two stages for our application process. Stage one is the application, getting your application accepted does not mean you have earned the rank. Stage two is an interview on Discord. The interview will decide whether or not you will be accepted onto the staff team.
  12. This set contains: Divine spirit shield, Arcane spirit shield, Elysian spirit shield, Spectral spirit shield.

    70.00 USD

  13. Sled

    A Sled

    80.00 USD

  14. This set contains: Red h'ween mask, Green h'ween mask, Blue h'ween mask.

    50.00 USD

  15. This will give you a $100 Scroll in-game which can be traded or claimed at any time.

    100.00 USD

  16. This will give you a $50 Scroll in-game which can be traded or claimed at any time.

    50.00 USD

  17. This will give you a $25 Scroll in-game which can be traded or claimed at any time.

    25.00 USD

  18. This set contains: Santa costume top, Santa costume legs, Santa costume gloves, Santa costume boots.

    25.00 USD

  19. Fire cape

    Fire cape.

    5.00 USD

  20. TokHaar-Kal

    TokHaar-Kal.

    15.00 USD

  21. Drygore bundle

    This set contains:

    Drygore longsword, Off-hand Drygore longsword, Drygore rapier, Off-hand Drygore rapier, Drygore mace, Off-hand Drygore mace.

    65.00 USD

  22. This will give you a $10 Scroll in-game which can be traded or claimed at any time.

    10.00 USD

  1. Load more activity
×
×
  • Create New...