owner lorenzo
June 20th, 2010, 18:05
This is my Copy/paste barrows !
I realesed this before on Runelocus, but then the data crashed
NO FLAMING !
Credits:
Me
Soul Banner (508 base)
Things i still need to add:
-Arrow above barrow brother their head
-Real chest place + tunnels
-Puzzels
-Killcount interface
Step 1:
Add this to Player.java
/**
* To check if the brother is spawned and kc
**/
public int barrowkc;
public int DharokSpawned = 0;
public int VeracSpawned = 0;
public int AhrimSpawned = 0;
public int ToragSpawned = 0;
public int GuthanSpawned = 0;
public int KarilSpawned = 0;
And add this in player.java to:
public void resetbarrowkc() {
barrowkc = 0;
}
public void resetbarrowbrother() {
VeracSpawned = 0;
AhrimSpawned = 0;
DharokSpawned = 0;
ToragSpawned = 0;
KarilSpawned = 0;
GuthanSpawned = 0;
}
And this (in player.java):
public static int barrowsItems[] = {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 getBarrowsReward() {
return barrowsItems[(int) (Math.random() * barrowsItems.length)];
}
Step 2:
Add this to Filemanager.java
stream.writeString("barrowkc: " +p.barrowkc);
Add this to Filemanager.java
Search for
else if (line.startsWith("DC: "))
p.DC = Integer.parseInt(line.substring(4));
Add this under it
else if (line.startsWith("barrowkc: "))
p.barrowkc = Integer.parseInt(line.substring(10));
Step 3:
Add this in Engine.java (it makes when u bury on the hill u go to the coffin)
/**
* barrows hill 1 - Guthan
*/
public static boolean guthanhillArea(int absX, int absY) {
return (absX >= 3574 && absX <= 3581 && absY >= 3279 && absY <= 3285);
}
/**
* barrows hill 2 - Karil
*/
public static boolean karilhillArea(int absX, int absY) {
return (absX >= 3562 && absX <= 3569 && absY >= 3272 && absY <= 3278);
}
/**
* barrows hill 3 - Dharok
*/
public static boolean dharokhillArea(int absX, int absY) {
return (absX >= 3572 && absX <= 3578 && absY >= 3295 && absY <= 3301);
}
/**
* barrows hill 4 - Ahrim
*/
public static boolean ahrimhillArea(int absX, int absY) {
return (absX >= 3563 && absX <= 3569 && absY >= 3285 && absY <= 3292);
}
/**
* barrows hill 5 - Torag
*/
public static boolean toraghillArea(int absX, int absY) {
return (absX >= 3550 && absX <= 3556 && absY >= 3279 && absY <= 3285);
}
/**
* barrows hill 6 - Verac
*/
public static boolean verachillArea(int absX, int absY) {
return (absX >= 3553 && absX <= 3560 && absY >= 3294 && absY <= 3301);
}
Step 4:
Add this in ItemSelect.java (With this Code the stairs wil work to get out)
case 952:
if (Server.engine.dharokhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3556, 9718, 3);
}
else if (Server.engine.ahrimhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3557, 9703, 3);
}
else if (Server.engine.toraghillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3568, 9683, 3);
}
else if (Server.engine.guthanhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3534, 9704, 3);
}
else if (Server.engine.verachillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3578, 9706, 3);
}
if (Server.engine.karilhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3546, 9684, 3);
} else {
p.requestAnim(830, 0);
p.getActionSender().sendMessage(p, "There is nothing to dig here....");
}
break;
Step 5:
Add this in ObjectOption1.java
//Start of barrows stairs
case 6707://verac
p.setCoords(3557, 3299, 0);
break;
case 6706://torag
p.setCoords(3554, 3283, 0);
break;
case 6705://karil
p.setCoords(3566, 3276, 0);
break;
case 6704://guthan
p.setCoords(3577, 3283, 0);
break;
case 6703://dharok
p.setCoords(3575, 3298, 0);
break;
case 6702://ahrim
p.setCoords(3565, 3289, 0);
break;
//End of barrows stairs
Step 6:
Add this to ObjectOption1.java (it makes when u click on coffins the npc comes out)
//Start of barrows
case 6771://Dharok
if (p.DharokSpawned == 0) {
p.getActionSender().sendMessage(p, "Dharok appears out of the coffin!");
Server.engine.newNPC(2026, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.DharokSpawned = 1;
} else if (p.DharokSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Dharok spawned, so there is no need to spawn another.");
}
break;
case 6821://ahrim
if (p.AhrimSpawned == 0) {
p.getActionSender().sendMessage(p, "Ahrim appears out of the coffin!");
Server.engine.newNPC(2025, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.AhrimSpawned = 1;
} else if (p.AhrimSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Ahrim spawned, so there is no need to spawn another.");
}
break;
case 6772://torag
if (p.ToragSpawned == 0) {
p.getActionSender().sendMessage(p, "Torag appears out of the coffin!");
Server.engine.newNPC(2029, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.ToragSpawned = 1;
} else if (p.ToragSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Torag spawned, so there is no need to spawn another.");
}
break;
case 6822://karil
if (p.KarilSpawned == 0) {
p.getActionSender().sendMessage(p, "Karil appears out of the coffin!");
Server.engine.newNPC(2028, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.KarilSpawned = 1;
} else if (p.KarilSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Karil spawned, so there is no need to spawn another.");
}
break;
case 6773://guthan
if (p.GuthanSpawned == 0) {
p.getActionSender().sendMessage(p, "Guthan appears out of the coffin!");
Server.engine.newNPC(2027, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.GuthanSpawned = 1;
} else if (p.GuthanSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Guthan spawned, so there is no need to spawn another.");
}
break;
case 6823://verac
if (p.VeracSpawned == 0) {
p.getActionSender().sendMessage(p, "Verac appears out of the coffin!");
Server.engine.newNPC(2030,p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.VeracSpawned = 1;
} else if (p.VeracSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Verac spawned, so there is no need to spawn another.");
}
break;
case 10284: //chest
if (p.barrowkc == 6) {
p.getActionSender().sendMessage(p, "Here is ur reward");
int reward = p.getBarrowsReward();
Engine.playerItems.addItem(p, reward, 1);
p.message("...and find a " + Engine.items.getItemName(reward) + "!");
Engine.playerItems.addItem(p, 995, 3000000);
p.resetbarrowkc();
p.resetbarrowbrother();
} else if (p.barrowkc > 6) {
p.getActionSender().sendMessage(p, "Kill all the brothers first");
}
break;
//End of barrows
Last step:
Add this to Player.java
getActionSender().addStaticObject(10284, 0, 3566, 3296, 0, 10);//chest barrows
I realesed this before on Runelocus, but then the data crashed
NO FLAMING !
Credits:
Me
Soul Banner (508 base)
Things i still need to add:
-Arrow above barrow brother their head
-Real chest place + tunnels
-Puzzels
-Killcount interface
Step 1:
Add this to Player.java
/**
* To check if the brother is spawned and kc
**/
public int barrowkc;
public int DharokSpawned = 0;
public int VeracSpawned = 0;
public int AhrimSpawned = 0;
public int ToragSpawned = 0;
public int GuthanSpawned = 0;
public int KarilSpawned = 0;
And add this in player.java to:
public void resetbarrowkc() {
barrowkc = 0;
}
public void resetbarrowbrother() {
VeracSpawned = 0;
AhrimSpawned = 0;
DharokSpawned = 0;
ToragSpawned = 0;
KarilSpawned = 0;
GuthanSpawned = 0;
}
And this (in player.java):
public static int barrowsItems[] = {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 getBarrowsReward() {
return barrowsItems[(int) (Math.random() * barrowsItems.length)];
}
Step 2:
Add this to Filemanager.java
stream.writeString("barrowkc: " +p.barrowkc);
Add this to Filemanager.java
Search for
else if (line.startsWith("DC: "))
p.DC = Integer.parseInt(line.substring(4));
Add this under it
else if (line.startsWith("barrowkc: "))
p.barrowkc = Integer.parseInt(line.substring(10));
Step 3:
Add this in Engine.java (it makes when u bury on the hill u go to the coffin)
/**
* barrows hill 1 - Guthan
*/
public static boolean guthanhillArea(int absX, int absY) {
return (absX >= 3574 && absX <= 3581 && absY >= 3279 && absY <= 3285);
}
/**
* barrows hill 2 - Karil
*/
public static boolean karilhillArea(int absX, int absY) {
return (absX >= 3562 && absX <= 3569 && absY >= 3272 && absY <= 3278);
}
/**
* barrows hill 3 - Dharok
*/
public static boolean dharokhillArea(int absX, int absY) {
return (absX >= 3572 && absX <= 3578 && absY >= 3295 && absY <= 3301);
}
/**
* barrows hill 4 - Ahrim
*/
public static boolean ahrimhillArea(int absX, int absY) {
return (absX >= 3563 && absX <= 3569 && absY >= 3285 && absY <= 3292);
}
/**
* barrows hill 5 - Torag
*/
public static boolean toraghillArea(int absX, int absY) {
return (absX >= 3550 && absX <= 3556 && absY >= 3279 && absY <= 3285);
}
/**
* barrows hill 6 - Verac
*/
public static boolean verachillArea(int absX, int absY) {
return (absX >= 3553 && absX <= 3560 && absY >= 3294 && absY <= 3301);
}
Step 4:
Add this in ItemSelect.java (With this Code the stairs wil work to get out)
case 952:
if (Server.engine.dharokhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3556, 9718, 3);
}
else if (Server.engine.ahrimhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3557, 9703, 3);
}
else if (Server.engine.toraghillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3568, 9683, 3);
}
else if (Server.engine.guthanhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3534, 9704, 3);
}
else if (Server.engine.verachillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3578, 9706, 3);
}
if (Server.engine.karilhillArea(p.absX, p.absY)) {
p.requestAnim(830, 0);
p.setCoords(3546, 9684, 3);
} else {
p.requestAnim(830, 0);
p.getActionSender().sendMessage(p, "There is nothing to dig here....");
}
break;
Step 5:
Add this in ObjectOption1.java
//Start of barrows stairs
case 6707://verac
p.setCoords(3557, 3299, 0);
break;
case 6706://torag
p.setCoords(3554, 3283, 0);
break;
case 6705://karil
p.setCoords(3566, 3276, 0);
break;
case 6704://guthan
p.setCoords(3577, 3283, 0);
break;
case 6703://dharok
p.setCoords(3575, 3298, 0);
break;
case 6702://ahrim
p.setCoords(3565, 3289, 0);
break;
//End of barrows stairs
Step 6:
Add this to ObjectOption1.java (it makes when u click on coffins the npc comes out)
//Start of barrows
case 6771://Dharok
if (p.DharokSpawned == 0) {
p.getActionSender().sendMessage(p, "Dharok appears out of the coffin!");
Server.engine.newNPC(2026, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.DharokSpawned = 1;
} else if (p.DharokSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Dharok spawned, so there is no need to spawn another.");
}
break;
case 6821://ahrim
if (p.AhrimSpawned == 0) {
p.getActionSender().sendMessage(p, "Ahrim appears out of the coffin!");
Server.engine.newNPC(2025, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.AhrimSpawned = 1;
} else if (p.AhrimSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Ahrim spawned, so there is no need to spawn another.");
}
break;
case 6772://torag
if (p.ToragSpawned == 0) {
p.getActionSender().sendMessage(p, "Torag appears out of the coffin!");
Server.engine.newNPC(2029, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.ToragSpawned = 1;
} else if (p.ToragSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Torag spawned, so there is no need to spawn another.");
}
break;
case 6822://karil
if (p.KarilSpawned == 0) {
p.getActionSender().sendMessage(p, "Karil appears out of the coffin!");
Server.engine.newNPC(2028, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.KarilSpawned = 1;
} else if (p.KarilSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Karil spawned, so there is no need to spawn another.");
}
break;
case 6773://guthan
if (p.GuthanSpawned == 0) {
p.getActionSender().sendMessage(p, "Guthan appears out of the coffin!");
Server.engine.newNPC(2027, p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.GuthanSpawned = 1;
} else if (p.GuthanSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Guthan spawned, so there is no need to spawn another.");
}
break;
case 6823://verac
if (p.VeracSpawned == 0) {
p.getActionSender().sendMessage(p, "Verac appears out of the coffin!");
Server.engine.newNPC(2030,p.absX+1, p.absY, p.heightLevel, 0, 0, 0, 0, false, p.playerId);
p.barrowkc += 1;
p.VeracSpawned = 1;
} else if (p.VeracSpawned == 1) {
p.getActionSender().sendMessage(p, "You already have Verac spawned, so there is no need to spawn another.");
}
break;
case 10284: //chest
if (p.barrowkc == 6) {
p.getActionSender().sendMessage(p, "Here is ur reward");
int reward = p.getBarrowsReward();
Engine.playerItems.addItem(p, reward, 1);
p.message("...and find a " + Engine.items.getItemName(reward) + "!");
Engine.playerItems.addItem(p, 995, 3000000);
p.resetbarrowkc();
p.resetbarrowbrother();
} else if (p.barrowkc > 6) {
p.getActionSender().sendMessage(p, "Kill all the brothers first");
}
break;
//End of barrows
Last step:
Add this to Player.java
getActionSender().addStaticObject(10284, 0, 3566, 3296, 0, 10);//chest barrows