Purpose: To make a fun barrows minigame!!
Difficulty: 4, its all c+p but you gotta foolow the tut 
***umed Knowledge: How to c+p and how to read, a keyboard, and a mouse.
Server Base: fr33sc4p3 (Will work on all non-dodian)
Cl***es Modified: client.java, item3.java, npchandler.java, autospawn.cfg
Procedure
ALRIGHTYYYYY
Step 1:
First, were going to add this to our autospawn.cfg
Code:
spawn = 2025 3014 3192 0 3014 3192 3014 3192 2 ahrims
spawn = 2026 3014 3189 0 3014 3189 3014 3189 2 dhorak
spawn = 2027 3018 3189 0 3018 3189 3018 3189 2 guthan
spawn = 2028 3014 3180 0 3014 3180 3014 3180 2 karil
spawn = 2029 3018 3180 0 3018 3180 3018 3180 2 torag
spawn = 2030 3014 3195 0 3014 3195 3014 3195 2 Verac
Those will be the barrows brothers (duh) 
Step 2:
Search for:
Code:
if(npcs[NPCID].npcType == 1615) {
ItemHandler.addItem(Item2.randomAbyssal(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
or something like that. Beneath the last set of npc drops add this:
Code:
//BARROWS GAME BY JIB// Credits to ownageisle for the base of this!!!
if(npcs[NPCID].npcType == 2025) //Ahrim the Blighted
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(601, 1);
}
if(npcs[NPCID].npcType == 2026) //Dharok the Wretched
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(605, 1);
}
if(npcs[NPCID].npcType == 2027) //Guthan the Infested
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(709, 1);
}
if(npcs[NPCID].npcType == 2028) //Karil the Tainted
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(758, 1);
}
if(npcs[NPCID].npcType == 2029) //Torag the Corrupted
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(759, 1);
}
if(npcs[NPCID].npcType == 2030) //Verac the Defiled
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("You killed the brother, go get your prize.");
ppl.teleportToX = 3551;
ppl.teleportToY = 9693;
ppl.addItem(760, 1);
}
}
Save, close, compile, make sure everything is alright up to this point.
Ok, now go into client.java.
Search for
Above that big set of cases add this:
Code:
case 10284: //barrows chest
{
if(playerHasItem(601) == true)
{
addItem(Item3.randomah(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(601, GetItemSlot(601), 1);
}
else if(playerHasItem(605) == true)
{
addItem(Item3.randomdh(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(605, GetItemSlot(605), 1);
}
else if(playerHasItem(709) == true)
{
addItem(Item3.randomgu(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(709, GetItemSlot(709), 1);
}
else if(playerHasItem(758) == true)
{
addItem(Item3.randomkar(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(758, GetItemSlot(758), 1);
}
else if(playerHasItem(759) == true)
{
addItem(Item3.randomto(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(759, GetItemSlot(759), 1);
}
else if(playerHasItem(760) == true)
{
addItem(Item3.randomva(), 1);
addItem(995, 250000);
sendMessage("Hope you got what you wanted!!");
teleportToX = 3097;
teleportToY = 3273;
deleteItem(760, GetItemSlot(760), 1);
}
}
break;
Minimize and go into Item3.java
*tip* if you dont have item3.java make a new word doc. called Item 3 and add this:
Code:
public cl*** Item3 {
at the top line. Then when your done adding this next step add a }
Ok, now for the item3. In your item 3 add this above the last }
Code:
public static int ah[] = {4708, 4710, 4712, 4714, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomah()
{
return ah[(int)(Math.random()*ah.length)];
}
public static int dh[] = {4716, 4718, 4720, 4722, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomdh()
{
return dh[(int)(Math.random()*dh.length)];
}
public static int gu[] = {4724, 4726, 4728, 4730, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomgu()
{
return gu[(int)(Math.random()*gu.length)];
}
public static int kar[] = {4732, 4734, 4736, 4738, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomkar()
{
return kar[(int)(Math.random()*kar.length)];
}
public static int to[] = {4745, 4747, 4749, 4751, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomto()
{
return to[(int)(Math.random()*to.length)];
}
public static int va[] = {4753, 4755, 4757, 4759, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323};
public static int randomva()
{
return va[(int)(Math.random()*va.length)];
}
These are going to be our drops.
Go back into client.java and add this below the chest.
Code:
case 881: // i used a manhole :p
if (misc.random(6) == 1)
{
teleportToX = 3014;
teleportToY = 3194;
sendMessage("You telle to "+GetNpcName(2030)+". Good luck!!");
}
else if (misc.random(6) == 2)
{
teleportToX = 3014;
teleportToY = 3191;
sendMessage("You telle to "+GetNpcName(2025)+". Good luck!!");
}
else if (misc.random(6) == 3)
{
teleportToX = 3014;
teleportToY = 3188;
sendMessage("You telle to "+GetNpcName(2026)+". Good luck!!");
}
else if (misc.random(6) == 4)
{
teleportToX = 3018;
teleportToY = 3188;
sendMessage("You telle to "+GetNpcName(2027)+". Good luck!!");
}
else if (misc.random(6) == 5)
{
teleportToX = 3019;
teleportToY = 3180;
sendMessage("You telle to "+GetNpcName(2028)+". Good luck!!");
}
else if (misc.random(6) == 6)
{
teleportToX = 3014;
teleportToY = 3181;
sendMessage("You telle to "+GetNpcName(2029)+". Good luck!!");
}
break;
Then find:
Code:
makeGlobalObject(3102, 3270, 823, 0, 10);//dummie
Or something like that.
Under the last one add:
Code:
makeGlobalObject(3090, 3270, 881, 0, 10);//mahole
Then find:
And add these cord:
Code:
(absX >= 3021 && absX <= 3009 && absY >= 3178 && absY <=3197 ) || (absX >= 3547 && absX <= 3556 && absY >= 9690 && absY <=9699 ))
Also, if you want to make it so the npcs dont have the _ when you telle:
Go into npc.cfg
search for:
And replace the _ with spaces on the npcs 
You can change the first 2 coords to what ever you want, ofcourse being X then Y 
And thats it! save it all and compile!!
PICKES:




Credits: Me (jiber) MrGibblets for the help with random telle (H) and ownageisle for my base of the adding items and telling after killing a monster
if you use this please post a comment. I made this a while ago so the code is a lil sloppy
Please also ++ if you use...this was a lot of work...