Description: Adding full warriors guild
Credits: Me
Base: Devolution/Any base
Updates: Cleaned up codes.
Step 1:
Go into player.java and declare these:
Code:
public int defenderStage = 0,
tokens = 100,
noTokens = 60;
Then go to process in client.java and add these timers:
Code:
if(tokens > 0) tokens--;
if(noTokens > 0) noTokens--;
if(tokens == 0) tokens = 100;
if(noTokens == 0) noTokens = 60;
Step 2:
Open up your client.java and add this:
Code:
public void teleportTo(int X, int Y) {
teleportToX = X;
teleportToY = Y;
}
And this:
Code:
public boolean cycRoom() {
return absX >= 2893 && absX <= 2904 && absY >= 3558 && absY <= 3569 && heightLevel == 1;
}
This boolean will be used later on in this tut. What it does is if you use my area, will make a boolean for the cyclopes room
Next go to process() and add:
Code:
if(cycRoom()) {
if(tokens == 1){
deleteItem(553, 10);
sendMessage("10 of your tokens crumble away crumble away.");
}
if(tokens == 1 && !playerHasItem(553, 10)) {
npc(588, "Your time is up "+ playerName +", please head", "", "for the stairs.", "", 198);
}
if(noTokens == 1 && !playerHasItem(553, 10)){
teleportTo(2899, 3564);
npc(588, "I am sorry, you seem not to have anymore tokens,", "please use the animator on the lower level", "to obtain Warrior Tokens. Once you have", "enough, please return.", 198);
}
}
The next step will have to do with objects and using items with objects..
Step 3:
Search for objectIDz in client.java and add this:
Code:
switch(objectIDz) {
case 1516:
case 1519:
if(objectXz >= 2898 && objectXz <= 2899 && objectYz == 3558) {
if(getLevelForXP(playerXP[2]) + getLevelForXP(playerXP[0]) <= 130) {
sendMessage("You need a combined level of attack and strength levels of 130 to enter in here.");
}
ReplaceObject(2899, 3558, 1519, -2, 0);
ReplaceObject(2898, 3558, 1516, 0, 0);
}
break;
case 4643:
setAnimation(828);
teleportTo(2899, 3565);
break;
case 4624:
teleportTo(2216, 4937);
break;
case 4626
if(!playerHasItem(553, 100)) {
npc(588, "I am sorry, but you need atleast", "100 or more tokens to enter the cyclopes", "room. Try using the armour animator", "downstairs to receive some.", 198);
}
teleportTo(2897, 3569);
heightLevel = 1;
break;
case 4625:
teleportTo(2897, 3565);
heightLevel = 0;
break;
}
This will add the doors and stairs.
Now search for UsedOnObject and add:
Code:
if (UsedOnObjectID == 9094) {//animator start
TurnPlayerTo(UsedOnX, UsedOnY);
if (GoodDistance(UsedOnX, UsedOnY, absX, absY, 1) == true) {
if (ItemID == 1117 || ItemID == 1075 || ItemID == 1155 && playerHasItem(1117) && playerHasItem(1075) && playerHasItem(1155)) {
deleteItem(1155, 1);
deleteItem(1075, 1);
deleteItem(1117, 1);
server.npcHandler.makeNPC(430, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1153 || ItemID == 1067 || ItemID == 1115 && playerHasItem(1153) && playerHasItem(1067) && playerHasItem(1115)) {
deleteItem(1153, 1);
deleteItem(1067, 1);
deleteItem(1115, 1);
server.npcHandler.makeNPC(431, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1157 || ItemID == 1119 || ItemID == 1125 && playerHasItem(1157) && playerHasItem(1119) && playerHasItem(1069)) {
deleteItem(1157, 1);
deleteItem(1119, 1);
deleteItem(1069, 1);
server.npcHandler.makeNPC(432, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1165 || ItemID == 1077 || ItemID == 1125 && playerHasItem(1165) && playerHasItem(1077) && playerHasItem(1125)) {
deleteItem(1165, 1);
deleteItem(1077, 1);
deleteItem(1125, 1);
server.npcHandler.makeNPC(433, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1121 || ItemID == 1071 || ItemID == 1165 && playerHasItem(1121) && playerHasItem(1071) && playerHasItem(1159)) {
deleteItem(1121, 1);
deleteItem(1071, 1);
deleteItem(1159, 1);
server.npcHandler.makeNPC(434, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1073 || ItemID == 1123 || ItemID == 1161 && playerHasItem(1161) && playerHasItem(1073) && playerHasItem(1123)) {
deleteItem(1073, 1);
deleteItem(1123, 1);
deleteItem(1161, 1);
server.npcHandler.makeNPC(435, UsedOnX, UsedOnY, 0);
}
if (ItemID == 1163 || ItemID == 1079 || ItemID == 1127 && playerHasItem(1163) && playerHasItem(1079) && playerHasItem(1127)) {
deleteItem(1163, 1);
deleteItem(1079, 1);
deleteItem(1127, 1);
server.npcHandler.makeNPC(436, UsedOnX, UsedOnY, 0);
}
sendMessage("You place the armour on the animator...");
setAnimation(827);
sendMessage("...summoning a armoured figure.");
}
}
This will create a npc as you use armour on the animator.
Step 4:
Next we are going to add dialogues.
Search for: if ((NPCSlot < 0) || (NPCSlot >= server.npcHandler.npcs.length) || (server.npcHandler.npcs[NPCSlot] == null))
After this line, add this:
Code:
if(NPCID >= 0 && NPCID <= 3500) {
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
}
In that add:
Code:
switch(NPCID) {
case 198:
NpcWanneTalk = 59;
break;
case 250:
if(AreXItemsInBag(7597, 1) && defenderStage == 0) {
NpcWanneTalk = 60;
}
if(AreXItemsInBag(7598, 1) && defenderStage == 1) {
NpcWanneTalk = 60;
}
if(AreXItemsInBag(7599, 1) && defenderStage == 2) {
NpcWanneTalk = 60;
}
if(AreXItemsInBag(7600, 1) && defenderStage == 3) {
NpcWanneTalk = 60;
}
if(AreXItemsInBag(7601, 1) && defenderStage == 4) {
NpcWanneTalk = 60;
}
if(AreXItemsInBag(7602, 1) && defenderStage == 5) {
NpcWanneTalk = 60;
}
break;
}
And for those who have not added dialogues to there server, add this in packet 40:
Code:
case 40:
if (NpcDialogue == 60) {
NpcDialogue += 1;
NpcDialogueSend = false;
} else {
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
}
println_debug("Unhandled Packet.");
break;
Next search for UpdateNPCChat() and under the switch, add:
Code:
case 59:
npc(588, "Greetings! And welcome to the Warrior's", "Guild, to start off, head downstairs and", "use the animator. It will require sets", "of armour to work.", 198);
break;
case 60:
player("I have the next defender! Can you please release", "the next batch of cyclopes?");
break;
case 61:
npc(590, "Hmm, alright, the next batch of cyclopes", "", "have been released. Good luck!", " ", 250);
defenderStage += 1;
break;
Step 5:
We are almost done with adding this tut. Next search for: (token.equals("character-firstTimePlaying")) and under it add:
Code:
else if (token.equals("character-defenderStage")) {
defenderStage = Integer.parseInt(token2);
}
After that search for: characterfile.write("character-firstTimePlaying = ", 0, 29); and add:
Code:
characterfile.newLine();
characterfile.write("character-defenderStage = ", 0, 26);
characterfile.write(Integer.toString(defenderStage), 0, Integer.toString(defenderStage).length());
Step 6:
Search for: case 121. This packet is your loading region packet. What we will do in here is add the animator so people can use.
(Note: Animator models will be at the end of this tut. Warrior tokens, defenders and armour NPCs are included.)
Add:
Code:
ReplaceServerObject(2220, 4939, 9094, 0, 10);
ReplaceServerObject(2220, 4940, 9096, -3, 10);
ReplaceServerObject(2221, 4939, 9096, -2, 10);
ReplaceServerObject(2220, 4938, 9096, -1, 10);
ReplaceServerObject(2219, 4939, 9096, 0, 10);
ReplaceServerObject(2221, 4940, 9095, -3, 10);
ReplaceServerObject(2221, 4938, 9095, -2, 10);
ReplaceServerObject(2219, 4938, 9095, -1, 10);
ReplaceServerObject(2219, 4940, 9095, 0, 10);
Now close client.java and lets start working on npcs.
Step 7:
Open npcHandler.java and add these voids:
Code:
public void makeNPC(int npcID, int absX, int absY, int height)
{
server.npcHandler.newNPC1(npcID, (absX), (absY), height, absX + 3, absY + 3, absX - 3, absY - 3, 0, server.npcHandler.GetNpcListHP(npcID), false);
}
public void newNPC1(int npcType, int x, int y, int heightLevel, int rangex1, int rangey1, int rangex2, int rangey2, int WalkingType, int HP, boolean Respawns) {
// first, search for a free slot
int slot = -1;
for (int i = 1; i < maxNPCs; i++) {
if (npcs[i] == null) {
slot = i;
break;
}
}
if(slot == -1) return; // no free slot found
if(HP <= 0) { // This will cause client crashes if we don't use this :) - xero
HP = 0;
}
NPC newNPC = new NPC(slot, npcType);
newNPC.absX = x;
newNPC.absY = y;
newNPC.makeX = x;
newNPC.makeY = y;
newNPC.moverangeX1 = rangex1;
newNPC.moverangeY1 = rangey1;
newNPC.moverangeX2 = rangex2;
newNPC.moverangeY2 = rangey2;
newNPC.walkingType = WalkingType;
newNPC.HP = HP;
newNPC.MaxHP = HP;
//newNPC.MaxHit = (int)Math.floor((HP / 10));
newNPC.MaxHit = (int)(combatLevel[npcType] / 3);
/*if(WalkingType == 1)
newNPC.RandomWalk = true;*/
if (newNPC.MaxHit < 1) {
newNPC.MaxHit = 1;
}
newNPC.heightLevel = heightLevel;
newNPC.Respawns = Respawns;
npcs[slot] = newNPC;
}
This is what summons the animated armour when you use armour on the animator.
Now add this under if ((temp != null) && !temp.disconnected) {:
Code:
if(npcs[i].npcType == 116) {
if(temp.defenderStage == 0) {
ItemHandler.addItem(Item.Cyclopes(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 1) {
ItemHandler.addItem(Item.Cyclopes2(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 2) {
ItemHandler.addItem(Item.Cyclopes3(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 3) {
ItemHandler.addItem(Item.Cyclopes4(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 4) {
ItemHandler.addItem(Item.Cyclopes5(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 5) {
ItemHandler.addItem(Item.Cyclopes6(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
if(temp.defenderStage == 6) {
ItemHandler.addItem(Item.Cyclopes7(),
npcs[i].absX, npcs[i].absY, 1,
GetNpcKiller(i), false);
}
ItemHandler.addItem(532, npcs[i].absX,
npcs[i].absY, 1, GetNpcKiller(i),
false);
}
This creates the drops of the cyclops. Reason I didnt do it in npcdrops is because you wouldnt want all defenders dropping at once.
Save and close npcHandler.java, open configs and open npcdrops.cfg.
Once in, add these drops.
Code:
//Bronze
npcdrop = 430 1117 1 100
npcdrop = 430 1155 1 100
npcdrop = 430 1075 1 100
npcdrop = 430 553 5 100
//Iron
npcdrop = 431 1115 1 100
npcdrop = 431 1153 1 100
npcdrop = 431 1067 1 100
npcdrop = 431 553 10 100
//Steel
npcdrop = 432 1157 1 100
npcdrop = 432 1119 1 100
npcdrop = 432 1069 1 100
npcdrop = 432 553 15 100
//Black
npcdrop = 433 1125 1 100
npcdrop = 433 1165 1 100
npcdrop = 433 1073 1 100
npcdrop = 433 553 20 100
//Mith
npcdrop = 434 1159 1 100
npcdrop = 434 1121 1 100
npcdrop = 434 1071 1 100
npcdrop = 434 553 30 100
//Addy
npcdrop = 435 1161 1 100
npcdrop = 435 1123 1 100
npcdrop = 435 1073 1 100
npcdrop = 435 553 35 100
//Rune
npcdrop = 436 1163 1 100
npcdrop = 436 1127 1 100
npcdrop = 436 1079 1 100
npcdrop = 436 553 40 100
This makes sure every time you kill your armour, it will drop its armour and give tokens.
Now open autospawn.cfg and add:
Code:
spawn = 198 2898 3561 0 2899 3562 2897 3560 1
spawn = 250 2901 3563 0 2902 3564 2900 3562 1
spawn = 116 2896 3564 1 2897 3565 2895 3563 1
spawn = 116 2898 3561 1 2900 3563 2896 3559 1
spawn = 116 2901 3564 1 2902 3565 2900 3563 1
spawn = 116 2903 3562 1 2904 3563 2902 3561 1
spawn = 116 2894 3562 1 2895 3563 2893 3561 1
spawn = 116 2899 3567 1 2900 3568 2898 3566 1
spawn = 116 2897 3562 1 2898 3563 2896 3561 1
spawn = 116 2899 3560 1 2900 3561 2898 3559 1
spawn = 116 2897 3559 1 2898 3560 2896 3558 1
This as all of you know spawns the npcs.
Now open npc.cfg
Replace 430-436 with these:
Code:
npc = 430 Animated_Bronze_Armour 11 16 6000
npc = 431 Animated_Iron_Armour 23 28 6000
npc = 432 Animated_Steel_Armour 46 36 6000
npc = 433 Animated_Black_Armour 69 57 6000
npc = 434 Animated_Mithril_Armour 92 90 6000
npc = 435 Animated_Adamant_Armour 113 130 6000
npc = 436 Animated_Rune_Armour 138 160 6000
What this does is use the 6000 (timer of respawn). Why did I put that there? Because in devolution, (some of you may not of edited) once the npc is spawned, it will come back straight away. So this will give it 1 hour 40 minutes time. I'm sure most restart there servers at that time. Anyways next step!
Step 8:
Open Item.java and add:
Code:
public static int Cyclops[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309,1430, 1313, 1317, 1309, 7597 };
public static int Cyclopes() {
return Cyclops[(int)(Math.random()*Cyclops.length)];
}
public static int Cyclops2[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7598 };
public static int Cyclopes2() {
return Cyclops2[(int)(Math.random()*Cyclops2.length)];
}
public static int Cyclops3[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7599 };
public static int Cyclopes3() {
return Cyclops3[(int)(Math.random()*Cyclops3.length)];
}
public static int Cyclops4[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7600 };
public static int Cyclopes4() {
return Cyclops4[(int)(Math.random()*Cyclops4.length)];
}
public static int Cyclops5[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7601 };
public static int Cyclopes5() {
return Cyclops5[(int)(Math.random()*Cyclops5.length)];
}
public static int Cyclops6[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7602 };
public static int Cyclopes6() {
return Cyclops6[(int)(Math.random()*Cyclops6.length)];
}
public static int Cyclops7[] = { 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 1430, 1313, 1317, 1309, 7603 };
public static int Cyclopes7() {
return Cyclops7[(int)(Math.random()*Cyclops7.length)];
}
These are the items of the cyclopes. You can also make these final ints and remove the second static int for each int. Although you will need to initialise them.
Next find: int[] runeId and add in the {}:
553
This will make the Warrior Guild tokens stackable.
Step 9:
This is the last server sided edit. Then we will go on to client side.
Open up item.cfg and replace items with these:
Code:
item = 553 Warrior’s_Tokens A_token_of_the_warrior’s_guild. 500 500 500 0 0 0 0 0 0 0 0 0 0 0 0
item = 7597 Bronze_Defender It_seems_bleached_with_age. 1 0 0 3 2 1 -3 -2 3 2 1 -3 -2 0 0
item = 7598 Iron_Defender It_seems_bleached_with_age. 1 0 0 5 4 3 -3 -2 5 4 3 -3 -2 0 0
item = 7599 Steel_Defender It_seems_bleached_with_age. 1 0 0 7 6 5 -3 -2 7 6 5 -3 -2 1 0
item = 7600 Black_Defender It_seems_bleached_with_age. 1 0 0 9 8 7 -3 -1 9 8 7 -3 -2 2 0
item = 7601 Mithril_Defender It_seems_bleached_with_age. 100 100 100 11 10 9 -3 -2 11 10 9 -3 -2 3 0
item = 7602 Adamant_Defender It_seems_bleached_with_age. 800 800 800 13 12 11 -3 -2 13 12 11 -3 -2 4 0
item = 7603 Rune_Defender It_seems_bleached_with_age. 3000 3000 3000 15 14 13 -3 -2 15 14 13 -3 -2 5 0
Close and save item.cfg.
Step 10:
This side is client sided. If you know how to add models, do it then. Although these are correct ints and stuff so. Also this is for pre-loaders only.
Go into class8.java and add these ints:
Code:
if(i == 553)
{
class8.aString170 = "Warrior Tokens";
class8.anInt174 = 15343;
class8.anIntArray201 = new int[10];
class8.anIntArray193 = new int[10];
class8.anIntArray201[0] = 2;
class8.anIntArray193[0] = 280;
class8.anIntArray201[1] = 3;
class8.anIntArray193[1] = 281;
class8.anIntArray201[2] = 4;
class8.anIntArray193[2] = 282;
class8.anIntArray201[3] = 5;
class8.anIntArray193[3] = 283;
class8.anInt165 = -1;
class8.anInt188 = -1;
class8.anInt202 = 0;
class8.aBoolean176 = true;
class8.anInt198 = 180;
class8.anInt181 = 724;
class8.anInt155 = 1;
class8.anInt200 = -1;
class8.anInt164 = -1;
class8.anInt169 = 9;
class8.anInt204 = 0;
class8.anInt194 = -100;
class8.anInt179 = -1;
class8.anInt190 = 238;
class8.aByteArray178 = "It's a Warrior guild token.".getBytes();
}
if(i == 280)
{
class8.aString170 = "Warrior Tokens";
class8.anInt174 = 15344;
class8.anInt165 = -1;
class8.anInt188 = -1;
class8.anInt202 = 0;
class8.aBoolean176 = true;
class8.anInt198 = 180;
class8.anInt181 = 724;
class8.anInt155 = 1;
class8.anInt200 = -1;
class8.anInt164 = -1;
class8.anInt169 = 9;
class8.anInt204 = 0;
class8.anInt194 = -100;
class8.anInt179 = -1;
class8.anInt190 = 238;
class8.aByteArray178 = "It's a Warrior guild token.".getBytes();
}
if(i == 281)
{
class8.aString170 = "Warrior Tokens";
class8.anInt174 = 15345;
class8.anInt165 = -1;
class8.anInt188 = -1;
class8.anInt202 = 0;
class8.aBoolean176 = true;
class8.anInt198 = 180;
class8.anInt181 = 724;
class8.anInt155 = 1;
class8.anInt200 = -1;
class8.anInt164 = -1;
class8.anInt169 = 9;
class8.anInt204 = 0;
class8.anInt194 = -100;
class8.anInt179 = -1;
class8.anInt190 = 238;
class8.aByteArray178 = "It's a Warrior guild token.".getBytes();
}
if(i == 282)
{
class8.aString170 = "Warrior Tokens";
class8.anInt174 = 15346;
class8.anInt165 = -1;
class8.anInt188 = -1;
class8.anInt202 = 0;
class8.aBoolean176 = true;
class8.anInt198 = 180;
class8.anInt181 = 724;
class8.anInt155 = 1;
class8.anInt200 = -1;
class8.anInt164 = -1;
class8.anInt169 = 9;
class8.anInt204 = 0;
class8.anInt194 = -100;
class8.anInt179 = -1;
class8.anInt190 = 238;
class8.aByteArray178 = "It's a Warrior guild token.".getBytes();
}
if(i == 283)
{
class8.aString170 = "Warrior Tokens";
class8.anInt174 = 15347;
class8.anInt165 = -1;
class8.anInt188 = -1;
class8.anInt202 = 0;
class8.aBoolean176 = true;
class8.anInt198 = 180;
class8.anInt181 = 724;
class8.anInt155 = 1;
class8.anInt200 = -1;
class8.anInt164 = -1;
class8.anInt169 = 9;
class8.anInt204 = 0;
class8.anInt194 = -100;
class8.anInt179 = -1;
class8.anInt190 = 238;
class8.aByteArray178 = "It's a Warrior guild token.".getBytes();
}
if(i == 7597)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 5642;
class8.anIntArray160[1] = 5652;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Bronze defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7598)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 23;
class8.anIntArray160[1] = 33;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Iron defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7599)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 43042;
class8.anIntArray160[1] = 43072;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Steel defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7600)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[1];
class8.anIntArray160 = new int[1];
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 0;
class8.anIntArray160[1] = 10;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Black defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7601)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 43277;
class8.anIntArray160[1] = 43297;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Mithrill defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7602)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 21642;
class8.anIntArray160[1] = 21662;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Adamant defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
if(i == 7603)
{
class8.aStringArray189 = new String[5];
class8.aStringArray189[1] = "Wield";
class8.anIntArray156 = new int[2];
class8.anIntArray160 = new int[2];
class8.anIntArray156[0] = 28;
class8.anIntArray156[1] = 74;
class8.anIntArray160[0] = 38676;
class8.anIntArray160[1] = 38313;
class8.anInt174 = 15335; //Model ID
class8.anInt181 = 490;
class8.anInt190 = 344;
class8.anInt198 = 192;
class8.anInt204 = 0;
class8.anInt199 = -1;
class8.anInt169 = 1;
class8.anInt194 = 20;
class8.anInt165 = 15413; //Male equip
class8.anInt200 = 15413; //Female equip
class8.anInt175 = 56;
class8.anInt197 = 116;
class8.anInt164 = -1;
class8.anInt188 = -1;
class8.aBoolean176 = false;
class8.aString170 = "Rune defender";
class8.aByteArray178 = "A defensive weapon.".getBytes();
}
Close and save class8.java and open class5.java and add these ints:
Code:
if(i == 250)
{
class5.aString65 = "Kamfreena";
class5.aByteArray89 = "Blademistress, skillful female warrior.".getBytes();
}
if(i == 430)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte0 = 4;
class5.anIntArray76 = new int[byte0];
class5.anIntArray70 = new int[byte0];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 5652;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 5645;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 5635;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 5652;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Bronze Armour";
class5.anInt61 = 11;
class5.aByteArray89 = "Bronze armour that has come to life!".getBytes();
}
if(i == 431)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte1 = 4;
class5.anIntArray76 = new int[byte1];
class5.anIntArray70 = new int[byte1];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 33;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 22;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 18;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 33;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Iron Armour";
class5.anInt61 = 23;
class5.aByteArray89 = "Iron armour that has come to life!".getBytes();
}
if(i == 432)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
int l = 1;
class5.anIntArray76 = new int[l];
class5.anIntArray70 = new int[l];
class5.anIntArray76[0] = 3426;
class5.anIntArray70[0] = 33;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Steel Armour";
class5.anInt61 = 46;
class5.aByteArray89 = "Steel armour that has come to life!".getBytes();
}
if(i == 433)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte2 = 4;
class5.anIntArray76 = new int[byte2];
class5.anIntArray70 = new int[byte2];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 5;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 0;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 10;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 5;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Black Armour";
class5.anInt61 = 69;
class5.aByteArray89 = "Black armour that has come to life!".getBytes();
}
if(i == 434)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte3 = 4;
class5.anIntArray76 = new int[byte3];
class5.anIntArray70 = new int[byte3];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 43297;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 43288;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 43280;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 43297;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Mithril Armour";
class5.anInt61 = 92;
class5.aByteArray89 = "Mithril armour that has come to life!".getBytes();
}
if(i == 435)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte4 = 4;
class5.anIntArray76 = new int[byte4];
class5.anIntArray70 = new int[byte4];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 21662;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 21645;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 21640;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 21662;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 546;
class5.aString65 = "Animated Adamant Armour";
class5.anInt61 = 113;
class5.aByteArray89 = "Adamant armour that has come to life!".getBytes();
}
if(i == 436)
{
aClass30_Sub2_Sub2_60.anInt1406 = anIntArray72[35];
class5.method165(true, aClass30_Sub2_Sub2_60);
class5.aStringArray66 = new String[5];
class5.aStringArray66[1] = "Attack";
class5.anIntArray94 = new int[7];
byte byte5 = 4;
class5.anIntArray76 = new int[byte5];
class5.anIntArray70 = new int[byte5];
class5.anIntArray76[0] = 61;
class5.anIntArray70[0] = 36010;
class5.anIntArray76[1] = 41;
class5.anIntArray70[1] = 35990;
class5.anIntArray76[2] = 24;
class5.anIntArray70[2] = 35980;
class5.anIntArray76[3] = 37;
class5.anIntArray70[3] = 35990;
class5.anIntArray94[0] = 10004;
class5.anIntArray94[1] = 10003;
class5.anIntArray94[2] = 10001;
class5.anIntArray94[3] = 10002;
class5.anIntArray94[4] = 10005;
class5.anIntArray94[5] = 10006;
class5.anIntArray94[6] = 518;
class5.aString65 = "Animated Rune Armour";
class5.anInt61 = 138;
class5.aByteArray89 = "Rune armour that has come to life!".getBytes();
}
Close and save class5.java and open class46.java and add:
Code:
if(i == 9094)
{
class46.aString739 = "Animator";
class46.aByteArray777 = "Gives regular armour life!".getBytes();
class46.anInt744 = 1;
class46.anInt761 = 1;
class46.anIntArray773 = new int[1];
class46.anIntArray773[0] = 10351;
class46.aBoolean778 = true;
class46.aBoolean767 = true;
class46.aBoolean762 = false;
class46.aBoolean769 = false;
}
if(i == 9095)
{
class46.aString739 = "Wall";
class46.aByteArray777 = "A part of the Animator.".getBytes();
class46.anInt744 = 1;
class46.anInt761 = 1;
class46.anIntArray773 = new int[1];
class46.anIntArray773[0] = 10352;
class46.aBoolean778 = false;
class46.aBoolean767 = true;
class46.aBoolean762 = false;
class46.aBoolean769 = false;
}
if(i == 9096)
{
class46.aString739 = "Floor";
class46.aByteArray777 = "A part of the Animator.".getBytes();
class46.anInt744 = 1;
class46.anInt761 = 1;
class46.anIntArray773 = new int[1];
class46.anIntArray773[0] = 10353;
class46.aBoolean778 = false;
class46.aBoolean767 = false;
class46.aBoolean762 = false;
class46.aBoolean769 = false;
}
Now download [Only registered and activated users can see links. ] models and put them into your models folder.
And your done!
Also if you do not have the npc talking method, put this in client.java.
Code:
public void npc(int face, String line1, String line2, String line3, String line4, int npcID) {
sendFrame200(4901, face);
sendFrame126(GetNpcName(npcID).replaceAll("_", " "), 4902);
sendFrame126(""+line1, 4903);
sendFrame126(""+line2, 4904);
sendFrame126(""+line3, 4905);
sendFrame126(""+line4, 4906);
sendFrame126("Click here to continue", 4907);
sendFrame75(npcID, 4901);
sendFrame164(4900);
NpcDialogueSend = true;
}
P.S. I take no credits for models or ints(Except for warrior guild tokens).
Note: I give anyone the right to rename those ints in order for renamed users. Thanks.