Purpose:to make 'god wars minigame',and have more fun in your server.
Difficulty:3
Assumed Knowledge:
Classes Modifiedwn client[if you do optional part],own server of course,npc handler,client.java[server side],class5[on client side if you do the optional part],autospawn.
we are done with autospawn save it and close it.
(you can chance the npc id what you ever want,those are for your own client.)
now open NPChandler and search for:
Code:
public void MonsterDropItem(int NPCID)
and under the first "}" add
Code:
if(npcs[NPCID].npcType == 1211)
{
int Player = npcs[NPCID].StartKilling;
client ppl = (client) server.playerHandler.players[Player];
ppl.sendMessage("omg now for the big one!*shakes*");
ppl.teleportToX = 2881;
ppl.teleportToY = 3758;
}
now save NPChandler and close it.we will come back here later.
now open client.java [on server side] and search for
Code:
home
and under the last "}" add
Code:
else if (command.equalsIgnoreCase("godwars"))
{
if(teleblock == true){
sendMessage("A magical force stops you from teleporting."); //
}
else
{
teleportToX = 2840;
teleportToY = 3738;
sendMessage("welcome to god wars! type ::godinfo for more information");
}
}
now search for
Code:
public void newWelc()
and under the last "}" add:
Code:
public void gwHelpMenu()
{
sendQuest("@[email protected] info of god wars", 8144); //Title
clearQuestInterface();
sendQuest("@[email protected] to the god wars", 8146);
sendQuest("@[email protected] you enjoy!", 8147);
sendQuest("", 8148);
sendQuest("kill the saradomin boss to get to bandos boss", 8149);
sendQuest("drops:god swords and bandos armour's", 8150);
sendQuest("you SHOULD use team to defeate it.", 8151);
sendQuest("", 8161);
sendQuest("", 8162);
sendQuest("", 8163);
sendQuest("", 8164);
sendQuest("", 8165);
sendQuest("", 8166);
sendQuest("", 8167);
sendQuest("", 8168);
sendQuest("", 8169);
sendQuest("hope you get big 'fish'.", 8170);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
now search for
Code:
mainmenu
and under the last "}" add:
Code:
else if (command.equalsIgnoreCase("godinfo"))
{
gwHelpMenu();
}
now save and close client.java.
now open NPC and add there
Code:
npc = 3000 General_Graardor 182 9000
now lets make so you get bandos stuff when you kill the boss,open item2.java and search for:
Code:
public static int KalphiteQueen[]
under the last "}" add:
Code:
public static int GeneralGraardor[] = {15348,15349,15350,15334,365,5698,6914,6889,365,365,365,392,392,3140,2900};
public static int randomGeneralGraardor()
{
return GeneralGraardor[(int)(Math.random()*GeneralGraardor.length)];
}
you can chanche the items what you ever want,i added those on my own server.you get only bandos stuff with those id's [you should get]
model's download:[Only registered and activated users can see links. ]
[thanks o b b y for them]
add them on your "models" folder and go in client and type there "add model" example "add model 10489"[it was just example].....then close ur client.
you must have done the model adding tut [Only registered and activated users can see links. ]
okey,now on next and finaly step. open class5 and add in there:
Code:
if(i == 3000) { // NPC ID, can be changed.
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[630]; // Original NPC data, used to collect default emotes and extra NPC info. Don't change this unless you know what you are doing.
class5.method165(true, aClass30_Sub2_Sub2_60); // Collect original NPC data, do not change.
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[2]; // Number of models the NPC uses
int changedColors = 1; // Number of model colors changed on the NPC
class5.anIntArray76 = new int[changedColors];
class5.anIntArray70 = new int[changedColors];
class5.anIntArray76[0] = 61; // Original model color
class5.anIntArray70[0] = 926; // Changed model color
class5.anIntArray94[0] = 5000; // Cape model ID
class5.anIntArray94[1] = 5001; // Body peice 1 model ID
class5.aString65 = "General Graardor"; // NPC name
class5.anInt61 = 624; // NPC combat level
class5.aByteArray89 = "An huge war chief.".getBytes(); // NPC description, you must leave the .getBytes() at the end or it will not work.
and
Code:
if(i == 1211) { // NPC ID
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[630];
class5.method165(true, aClass30_Sub2_Sub2_60); // Collect original NPC data
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[3]; // Number of models the NPC uses
int changedColors = 1; // Number of model colors changed on the NPC
class5.anIntArray76 = new int[changedColors];
class5.anIntArray70 = new int[changedColors];
class5.anIntArray76[0] = 61; // Original model color
class5.anIntArray70[0] = 926; // Changed model color
class5.anIntArray94[0] = 10492; // 28078
class5.anIntArray94[1] = 10493; // 28071
class5.anIntArray94[2] = 10494; // 28057
class5.aString65 = "Commander Zilyana"; // NPC name
class5.anInt61 = 648; //combat level
class5.aByteArray89 = "The mighty lord Saradomins commander Zilyana !".getBytes(); // NPC description
}
if you get errors,post it here,i try to help you.if i missed something please post it here x)
this aint big,if you feel,you can add more monsters:O anyway pics [didnt taked much]:
this was my 2nd tut so please dont leech this
thanks. (c).