this is my tut about my own made minigame:gladiator
this is 100% by me
ok lets start:
Step1
open client.java and search for :
Code:
public void NewObjects() {
press enter twice after the {
and add:
Code:
AddObjectobject(2606,3164,5162,0,10);//gladiator chest
Step2
search for:
Code:
else if(useItemID == 536 && atObjectID == 5284) // Bone grinding
and under that:
Code:
{
sendMessage("You grind the "+GetItemName(536)+" and recieve prayer xp.");
addSkillXP((152*playerLevel[5]), 5);
deleteItem(536,getItemSlot(536), 1);
}
now under the last }
add:
Code:
else if(useItemID == 4272 && atObjectID == 5162 ) // gladiator chest
{
sendMessage("you use the key with the chest and open it!");
addItem(6746,1);
deleteItem(4272,getItemSlot(4272), 1);
}
Step3
now save and open item2.java
scroll down till the last two }
delete the last } and under the other } add:
Code:
public static int KEY[] = {3468,1507,5010,5585,4273,1586,2404,2418,2944,2945,3745,3848,4185,4272};
public static int randomKEY()
{
return KEY[(int)(Math.random()*KEY.length)];
}
}
Step4
close item2.java and open npchandler.java
and search for:
u should see:
Code:
ItemHandler.addItem(Item2.randomKBD(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
ItemHandler.addItem(Item2.randomKBD(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
ItemHandler.addItem(Item2.randomKBD(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
ItemHandler.addItem(4206, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
under the last } add:
Code:
if(npcs[NPCID].npcType == 1590) {
ItemHandler.addItem(Item2.randomKEY(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
if(npcs[NPCID].npcType == 1592) {
ItemHandler.addItem(Item2.randomKEY(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
if(npcs[NPCID].npcType == 1355) {
ItemHandler.addItem(Item2.randomKEY(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
if(npcs[NPCID].npcType == 2881) {
ItemHandler.addItem(Item2.randomKEY(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
Step5
open autospawn.cfg and above:
[ENDOFSPAWNLIST]
Code:
add: spawn = 1590 2594 3156 0 0 0 0 0 1 bronze
spawn = 1355 2592 3168 0 0 0 0 0 1 supreme
spawn = 1592 2600 3167 0 0 0 0 0 1 steel
spawn = 2881 2585 3162 0 0 0 0 0 1 mother
Step6
now close and open npc.cfg
search for the monster ids you just added and change ther hp to what you want
Step7
open client.java
and search for:
Code:
else if (command.startsWith("underground") && playerName.equalsIgnoreCase("admin"))
after the } press enter twice and add:
Code:
else if (command.startsWith("gladiator"))
{
teleportToX = 2605;
teleportToY = 3167;
sendMessage("welcome to the arena");
}
Step8
search for:
Code:
else if (command.startsWith("noclip")) {
above it add:
Code:
if(command.startsWith("gladiatorhelp") && (playerRights >= 0)) {
String name = command.substring(5);
sendQuest("@[email protected]", 8144); //Title
clearQuestInterface();
sendQuest("@[email protected])", 8146);
sendQuest("@[email protected])kill the monsters in this area", 8147);
sendQuest("@[email protected])all the monsters drop certain keys", 8148);
sendQuest("@[email protected])collect the keys and try them on the chest", 8149);
sendQuest("@[email protected] this until a key fits you will receive a owning reward ", 8150);
sendQuest("@[email protected] attack monster from other players here!", 8152);
sendQuest("@[email protected]@[email protected] is a pk zone ", 8153);
sendQuest("@[email protected] ", 8154);
sendQuest("@[email protected] can do this minigame as much as you want.", 8155);
sendQuest("@[email protected] luck minigame made by:arvid", 8156);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
now compile and run
the command to get there is ::gladiator
and help for the minigame is ::gladiatorhelp
the reward out the chest is a darklight but you can change it add the use item on object code.
credits 100% me