Hey this is my first attempt at a minigame and my like 3rd tut so please leave feedback if you do use this and if anyones ever posted summink like this before please tell me and i will remove it.
Thanks, anyway lets get cracking on with this.
Purpose: To add a very easy and understandable barrows minigame
Difficulty: i'd say 2/10 if you don't know what your doing if you do 1/10
Assumed Knowledge : How To Edit And Find Certain Things.
Server Base: All i should think
Classes Modified: NPCHandler.java, Autospawn.CFG, Client.java, Shop.CFG, Item2.java
Ok Step 1 : we will start of with the easy part , open up Autospawn.CFG
add these before [ENDOFSPAWNLIST]
Code:
//--Start Of Barrows Minigame//
spawn = 2026 3551 9694 0 3577 3300 3573 3296 2 Dharok
spawn = 2030 3550 9679 0 3550 9679 3550 9679 2 Verac
spawn = 2029 3551 9709 0 3567 3290 3563 3286 2 Torag
spawn = 2025 3537 9710 0 3578 3283 3575 3279 2 Arhim
spawn = 2027 3537 9694 0 3567 3276 3563 3273 2 Ghutan
spawn = 2028 3532 9677 0 3532 9677 3532 9677 2 Karil
spawn = 213 3572 3310 0 3572 3310 3572 3310 2 Merlin
spawn = 600 3570 3312 0 3570 3312 3570 3312 2 Hudo Shop
//--End Of Barrows Minigame//
Ok Step 2 : close that and open up Shop.CFG (if the shop don't work then i aint ganna fix for you),
Before [ENDOFSHOPLIST] add this
Step 3 : close that and open up Client.java
Search for
under it add
Code:
} else if (NPCID == 600) { // Dramen staffs for barrows minigame
PutNPCCoords = true;
WanneShop = 50; //Dramen staffs minigame
Step 4 : Ok still in Client.java search for
Note : if you don't delete this you will ruin the minigame, but if you don't have it in the first place ingore it.
or
now when you found that delete from case 6739 : to case 2559:
this is what you should delete :
Code:
//doors in barrows
case 6739:
if(objectID == 6739)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6720:
if(objectID == 6720)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6743:
if(objectID == 6743)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6738:
if(objectID == 6738)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6719:
if(objectID == 6719)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6721:
if(objectID == 6721)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6740:
if(objectID == 6740)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6744:
if(objectID == 6744)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6725:
if(objectID == 6725)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6727:
if(objectID == 6727)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6746:
if(objectID == 6746)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6724:
if(objectID == 6724)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6737:
if(objectID == 6737)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6718:
if(objectID == 6718)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6745:
if(objectID == 6745)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6726:
if(objectID == 6726)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6748:
if(objectID == 6748)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6729:
if(objectID == 6729)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6749:
if(objectID == 6749)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6730:
if(objectID == 6730)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6747:
if(objectID == 6747)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6728:
if(objectID == 6728)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6741:
if(objectID == 6741)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6722:
if(objectID == 6722)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6735:
if(objectID == 6735)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6716:
if(objectID == 6716)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6723:
if(objectID == 6723)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6742:
if(objectID == 6742)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6750:
if(objectID == 6750)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6731:
if(objectID == 6731)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6717:
if(objectID == 6717)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 6736:
if(objectID == 6736)
{
ReplaceObject(objectX,objectY,6951, -1);
}
break;
case 2559:
ReplaceObject(objectX,objectY,1531, -2);
break;
Step 5 : after that still in client.java search for
delete from case 10284 : to case 10284
this is what you delete:
Code:
case 10284:
if (objectID == 10284) // Barrows Chest
{
sendMessage("You slowly open the Brother's chest...");
sendMessage("...you grab an item and mysteriously get teleported away.");
addItem(Item2.randomBarrows(), 1);
teleportToX = 3210;
teleportToY = 3425;
heightLevel = 0;
startAnimation(862);
barrowsreset();
}
break;
case 10285:
if (objectID == 10284) // Barrows Chest
{
if (killcount >= 19)
sendMessage("You slowly open the Brother's chest...");
sendMessage("...you grab an item and mysteriously get teleported away.");
addItem(Item2.random2Barrows(), 1);
teleportToX = 3210;
teleportToY = 3425;
heightLevel = 0;
startAnimation(862);
barrowsreset();
}
break;
case 10286:
if (objectID == 10284) // Barrows Chest
{
if (killcount <= 20)
sendMessage("You slowly open the Brother's chest...");
sendMessage("...you grab an item and mysteriously get teleported away.");
addItem(Item2.random3Barrows(), 1);
teleportToX = 3210;
teleportToY = 3425;
heightLevel = 0;
startAnimation(862);
barrowsreset();
}
break;
case 10287:
if (objectID == 10284) // Barrows Chest
{
if (killcount <= 51)
sendMessage("You slowly open the Brother's chest...");
sendMessage("...you grab an item and mysteriously get teleported away.");
addItem(Item2.random4Barrows(), 1);
teleportToX = 3210;
teleportToY = 3425;
heightLevel = 0;
startAnimation(862);
barrowsreset();
}
break;
ok if you don't have any of that ignore that part.
Step 6 : search for
Code:
sendMessage("You need to be lvl 100 fishing to catch manta rays.");
Should look like this :
Code:
else if (manta == 12716) //Well X=2651,3370 //item harpoon slot 1
{
if (playerLevel[10] <= 100)
{
sendMessage("You need to be lvl 100 fishing to catch manta rays.");
}
else
{
manta();
}
}
after the last } add this
Code:
//Start of barrows Minigame//
else if (useItemID == 772 && atObjectID == 5245) {
deleteItem(772, getItemSlot(772), 1);
teleportToX = 3552;
teleportToY = 9675;
sendMessage("Welcome to barrows");
sendMessage("Kill the opponment and then use the key it drops on the WESTERN door");
}
else if(useItemID == 85 && atObjectID == 6729) {
deleteItem(85, getItemSlot(85), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3535;
teleportToY = 9677;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the NORTHERN door");
}
else if(useItemID == 85 && atObjectID == 6748) {
deleteItem(85, getItemSlot(85), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3535;
teleportToY = 9677;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the NORTHERN door");
}
else if(useItemID == 275 && atObjectID == 6726) {
deleteItem(275, getItemSlot(275), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3533;
teleportToY = 9694;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the NORTHERN door");
}
else if(useItemID == 275 && atObjectID == 6745) {
deleteItem(275, getItemSlot(275), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3533;
teleportToY = 9694;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the NORTHERN door");
}
else if(useItemID == 293 && atObjectID == 6718) {
deleteItem(293, getItemSlot(293), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3534;
teleportToY = 9709;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the EASTERN door");
}
else if(useItemID == 293 && atObjectID == 6737) {
deleteItem(293, getItemSlot(293), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3534;
teleportToY = 9709;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the EASTERN door");
}
else if(useItemID == 298 && atObjectID == 6719) {
deleteItem(298, getItemSlot(298), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3549;
teleportToY = 9712;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the SOUTHERN door");
}
else if(useItemID == 298 && atObjectID == 6748) {
deleteItem(298, getItemSlot(298), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3549;
teleportToY = 9712;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the SOUTHERN door");
}
else if(useItemID == 423 && atObjectID == 6720) {
deleteItem(423, getItemSlot(423), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3551;
teleportToY = 9693;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the CHEST for your reward");
}
else if(useItemID == 423 && atObjectID == 6739) {
deleteItem(423, getItemSlot(423), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 3551;
teleportToY = 9693;
sendMessage("Kill The Next NPC For Your Next Part Of Minigame");
sendMessage("Kill the opponment and then use the key it drops on the CHEST for your reward");
}
else if(useItemID == 432 && atObjectID == 10284) {
deleteItem(432, getItemSlot(432), 1);
sendMessage("DO NOT RANGE OR MASS THE OPPOMENTS");
teleportToX = 2794;
teleportToY = 3181;
addItem(Item2.randomBarrows(), 1);
sendMessage("Your Suddenly Teleported Outa There As It Collapses.");
}
//End of Barrows Minigame//
Note : At the end of that part you need to put ya own co ords to where you want to go after you use key on chest.
Step 7 : now thats end of client.java stuff, close it and open up NPChandler.java and search for
after the last } add this
Code:
if (npcs[i].npcType == 213)
{
if (misc.random2(30) <= 3)
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "You Need A Dramen Staff To Get Barrows Minigame !";
}
}
if (npcs[i].npcType == 600)
{
if (misc.random2(30) <= 3)
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Buy Ya Dramen Staffs Here !";
}
}
now search for "KBD"
after the last } add this
Code:
//start of barrows minigame drops//
if(npcs[NPCID].npcType == 2030) //Verac
{
ItemHandler.addItem(85, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
if(npcs[NPCID].npcType == 2028) //Karil
{
ItemHandler.addItem(275, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
if(npcs[NPCID].npcType == 2027) //Gunthan
{
ItemHandler.addItem(293, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
if(npcs[NPCID].npcType == 2025) //Arhim
{
ItemHandler.addItem(298, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
if(npcs[NPCID].npcType == 2029) //Torag
{
ItemHandler.addItem(423, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
if(npcs[NPCID].npcType == 2026) //Dharok
{
ItemHandler.addItem(432, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
}
//end of barrows minigame drops//
Step 8: Open up item2.java and find
Code:
public static int barrows[]
once you found that (should be at the top almost) replace it with mine
Code:
public static int barrows[] = {4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4730,4732,4734,3736,4738};
public static int randomBarrows()
{
return barrows[(int)(Math.random()*barrows.length)];
}
[b]now thats it the end of that, save and close it 
and compile 
Post any errors i'll see where you gone wrong but i aint promissng i am ganan fix where you've gone wrong though.
Credits : 65% me, 25% mwill14 for finding the barrows cave coords for me
and 10% for CrazyCam10 for helping my with random borrows item with chest.
like i said earlier post if this has been posted before and i will remove.
Edit :
Summary : what you do in this minigame is you first get a damen staff use it on the door that is at barrows (the little hut outside of the hups where you dig) once do that you get teleported to the first npc then you kill the barrow npcs and then they drop keys, use thes keys on the doors that are said on the public chat. at the end you get a the key for chest off dharok, use the key on the chest and you get teleported out of the minigame wherever you put the co ords on the chest thats where yu get teleported to and also you'll get a random barrows reward ( you can change that, i tried putting it to random brrows bu i dint wanna do that for me).
Trust me if anysays "leeched" or out like that i will report you because i ant leehed this, i spent about a hour, mabe more doing this.
i know this is simple but this my first minigame and 3rd tut on anything so please leave feedback.