|
| Full barrows | |
| | Author | Message |
---|
Evil Mage Admin
Number of posts : 432 Age : 32 Registration date : 2008-05-08
| Subject: Full barrows Tue Jul 01, 2008 1:54 pm | |
| Description : Will add full barrows to your server. Difficulty : 6/10 ... 2/10 depends on your skills Purpose : For other players to earn some barrows armor Step one : Search for .. - Code:
-
public void writePlayers() { You should see something like this - Code:
-
public void writePlayers() { int players = PlayerHandler.getPlayerCount(); sendFrame126("", 6569); SimpleDateFormat sdf = new SimpleDateFormat(""); String date = sdf.format(new Date());
SimpleDateFormat sdf2 = new SimpleDateFormat(""); String date2 = sdf2.format(new Date());
sendFrame126("@whi@ ", 6572); sendFrame126("@whi@ ", 6664); setInterfaceWalkable(6673); setInterfaceWalkable(6568); } } } Replace it with mine... - Code:
-
public void writePlayers() { int players = PlayerHandler.getPlayerCount(); sendFrame126("", 6569); SimpleDateFormat sdf = new SimpleDateFormat(""); String date = sdf.format(new Date());
SimpleDateFormat sdf2 = new SimpleDateFormat(""); String date2 = sdf2.format(new Date());
sendFrame126("@whi@ ", 6572); sendFrame126("@whi@ ", 6664); setInterfaceWalkable(6673); setInterfaceWalkable(6568); if (isInBarrows()) { sendFrame126("@whi@ Kill Count: @dre@" + barrowskillcount, 6570); } else { sendFrame126("", 6570); } } Step two : Search for - Code:
-
public boolean isInArea(int x, int y, int x2, int y2) { And under the last } add - Code:
-
/*IS IN Barrows Count*/ public boolean isInBCount(int x, int x2) { if (barrowskillcount >= x && barrowskillcount <= x2) return true; return false; } /*BARROWs VOIDS AND INTS AND BOOLEANS*/ public boolean isInBarrows() { if (isInArea(3522, 9720, 3583, 9675)) return true; if (isInArea(3546, 3305, 3583, 3264)) return true; return false; }
public void spawnABrother(int npcID, int absX, int absY) { server.npcHandler.newNPC(npcID, (absX), (absY), heightLevel, absX + 3, absY + 3, absX - 3, absY - 3, 1, server.npcHandler.GetNpcListHP(npcID), false); }
public void resetbarrows() { barrowskillcount= 0; barrowspicked = false; dharokisalive = false; veracisalive = false; ahrimisalive = false; guthanisalive = false; karilisalive = false; toragisalive = false; dharokistunnel = false; veracistunnel = false; ahrimistunnel = false; guthanistunnel = false; karilistunnel = false; toragistunnel = false; dharok = false; verac = false; ahrim = false; guthan = false; karil = false; torag = false; }
public void barrowstunnel1() { dharokistunnel = true; veracistunnel = false; ahrimistunnel = false; guthanistunnel = false; karilistunnel = false; toragistunnel = false; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 1 - Dharok"); } } public void barrowstunnel2() { dharokistunnel = false; veracistunnel = true; ahrimistunnel = false; guthanistunnel = false; karilistunnel = false; toragistunnel = false; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 2 - Verac"); } } public void barrowstunnel3() { dharokistunnel = false; veracistunnel = false; ahrimistunnel = true; guthanistunnel = false; karilistunnel = false; toragistunnel = false; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 3 - Ahrim"); } } public void barrowstunnel4() { dharokistunnel = false; veracistunnel = false; ahrimistunnel = false; guthanistunnel = true; karilistunnel = false; toragistunnel = false; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 4 - Guthan"); } } public void barrowstunnel5() { dharokistunnel = false; veracistunnel = false; ahrimistunnel = false; guthanistunnel = false; karilistunnel = true; toragistunnel = false; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 5 - Karil"); } } public void barrowstunnel6() { dharokistunnel = false; veracistunnel = false; ahrimistunnel = false; guthanistunnel = false; karilistunnel = false; toragistunnel = true; if(playerName.equalsIgnoreCase("new_guy")) { System.out.println("Barrows Picked: 6 - Torag"); } }
public static int barrowskillcount = 0; public static int randombt[] = {1,2,3,4,5,6}; public int barrowstunnel = randombt[(int)(Math.random()*randombt.length)];
public boolean barrowspicked = false;
public boolean dharokisalive = false; public boolean veracisalive = false; public boolean ahrimisalive = false; public boolean guthanisalive = false; public boolean karilisalive = false; public boolean toragisalive = false;
public boolean dharokistunnel = false; public boolean veracistunnel = false; public boolean ahrimistunnel = false; public boolean guthanistunnel = false; public boolean karilistunnel = false; public boolean toragistunnel = false;
public static boolean dharok = false; public static boolean verac = false; public static boolean ahrim = false; public static boolean guthan = false; public static boolean karil = false; public static boolean torag = false;
public void Dharok() { sendMessage("You dig your way into the tomb of Dharok..."); teleportToX = 3554; teleportToY = 9713; heightLevel = -1; } public void Verac() { sendMessage("You dig your way into the tomb of Verac..."); teleportToX = 3576; teleportToY = 9705; heightLevel = -1; } public void Ahrim() { sendMessage("You dig your way into the tomb of Ahrim..."); teleportToX = 3558; teleportToY = 9699; heightLevel = -1; } public void Guthan() { sendMessage("You dig your way into the tomb of Guthan..."); teleportToX = 3538; teleportToY = 9706; heightLevel = -1; } public void Karil() { sendMessage("You dig your way into the tomb of Karil..."); teleportToX = 3548; teleportToY = 9683; heightLevel = -1; } public void Torag() { sendMessage("You dig your way into the tomb of Torag..."); teleportToX = 3567; teleportToY = 9685; heightLevel = -1; } public void Dharokcoffin() { if (dharokistunnel == false) { if (dharokisalive == false) { dharokisalive = true; sendMessage("You awaken the great Dharok!"); spawnABrother(2026,3553,9715); } else if (dharokisalive == true) { sendMessage("You already awoke Dharok."); } } else if (dharokistunnel == true) { if ((verac == true) && (ahrim == true) && (guthan == true) && (karil == true) && (torag == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((verac == false) || (guthan == false) || (ahrim == false) || (karil == false) || (torag == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } } public void Veraccoffin() { if (veracistunnel == false) { if (veracisalive == false) { veracisalive = true; sendMessage("You awaken the great Verac!"); spawnABrother(2030,3575,9707); } else { sendMessage("You ahave already awoken Verac."); } } else if ((veracistunnel == true) && (dharok == true) && (ahrim == true) && (guthan == true) && (karil == true) && (torag == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((veracistunnel == true) && (dharok == false) || (guthan == false) || (ahrim == false) || (karil == false) || (torag == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } public void Ahrimcoffin() { if (ahrimistunnel == false) { if (ahrimisalive == false) { ahrimisalive = true; sendMessage("You awaken the great Ahrim!"); spawnABrother(2025,3557,9700); } else { sendMessage("You ahave already awoken Ahrim."); } } else if ((ahrimistunnel == true) && (dharok == true) && (verac == true) && (guthan == true) && (karil == true) && (torag == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((ahrimistunnel == true) && (dharok == false) || (verac == false) || (guthan == false) || (karil == false) || (torag == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } public void Guthancoffin() { if (guthanistunnel == false) { if (guthanisalive == false) { guthanisalive = true; sendMessage("You awaken the great Guthan!"); spawnABrother(2027,3540,9705); } else { sendMessage("You ahave already awoken Guthan."); } } else if ((guthanistunnel == true) && (dharok == true) && (verac == true) && (karil == true) && (torag == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((guthanistunnel == true) && (dharok == false) || (verac == false) || (ahrim == false) || (karil == false) || (torag == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } public void Karilcoffin() { if (karilistunnel == false) { if (karilisalive == false) { karilisalive = true; sendMessage("You awaken the great Karil!"); spawnABrother(2028,3549,9684); } else { sendMessage("You ahave already awoken Karil."); } } else if ((karilistunnel == true) && (dharok == true) && (verac == true) && (guthan == true) && (torag == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((karilistunnel == true) && (dharok == false) || (verac == false) || (ahrim == false) || (guthan == false) || (torag == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } public void Toragcoffin() { if (toragistunnel == false) { if (toragisalive == false) { toragisalive = true; sendMessage("You awaken the great Torag!"); spawnABrother(2029,3568,9687); } else { sendMessage("You ahave already awoken Torag."); } } else if ((toragistunnel == true) && (dharok == true) && (verac == true) && (ahrim == true) && (karil == true) && (guthan == true)) { teleportToX = 3569; teleportToY = 9711; heightLevel = 0; } else if ((toragistunnel == true) && (dharok == false) || (verac == false) || (ahrim == false) || (karil == false) || (guthan == false)) { sendMessage("You must kill all the brothers before you can"); sendMessage("enter into the tunnels."); } } | |
| | | Evil Mage Admin
Number of posts : 432 Age : 32 Registration date : 2008-05-08
| Subject: part 2 Tue Jul 01, 2008 1:55 pm | |
| You should know where to put this but add it if you do know , if you don't ask it in the help/development section - Code:
-
/* BARROWS STAIRS*/ if (objectID == 6703) // Dharok Stairs { teleportToX = 3575; teleportToY = 3297; heightLevel = 0; } if (objectID == 6704) // Guthan Stairs { teleportToX = 3577; teleportToY = 3281; heightLevel = 0; } if (objectID == 6705) // Karil Stairs { teleportToX = 3565; teleportToY = 3277; heightLevel = 0; } if (objectID == 6706) // Torag Stairs { teleportToX = 3553; teleportToY = 3284; heightLevel = 0; } if (objectID == 6707) // Verac Stairs { teleportToX = 3556; teleportToY = 3299; heightLevel = 0; } if (objectID == 6702) // Ahrim Stairs { teleportToX = 3565; teleportToY = 3290; heightLevel = 0; } /* BARROWS COFFINS */ if (objectID == 6771) //Dharok Coffin { Dharokcoffin(); } if (objectID == 6823) //Verac Coffin { Veraccoffin(); } if (objectID == 6821) //Ahrim Coffin { Ahrimcoffin(); } if (objectID == 6773) //Guthan Coffin { Guthancoffin(); } if (objectID == 6822) //Karil Coffin { Karilcoffin(); } if (objectID == 6772) //Torag Coffin { Toragcoffin(); } /* BARROWS DOORS */ if (objectID == 6719) { if (dharokistunnel == true) { dharokisalive = true; spawnABrother(2026,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (dharokistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } if (objectID == 6740) { if (ahrimistunnel == true) { ahrimisalive = true; spawnABrother(2025,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (ahrimistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } if (objectID == 6749) { if (guthanistunnel == true) { guthanisalive = true; spawnABrother(2027,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (guthanistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } if (objectID == 6728) { if (karilistunnel == true) { karilisalive = true; spawnABrother(2028,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (karilistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } if (objectID == 6736) { if (toragistunnel == true) { toragisalive = true; spawnABrother(2029,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (toragistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } if (objectID == 6750) { if (veracistunnel == true) { veracisalive = true; spawnABrother(2030,absX,absY); ReplaceObject(objectX,objectY, -1, -1); } else if (veracistunnel == false) { ReplaceObject(objectX,objectY, -1, -1); } } else if (objectID == 6721 || objectID == 6739 || objectID == 6720 || objectID == 6716 || objectID == 6741 || objectID == 6722 || objectID == 6735 || objectID == 6747 || objectID == 6725 || objectID == 6744 || objectID == 6723 || objectID == 6742 || objectID == 6738 || objectID == 6718 || objectID == 6737 || objectID == 6717 || objectID == 6736 || objectID == 6743 || objectID == 6724 || objectID == 6727 || objectID == 6731 || objectID == 6730 || objectID == 6729 || objectID == 6748 || objectID == 6726 || objectID == 6745) { ReplaceObject(objectX,objectY, -1, -1); } /* BARROWS CHEST */ if (objectID == 10284) { if (GoodDistance(absX, absY, objectX, objectY, 1) == true) { if (dharok == true && verac == true && ahrim == true && guthan == true && karil == true && torag == true) { createNewTileObject(objectX, objectY, 6775, 0, 10); } else if (dharok == false || verac == false || ahrim == false || guthan == false || karil == false || torag == false) { sendMessage("You need to kill all of the Brothers before you can open this chest."); } } } if (objectID == 6775) { if (GoodDistance(absX, absY, objectX, objectY, 1) == true) { if (barrowskillcount == 6) { addItem(Item2.randomBarrows(), 1); resetbarrows(); sendMessage("You loot the barrows chest for everything you see..."); sendMessage("...you then get mysteriously teleported away..."); teleportToX = 3541; teleportToY = 3306; heightLevel = 0; } else if (isInBCount(7,20)) { addItem(Item2.randomBarrows2(), 1); resetbarrows(); sendMessage("You loot the barrows chest for everything you see..."); sendMessage("...you then get mysteriously teleported away..."); teleportToX = 3541; teleportToY = 3306; heightLevel = 0; } else if (isInBCount(21,40)) { addItem(Item2.randomBarrows3(), 1); resetbarrows(); sendMessage("You loot the barrows chest for everything you see..."); sendMessage("...you then get mysteriously teleported away..."); teleportToX = 3541; teleportToY = 3306; heightLevel = 0; } else if (isInBCount(41,50)) { addItem(Item2.randomBarrows4(), 1); resetbarrows(); sendMessage("You loot the barrows chest for everything you see..."); sendMessage("...you then get mysteriously teleported away..."); teleportToX = 3541; teleportToY = 3306; heightLevel = 0; } else if (barrowskillcount >= 51) { addItem(Item2.randomBarrows5(), 1); resetbarrows(); sendMessage("You loot the barrows chest for everything you see..."); sendMessage("...you then get mysteriously teleported away..."); teleportToX = 3541; teleportToY = 3306; heightLevel = 0; } } }
step 3 : Search for case 3125 which should be for prayer...above it add - Code:
-
case 952: //Spade DIG!!! if (barrowspicked == false) { barrowspicked = true; if (barrowstunnel == 1) { barrowstunnel1(); } else if (barrowstunnel == 2) { barrowstunnel2(); } else if (barrowstunnel == 3) { barrowstunnel3(); } else if (barrowstunnel == 4) { barrowstunnel4(); } else if (barrowstunnel == 5) { barrowstunnel5(); } else if (barrowstunnel == 6) { barrowstunnel6(); } } else if (barrowspicked == true) { setAnimation(831); updateRequired = true; appearanceUpdateRequired = true; if (isInArea(3570, 3302, 3579, 3293)) { Dharok(); } else if (isInArea(3561, 3292, 3568, 3285)) { Ahrim(); } else if (isInArea(3553, 3301, 3561, 3294)) { Verac(); } else if (isInArea(3550, 3287, 3557, 3278)) { Torag(); } else if (isInArea(3562, 3279, 3569, 3273)) { Karil(); } else if (isInArea(3571, 3285, 3582, 3278)) { Guthan(); } else { sendMessage("You find nothing here."); } } break; Now in item.java , add this in there // you should know where -.-// - Code:
-
public static int barrowsitem[] = {4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4745,4747,4749,4751,4753,4755,4757,4759};
public static int randomBarrowsitem() { return barrowsitem[(int)(Math.random()*barrowsitem.length)]; } | |
| | | | Full barrows | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |