Jump to content

Search the Community

Showing results for tags 'caves'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 12 results

  1. [CENTER][U][B]Destined-Revival's Fight Caves - [/B][/U] [I]What does this have:[/I] [LIST] [*]Cleaner code than original project insanity FightCaves. [*]Full 63 waves. [*]Two different npc affects: tz-kih drains prayer at the rate of damage + 1 = drain, and the tz-kek splits into 2 smaller version when killed. [/LIST] [B][I]First:[/I][/B] Replace your FightCaves class with mine: [CODE]package server.rs2.content.minigames; import server.Server; import server.rs2.entity.npcs.NPCHandler; import server.rs2.entity.players.Client; /** * @author Kurt Cobain */ public class FightCaves { public static final int TZ_KIH = 2627, TZ_KEK_SPAWN = 2738, TZ_KEK = 2630, TOK_XIL = 2631, YT_MEJKOT = 2741, KET_ZEK = 2743, TZTOK_JAD = 2745; /** * Holds the data for the 63 waves fight cave. */ private final int[][] WAVES = {{TZ_KIH}, {TZ_KIH,TZ_KIH}, {TZ_KEK}, {TZ_KEK,TZ_KIH}, {TZ_KEK,TZ_KIH,TZ_KIH}, {TZ_KEK,TZ_KEK}, {TOK_XIL}, {TOK_XIL,TZ_KIH}, {TOK_XIL,TZ_KIH,TZ_KIH}, {TOK_XIL,TZ_KEK}, {TOK_XIL,TZ_KEK,TZ_KIH}, {TOK_XIL,TZ_KEK,TZ_KIH,TZ_KIH}, {TOK_XIL,TZ_KEK,TZ_KEK}, {TOK_XIL,TOK_XI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K,TZ_KIH,TZ_KIH}, {KET_ZEK,YT_MEJKOT,TZ_KEK,TZ_KEK}, {KET_ZEK,YT_MEJKOT,TOK_XIL}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KIH}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KIH,TZ_KIH}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KEK}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KIH}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KIH,TZ_KIH}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KEK}, {KET_ZEK,YT_MEJKOT,TOK_XIL,TOK_XIL}, {KET_ZEK,YT_MEJKOT,YT_MEJKOT}, {KET_ZEK,KET_ZEK}, {TZTOK_JAD}}; private final static int[][] COORDINATES = {{2403, 5094}, {2390, 5096}, {2392, 5077}, {2408, 5080}, {2413, 5108}, {2381, 5106}, {2379, 5072}, {2420, 5082}}; /** * Handles spawning the next fightcave wave. * @param c * The player. */ public void spawnNextWave(Client c) { if (c != null) { if (c.waveId >= WAVES.length) { c.waveId = 0; return; } if (c.waveId < 0){ return; } int npcAmount = WAVES[c.waveId].length; for (int j = 0; j < npcAmount; j++) { int npc = WAVES[c.waveId][j]; int X = COORDINATES[j][0]; int Y = COORDINATES[j][1]; int H = c.heightLevel; int hp = getHp(npc); int max = getMax(npc); int atk = getAtk(npc); int def = getDef(npc); Server.npcHandler.spawnNpc(c, npc, X, Y, H, 0, hp, max, atk, def, false, true); } c.tzhaarToKill = npcAmount; c.tzhaarKilled = 0; } } /** * Handles the correct tz-kih effect; prayer * is drained by the formula: drain = damage + 1 * @param c * The player * @param i * The npcId * @param damage * What the npchit */ public static void tzKihEffect(Client c,int i, int damage) { if(NPCHandler.npcs[i].npcType == TZ_KIH) { if(c != null) { if(c.playerLevel[5] > 0) { c.playerLevel[5] -= 1 + damage; c.getPA().refreshSkill(5); } } } } /** * Handles the correct tz-kek effect; when you kill * tz-kek it splits into 2 smaller version of itself. * @param c * The player. * @param i * The npcId. */ public static void tzKekEffect(Client c, int i) { if(NPCHandler.npcs[i].npcType == TZ_KEK) { int x = NPCHandler.npcs[i].absX + 2; int y = NPCHandler.npcs[i].absY + 2; int x1 = NPCHandler.npcs[i].absX - 2; int y1 = NPCHandler.npcs[i].absY - 2; int hp = getHp(TZ_KEK_SPAWN); int max = getMax(TZ_KEK_SPAWN); int atk = getAtk(TZ_KEK_SPAWN); int def = getDef(TZ_KEK_SPAWN); if(c != null) { if(c.tzKekTimer == 0) { if(NPCHandler.npcs[i].isDead) { Server.npcHandler.spawnNpc(c, TZ_KEK_SPAWN, x, y, c.heightLevel, 0, hp, max, atk, def, true, true); Server.npcHandler.spawnNpc(c, TZ_KEK_SPAWN, x1, y1, c.heightLevel, 0, hp, max, atk, def, true, true); } } } } } public static int getHp(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 10; case TZ_KEK: return 20; case TOK_XIL: return 40; case YT_MEJKOT: return 80; case KET_ZEK: return 150; case TZTOK_JAD: return 250; } return 100; } public static int getMax(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 4; case TZ_KEK: return 7; case TOK_XIL: return 13; case YT_MEJKOT: return 28; case KET_ZEK: return 54; case TZTOK_JAD: return 97; } return 5; } public static int getAtk(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 30; case TZ_KEK: return 50; case TOK_XIL: return 100; case YT_MEJKOT: return 150; case KET_ZEK: return 450; case TZTOK_JAD: return 650; } return 100; } public static int getDef(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 30; case TZ_KEK: return 50; case TOK_XIL: return 100; case YT_MEJKOT: return 150; case KET_ZEK: return 300; case TZTOK_JAD: return 500; } return 100; } }[/CODE] [B]Remember to change packaging and imports.[/B] [B][I]Second:[/I][/B] Then go into PlayerAssistant class and replace/add these methods: [CODE] public void resetTzhaar() { c.waveId = -1; c.tzhaarToKill = -1; c.tzhaarKilled = -1; movePlayer(2438, 5168, 0); } public void enterCaves() { c.getPA().movePlayer(2413,5117, c.playerId * 4); c.waveId = 0; c.tzhaarToKill = -1; c.tzhaarKilled = -1; EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer e) { Server.fightCaves.spawnNextWave((Client)PlayerHandler.players[c.playerId]); e.stop(); } }, 10000); }[/CODE] [B]You will have to do a few things related with the giveLife method if you haven't already.[/B] [B][I]Third: [/I][/B] Add/replace these in your Player class [CODE]public int tzhaarToKill = 0, tzhaarKilled = 0, tzKekSpawn = 0, tzKekTimer = 0, caveWave, tzhaarNpcs;[/CODE] [B][I]Fourth: [/I][/B] Go into your NPCHandler class and add/replace these methods: [CODE] /** * Checks if a tzhaar npc has been killed, if so then it checks if * it needs to do the tz-kek effect. If tzKek spawn has been killed * twice or didn't need to be killed it calls killedTzhaar. * @param i * The npc. */ private void tzhaarDeathHandler(int i) { if (isFightCaveNpc(i) && npcs[i].npcType != FightCaves.TZ_KEK) killedTzhaar(i); if(npcs[i].npcType == FightCaves.TZ_KEK_SPAWN) { int p = npcs[i].killerId; if (PlayerHandler.players[p] != null) { Client c = (Client) PlayerHandler.players[p]; c.tzKekSpawn += 1; if(c.tzKekSpawn == 2) { killedTzhaar(i); c.tzKekSpawn = 0; } } } if(npcs[i].npcType == FightCaves.TZ_KEK) { int p = npcs[i].killerId; if (PlayerHandler.players[p] != null) { Client c = (Client) PlayerHandler.players[p]; FightCaves.tzKekEffect(c, i); } } } /** * Raises the count of tzhaarKilled, if tzhaarKilled is equal to the amount * needed to kill to move onto the next wave it raises wave id then starts next * wave. * @param i * The npc. */ private void killedTzhaar(int i) { final Client c2 = (Client) PlayerHandler.players[npcs[i].spawnedBy]; c2.tzhaarKilled++; if (c2.tzhaarKilled == c2.tzhaarToKill) { c2.waveId++; EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer c) { if (c2 != null) { Server.fightCaves.spawnNextWave(c2); } c.stop(); } }, 7500); } } /** * Handles the death of tztok-jad by ending the game and rewarding the player * with a fire cape. * @param i * The npc. */ public void handleJadDeath(int i) { Client c = (Client) PlayerHandler.players[npcs[i].spawnedBy]; c.getItems().addItem(6570, 1); c.sendMessage("Congratulations on completing the fight caves minigame!"); c.getPA().resetTzhaar(); c.waveId = 300; } /** * Checks if something is a fight cave npc. * @param i * The npc. * @return * Whether or not it is a fight caves npc. */ public boolean isFightCaveNpc(int i) { switch (npcs[i].npcType) { case FightCaves.TZ_KIH: case FightCaves.TZ_KEK: case FightCaves.TOK_XIL: case FightCaves.YT_MEJKOT: case FightCaves.KET_ZEK: case FightCaves.TZTOK_JAD: return true; } return false; }[/CODE] Then find the loadSpell method and in it add/replace these [CODE] case FightCaves.TZTOK_JAD: int r3 = 0; if (goodDistance(npcs[i].absX, npcs[i].absY, PlayerHandler.players[npcs[i].spawnedBy].absX, PlayerHandler.players[npcs[i].spawnedBy].absY, 1)) r3 = Misc.random(2); else r3 = Misc.random(1); if (r3 == 0) { npcs[i].attackType = 2; npcs[i].endGfx = 157; npcs[i].projectileId = 448; } else if (r3 == 1) { npcs[i].attackType = 1; npcs[i].endGfx = 451; npcs[i].projectileId = -1; } else if (r3 == 2) { npcs[i].attackType = 0; npcs[i].projectileId = -1; } break; case FightCaves.KET_ZEK: npcs[i].attackType = 2; npcs[i].projectileId = 445; npcs[i].endGfx = 446; break; case FightCaves.TOK_XIL: npcs[i].attackType = 1; npcs[i].projectileId = 443; break;[/CODE] Then find your applyDamage method and add this [CODE]handleSpecialEffects(c, i, damage);[/CODE] below [CODE]handleSpecialEffects(c, i, damage);[/CODE] The find your process method and add this [CODE]tzhaarDeathHandler(i);[/CODE] below [CODE]appendSlayerExperience(i);[/CODE] [B]Make sure to import the FightCaves class.[/B] [B][I]Credits: [/I][/B] Me Sanity If I missed anything tell me. [/CENTER]
  2. anyone experience or heard about the fight caves not working correctly, waves not spawning NPC's? also having console problems when in combat... entitylist:java60 constantly flooding console eclipse only shows a warning on line 60 anyone can help me out tyvm
  3. While rewriting my Fight Caves I thought i'd use Official Fight Caves Waves, and so I release it to you guys :) Source Used: [url=http://runescape.wikia.com/wiki/TzHaar_Fight_Cave]TzHaar Fight Cave - The RuneScape Wiki[/url] Before you post: "OMFG SOME PI SOURCES ALREADY HAD THIS!!" This is mainly released to those who don't have the correct waves and/or those who are rewriting there Fight Caves and were lazy. If you find that a wave is incorrect please post and i'll fix immediately [code]{{2627},{2627,2627},{2630},{2630,2627},{2630,2627,2627},{2630,2630},{2631},{2631,2627},{2631,2627,2627},{2631,2630}, {2631,2630,2627},{2631,2630,2627,2627},{2631,2630,2630},{2631,2631},{2741},{2741,2627},{2741,2627,2627},{2741,2630},{2741,2630,2627},{2741,2630,2627,2627}, {2741,2630,2630},{2741,2631},{2741,2631,2627},{2741,2631,2627,2627},{2741,2631,2630},{2741,2631,2630,2627},{2741,2631,2630,2627,2627},{2741,2631,2630,2630}, {2741,2631,2631},{2741,2741},{2743},{2743,2627},{2743,2627,2627},{2743,2630},{2743,2630,2627},{2743,2630,2627,2627},{2743,2630,2630},{2743,2631},{2743,2631,2627}, {2743,2631,2627,2627},{2743,2631,2630},{2743,2631,2630,2627},{2743,2631,2630,2627,2627},{2743,2631,2630,2630},{2743,2631,2631},{2743,2741},{2743,2741,2627}, {2743,2741,2627,2627},{2743,2741,2630},{2743,2741,2630,2627},{2743,2741,2630,2627,2627},{2743,2741,2630,2630},{2743,2741,2631},{2743,2741,2631,2627}, {2743,2741,2631,2627,2627},{2743,2741,2631,2630},{2743,2741,2631,2630,2627},{2743,2741,2631,2630,2627,2627},{2743,2741,2631,2630,2630},{2743,2741,2631,2631}, {2743,2741,2741},{2743,2743},{2745,2746,2746,2746,2746}};[/code]
  4. need a server where i can hop in and spawn gear and practice fight caves straight away please can you link one
  5. Well I am wondering if there is a way to either add dif coords or change them up some way in the controller? If anyone knows how please let me know! I am trying to add/fix a load of things and change some controllers around to load maps that are actually there.. Fight Caves is there but bork maps aren't, nomad aren't, and a few others as well. And some controllers failed so I had to rewrite some of the minigames to load to Fight Cave maps but would like to change that option... Thanks.
  6. [COLOR="Lime"]What are you adding? Fully 63 Wave Fight Caves like runescape[/COLOR] Lets start First make a new class named Location:server/model/minigames/thzaar/FightCaves.java [CODE]package server.game.minigames.tzhaar; import server.Server; import server.game.npcs.NPCHandler; import server.game.players.Client; public class FightCaves { public static final int TZ_KIH = 2627, TZ_KEK_SPAWN = 2738, TZ_KEK = 2630, TOK_XIL = 2631, YT_MEJKOT = 2741, KET_ZEK = 2743, TZTOK_JAD = 2745; /** * Holds the data for the 63 waves fight cave. */ private final int[][] WAVES = {{TZ_KIH}, {TZ_KIH,TZ_KIH}, {TZ_KEK}, {TZ_KEK,TZ_KIH}, {TZ_KEK,TZ_KIH,TZ_KIH}, {TZ_KEK,TZ_KEK}, {TOK_XIL}, {TOK_XIL,TZ_KIH}, {TOK_XIL,TZ_KIH,TZ_KIH}, {TOK_XIL,TZ_KEK}, {TOK_XIL,TZ_KEK,TZ_KIH}, {TOK_XIL,TZ_KEK,TZ_KIH,TZ_KIH}, {TOK_XIL,TZ_KEK,TZ_KEK}, {TOK_XIL,TOK_XIL}, {YT_MEJKOT}, {YT_MEJKOT,TZ_KIH}, {YT_MEJKOT,TZ_KIH,TZ_KIH}, {YT_MEJKOT,TZ_KEK}, {YT_MEJKOT,TZ_KEK,TZ_KIH}, {YT_MEJKOT,TZ_KEK,TZ_KIH,TZ_KIH}, {YT_MEJKOT,TZ_KEK,TZ_KEK}, {YT_MEJKOT,TOK_XIL}, {YT_MEJKOT,TOK_XIL,TZ_KIH}, {YT_MEJKOT,TOK_XIL,TZ_KIH,TZ_KIH}, {YT_MEJKOT,TOK_XIL,TZ_KEK}, {YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KIH}, {YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KIH,TZ_KIH}, {YT_MEJKOT,TOK_XIL,TZ_KEK,TZ_KEK}, {YT_MEJKOT,TOK_XIL,T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{TZTOK_JAD}}; private final static int[][] COORDINATES = {{2403, 5094}, {2390, 5096}, {2392, 5077}, {2408, 5080}, {2413, 5108}, {2381, 5106}, {2379, 5072}, {2420, 5082}}; /** * Handles spawning the next fightcave wave. * [MENTION=75098]Para[/MENTION]m c * The player. */ public void spawnNextWave(Client c) { if (c != null) { if (c.waveId >= WAVES.length) { c.waveId = 0; return; } if (c.waveId < 0){ return; } int npcAmount = WAVES[c.waveId].length; for (int j = 0; j < npcAmount; j++) { int npc = WAVES[c.waveId][j]; int X = COORDINATES[j][0]; int Y = COORDINATES[j][1]; int H = c.heightLevel; int hp = getHp(npc); int max = getMax(npc); int atk = getAtk(npc); int def = getDef(npc); Server.npcHandler.spawnNpc(c, npc, X, Y, H, 0, hp, max, atk, def, true, false); } c.tzhaarToKill = npcAmount; c.tzhaarKilled = 0; } } /** * Handles the correct tz-kih effect; prayer * is drained by the formula: drain = damage + 1 * [MENTION=75098]Para[/MENTION]m c * The player * [MENTION=75098]Para[/MENTION]m i * The npcId * [MENTION=75098]Para[/MENTION]m damage * What the npchit */ public static void tzKihEffect(Client c,int i, int damage) { if(NPCHandler.npcs[i].npcType == TZ_KIH) { if(c != null) { if(c.playerLevel[5] > 0) { c.playerLevel[5] -= 1 + damage; c.getPA().refreshSkill(5); } } } } public static void tzKekEffect(Client c, int i) { if(NPCHandler.npcs[i].npcType == TZ_KEK) { int x = NPCHandler.npcs[i].absX + 2; int y = NPCHandler.npcs[i].absY + 2; int x1 = NPCHandler.npcs[i].absX - 2; int y1 = NPCHandler.npcs[i].absY - 2; int hp = getHp(TZ_KEK_SPAWN); int max = getMax(TZ_KEK_SPAWN); int atk = getAtk(TZ_KEK_SPAWN); int def = getDef(TZ_KEK_SPAWN); if(c != null) { if(c.tzKekTimer == 0) { if(NPCHandler.npcs[i].isDead) { Server.npcHandler.spawnNpc(c, TZ_KEK_SPAWN, x, y, c.heightLevel, 0, hp, max, atk, def, true, false); Server.npcHandler.spawnNpc(c, TZ_KEK_SPAWN, x1, y1, c.heightLevel, 0, hp, max, atk, def, true, false); } } } } } public static int getHp(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 10; case TZ_KEK: return 20; case TOK_XIL: return 40; case YT_MEJKOT: return 80; case KET_ZEK: return 150; case TZTOK_JAD: return 250; } return 100; } public static int getMax(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 4; case TZ_KEK: return 7; case TOK_XIL: return 13; case YT_MEJKOT: return 28; case KET_ZEK: return 54; case TZTOK_JAD: return 97; } return 5; } public static int getAtk(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 30; case TZ_KEK: return 50; case TOK_XIL: return 100; case YT_MEJKOT: return 150; case KET_ZEK: return 450; case TZTOK_JAD: return 650; } return 100; } public static int getDef(int npc) { switch (npc) { case TZ_KIH: case TZ_KEK_SPAWN: return 30; case TZ_KEK: return 50; case TOK_XIL: return 100; case YT_MEJKOT: return 150; case KET_ZEK: return 300; case TZTOK_JAD: return 500; } return 100; } }[/CODE] Next go to NPCHandler look for something [B]private void killedBarrow(int i) {[/B] add this under the last } u see: [CODE] private void tzhaarDeathHandler(int i) { if (isFightCaveNpc(i) && npcs[i].npcType != FightCaves.TZ_KEK) killedTzhaar(i); if(npcs[i].npcType == FightCaves.TZ_KEK_SPAWN) { int p = npcs[i].killerId; if (PlayerHandler.players[p] != null) { Client c = (Client) PlayerHandler.players[p]; c.tzKekSpawn += 1; if(c.tzKekSpawn == 2) { killedTzhaar(i); c.tzKekSpawn = 0; } } } if(npcs[i].npcType == FightCaves.TZ_KEK) { int p = npcs[i].killerId; if (PlayerHandler.players[p] != null) { Client c = (Client) PlayerHandler.players[p]; FightCaves.tzKekEffect(c, i); } } } private void killedTzhaar(int i) { final Client c2 = (Client) PlayerHandler.players[npcs[i].spawnedBy]; c2.tzhaarKilled++; if (c2.tzhaarKilled == c2.tzhaarToKill) { c2.waveId++; EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer c) { if (c2 != null) { Server.fightCaves.spawnNextWave(c2); } c.stop(); } }, 7500); } } public void handleJadDeath(int i) { Client c = (Client)Server.playerHandler.players[npcs[i].spawnedBy]; c.getItems().addItem(6570,1); c.getDH().sendDialogues(69, 2617); c.getPA().resetTzhaar(); c.waveId = 300; }[/CODE] then look for [B]if (npcs[i].isDead == true) {[/B] scroll down till u see something like this [CODE]dropItems(i); // npc drops items! appendSlayerExperience(i);[/CODE] under one of them add : [CODE]tzhaarDeathHandler(i); [/CODE] and [CODE] if (npcs[i].npcType == 2745) { handleJadDeath(i); }[/CODE] then look for [B]public void applydamage[/B] and scroll down till u reach the end of the public above [B]c.getPA().refreshSkill(3);[/B] add : [CODE] FightCaves.tzKihEffect(c, i, damage);[/CODE] Next go to PlayerAssistant and add this somewhere : [CODE] public void resetTzhaar() { c.waveId = -1; c.tzhaarToKill = -1; c.tzhaarKilled = -1; movePlayer(2438, 5168, 0); } public void enterCaves() { c.getPA().movePlayer(2413,5117, c.playerId * 4); c.waveId = 0; c.tzhaarToKill = -1; c.tzhaarKilled = -1; EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer e) { Server.fightCaves.spawnNextWave((Client)PlayerHandler.players[c.playerId]); e.stop(); } }, 10000); }[/CODE] Next look for givelife and add this: [CODE] } else if (c.inFightCaves()) { c.getPA().resetTzhaar();[/CODE] next go to client.java and look for [B]correctCoordinates()[/B] put this under it [CODE] if (inFightCaves()) { getPA().movePlayer(absX, absY, playerId * 4); sendMessage("Your wave will start in 10 seconds."); EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer c) { Server.fightCaves.spawnNextWave((Client)PlayerHandler.players[playerId]); c.stop(); } }, 10000); }[/CODE] Next go to player.java and add this: [CODE] tzhaarToKill = 0, tzhaarKilled = 0, tzKekSpawn = 0, tzKekTimer = 0, waveId,[/CODE] Next search for [B]inMulti()[/B] add this under the last } u see after inmulti : [CODE] public boolean inFightCaves() { return absX >= 2360 && absX <= 2445 && absY >= 5045 && absY <= 5125; }[/CODE] go to your sendialogue and add this : [CODE] case 69: sendNpcChat2("You even defeated TzTok-Jad, I am most impressed!", "Please accept this gift as a reward.", c.talkingNpc, "Tzhaar-Mej-Tal"); c.nextChat = -1; break;[/CODE] reply if i forgot something btw add the imports Credits : 25% me for ripping from source and editing a little part 75% to the owner of the source
  7. [video=youtube;e_wRxTSfPMY]http://www.youtube.com/watch?v=e_wRxTSfPMY[/video] Video should say it all.
  8. bloodshot456

    Fight caves

    I'm willing to give full trade full summoning, glacors and a customized nomad for fight caves :l and ofc if you don't have drop editor I'll give that also (For fight caves)
  9. `Tyluur

    Config Fight Caves

    I need the configuration id for the interface that drops down showing you what wave you're on. Does anyone have it?
  10. So I made a short movie of my servers fight caves. (This is not really advertisement cause my server isn't open yet ha ha) The base I am using is shard revolutions and client is runelimited. Credits to graham for source and galkon for runelimited. So here is the movie. The multiplayer starts at 1:10 [URL="http://youtu.be/JA45hBJKfmw"]Magic land's fight caves - multiplayer.[/URL] I know this isn't that impressive (cause emps-scape did it before kind of) but its the servers first mini-game so I just thought I would show you guys :D. If you want to know more about magic land - sign up on the forums to get lots of update news (unless you don't care which is understandable :cool:) [URL="http://magicland.createaforum.com/index.php"]Magic Land Forums[/URL] Enjoy. :edit: I also couldn't find the showoff section, So if this is in the wrong section I apologize.
  11. Xerox

    [PI] Fight Caves Help

    So I had to rip a fight caves minigame out of Runehaze's server since my base didn't come with one, and I got it all except for one part. The NPCs aren't spawning. Here's my java classes: FightCaves.java: [CODE]package server.model.minigames; import server.model.players.Client; import server.Server; import server.model.players.PlayerAssistant; /** * @author Core */ public class FightCaves { private final int[][] WAVES = { {2627}, {2627,2627}, {2630,2627}, {2630,2627,2627}, {2631,2627}, {2631,2627,2627}, {2631,2630}, {2631,2630,2627}, {2631,2630,2627,2627}, {2631,2631}, {2741,2627,2627}, {2741,2630}, {2741,2630,2627}, {2741,2630,2630}, {2741,2631}, {2741,2631,2630}, {2741,2631,2630,2627}, {2741,2741}, {2743,2627,2627}, {2743,2631}, {2743,2631,2627,2627}, {2743,2631,2630,2630}, {2743,2741}, {2743,2741,2627}, {2743,2741,2631}, {2743,2741,2631,2627}, {2743,2741,2631,2630,2627,2627}, {2743,2741,2631,2630,2630}, {2743,2741,2631,2631}, {2743,2741,2741}, {2743,2743}, {2745} }; private int[][] coordinates = { {2398,5086}, {2387,5095}, {2407,5098}, {2417,5082}, {2390,5076}, {2410, 5090} }; public void spawnNextWave(Client c) { if (c != null) { if (c.waveId >= WAVES.length) { c.waveId = 0; return; } if (c.waveId < 0){ return; } int npcAmount = WAVES[c.waveId].length; for (int j = 0; j < npcAmount; j++) { int npc = WAVES[c.waveId][j]; int X = coordinates[j][0]; int Y = coordinates[j][1]; int H = c.heightLevel; int hp = getHp(npc); int max = getMax(npc); int atk = getAtk(npc); int def = getDef(npc); Server.npcHandler.spawnNpc(c, npc, X, Y, H, c.playerId * 4, hp, max, atk, def, true, false); //c.playerId * 4 represents height c.sendMessage("Fight caves is starting!"); } c.tzhaarToKill = npcAmount; c.tzhaarKilled = 0; } else { } } public int getHp(int npc) { switch (npc) { case 2627: return 10; case 2630: return 20; case 2631: return 40; case 2741: return 80; case 2743: return 150; case 2745: return 250; } return 100; } public int getMax(int npc) { switch (npc) { case 2627: return 4; case 2630: return 7; case 2631: return 13; case 2741: return 28; case 2743: return 54; case 2745: return 97; } return 5; } public int getAtk(int npc) { switch (npc) { case 2627: return 30; case 2630: return 50; case 2631: return 100; case 2741: return 150; case 2743: return 450; case 2745: return 650; } return 100; } public int getDef(int npc) { switch (npc) { case 2627: return 30; case 2630: return 50; case 2631: return 100; case 2741: return 150; case 2743: return 300; case 2745: return 500; } return 100; } }[/CODE] PlayerAssistant.java [CODE] public void resetTzhaar() { c.jaddy = -1; c.tzhaarToKill = -1; c.tzhaarKilled = -1; c.getPA().movePlayer(2438,5168,0); } public void enterCaves(int x, int y, int height) { c.getPA().movePlayer(x, y, height); //c.teleHeight = height; //c.height = c.playerId * 4; //c.getPA().movePlayer(2413,5117, c.height); //c.jaddy = 5; c.waveId = 0; c.tzhaarToKill = -1; c.tzhaarKilled = -1; Server.fightCaves.spawnNextWave(c); //Server.npcHandler.spawnNpc(c, 2745, c.absX, c.absY-1, c.heightLevel, 0, 500, 80, 400, 400, true, true); }[/CODE] ActionHandler.java: [CODE] case 9356: c.getPA().enterCaves(2413,5117,c.playerId * 4); //c.getPA().movePlayer(2413,5117, c.playerId * 4); //c.sendMessage("Temporarily removed due to bugs."); break;[/CODE] I think it has to do with the height level as I've had some compiling errors, and I also get the feeling it's something obvious, so please enlighten me. Also, if someone has a tutorial, I searched for ages and couldn't find one.
  12. Guy's does any one know's the coordinates of:Mos Le'Harmless Caves Where the cave horrors monsters are? Please.
×