PDA

View Full Version : [508] Smithing



Angel
June 20th, 2010, 21:33
[508] Smithing
Version 1.0
Tested On Palidino Source
Changed Files: ItemOnObject.java, Actionbuttons.java

|| Update Log ||

Version 1.0-
Uploaded Current Code

|| Introduction ||

Hello everyone,

I am the head programmer of Project Soulstice formerly owned and ran by my brother Sinisoul before he left for college. This code was originally created by my brother but he never finished it, so I just spent half a day finishing the 1,000 Lines that he didn't.

PLEASE ASK ME BEFORE YOU POST THIS SOMEWHERE ELSE!

Any bugs/issues please post, I will not solve your compiler errors. I think you should learn to code before you ask me why my imports are wrong. THIS DOES NOT INCLUDE BAR MAKING, JUST THE INTERFACE PART OF IT.

You will need a notepad type program. I suggest Notepad++ :D It works wonders.


|| Not a Palidino Source? ||

(Palidino Sources do include Bulby and David Scape)

Most of the imports into the Smithing.java file are related to the Player.java file (Or entity file) and the Frames File. As frames hold most of the Item On Interface, and String Information. Players holds item information and deletion information. If your Player.java or entity file doesn't contain the links to those files directly import them rather then ask the thread why you get errors.

|| Code ||

Save as "Smtihing.java" in a Folder Called "content".

*/Example/content;
Remember When Export A File It Wouldn't Be "Example.content.Smtihing;"

It Would Be "Example.content;*



package Soulstice.content;

import Soulstice.players.Player;
import Soulstice.players.items.PlayerItems;
import Soulstice.Engine;

public class Smithing {

PlayerItems pi = new PlayerItems();
public static int xprate = 100;
public static int type = -1;

public static void smithing(Player p, int Type) {
p.frames.showInterface(p, 300);
smithtab(p, Type);
Iof(p, Type);
amoutofbars(p, Type);
LvlReq(p, Type);
type = Type;
}

public static void Iof(Player p, int Type) {
p.frames.itemOnInterface(p, 300, 19, -1, Dagger(Type)); //dagger 1
p.frames.itemOnInterface(p, 300, 27, -1, WcAxe(Type)); //axe 1
p.frames.itemOnInterface(p, 300, 35, -1, Mace(Type)); //mace 1
p.frames.itemOnInterface(p, 300, 43, -1, MedHelm(Type)); //medium helm 1
p.frames.itemOnInterface(p, 300, 51, 10, Bolts(Type)); //crossbowbolt 1
p.frames.itemOnInterface(p, 300, 59, -1, Sword(Type)); // sword 1
p.frames.itemOnInterface(p, 300, 67, 15, DartTips(Type)); // dart tips 1
p.frames.itemOnInterface(p, 300, 75, -1, Nails(Type)); // nails 1
p.frames.itemOnInterface(p, 300, 91, -1, Items1(Type)); // Iron spilt 1
p.frames.itemOnInterface(p, 300, 107, 15, ArrowTips(Type)); // arrow tips 1
p.frames.itemOnInterface(p, 300, 115, -1, Scimater(Type)); // scimitar 2
p.frames.itemOnInterface(p, 300, 123, -1, CbowLimbs(Type)); // crosbowlimbs 1
p.frames.itemOnInterface(p, 300, 131, -1, LongSword(Type)); // longsowrd 2
p.frames.itemOnInterface(p, 300, 139, 5, ThrowingKnife(Type)); // trowing knife 1
p.frames.itemOnInterface(p, 300, 147, -1, FullHelm(Type)); // full helm 2
p.frames.itemOnInterface(p, 300, 155, -1, SQShield(Type)); // square shield 2
p.frames.itemOnInterface(p, 300, 163, -1, Lantern(Type)); // oil lantern 1
p.frames.itemOnInterface(p, 300, 171, -1, GrapleHook(Type)); // graple tip 1
p.frames.itemOnInterface(p, 300, 179, -1, Warhammer(Type)); // warhammer 3
p.frames.itemOnInterface(p, 300, 187, -1, BattleAxe(Type)); // battle axe 3
p.frames.itemOnInterface(p, 300, 195, -1, ChainBody(Type)); // chainbody 3
p.frames.itemOnInterface(p, 300, 203, -1, KiteShield(Type)); //kite shield 3
p.frames.itemOnInterface(p, 300, 211, -1, Claws(Type)); // clwas 2
p.frames.itemOnInterface(p, 300, 219, -1, TwoHandedSword(Type)); // 2 handed sword 3
p.frames.itemOnInterface(p, 300, 227, -1, PlateSkirt(Type)); // plate skirt 3
p.frames.itemOnInterface(p, 300, 235, -1, PlateLegs(Type)); // plate legs 3
p.frames.itemOnInterface(p, 300, 243, -1, PlateBody(Type)); //plate body 5
p.frames.itemOnInterface(p, 300, 268, -1, PickAxe(Type)); //pickaxe 2
}

public static void amoutofbars(Player p, int Type) {
if (Engine.playerItems.invItemCount(p, Bar(Type)) >= 1) {
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 21);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 29);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 37);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 45);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 53);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 61);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 69);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 77);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 93);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 109);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 125);
p.frames.setString(p, "<col=00FF00>1 Bar", 300, 141);
} else {
}
if (Engine.playerItems.invItemCount(p, Bar(Type)) >= 2) {
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 117);
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 133);
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 149);
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 157);
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 213);
p.frames.setString(p, "<col=00FF00>2 Bars", 300, 270);
} else {
}
if (Engine.playerItems.invItemCount(p, Bar(Type)) >= 3) {
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 181);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 189);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 197);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 205);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 221);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 229);
p.frames.setString(p, "<col=00FF00>3 Bars", 300, 237);
} else {
}
if (Engine.playerItems.invItemCount(p, Bar(Type)) >= 5) {
p.frames.setString(p, "<col=00FF00>5 Bars", 300, 245);
} else {
}
}

public static int LvlReq(Player p, int Type) {
switch (Type) {
case 1:
if (p.skillLvl[13] >= 1) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 2) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
}
if (p.skillLvl[13] >= 3) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 4) {
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Bronze wire", 300, 92);
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 5) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 6) {
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
}
if (p.skillLvl[13] >= 7) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 8) {
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 9) {
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 10) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 11) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
}
if (p.skillLvl[13] >= 12) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 13) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 14) {
p.frames.setString(p, "<col=ffffff>2 hand sword", 300, 220);
}
if (p.skillLvl[13] >= 16) {
p.frames.setString(p, "<col=ffffff>Plate legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate skirt", 300, 228);
}
if (p.skillLvl[13] >= 18) {
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
} else {
}
return 1;

case 2:
if (p.skillLvl[13] >= 15) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
}
if (p.skillLvl[13] >= 16) {
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 17) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
p.frames.setString(p, "<col=ffffff>Iron split", 300, 20);
}
if (p.skillLvl[13] >= 18) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 19) {
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 20) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 21) {
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
}
if (p.skillLvl[13] >= 22) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 23) {
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 24) {
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 25) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 26) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
p.frames.setString(p, "<col=ffffff>Oil lantern frame", 300, 20);
}
if (p.skillLvl[13] >= 27) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 28) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 29) {
p.frames.setString(p, "<col=ffffff>2 hand sword", 300, 220);
}
if (p.skillLvl[13] >= 31) {
p.frames.setString(p, "<col=ffffff>Plate legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate skirt", 300, 228);
}
if (p.skillLvl[13] >= 33) {
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
}
if (p.skillLvl[13] >= 45) {
p.frames.setString(p, "<col=ffffff>Sheet", 300, 20);
}
return 2;

case 3:
if (p.skillLvl[13] >= 30) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
}
if (p.skillLvl[13] >= 31) {
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 32) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
}
if (p.skillLvl[13] >= 33) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 34) {
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 35) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 36) {
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
p.frames.setString(p, "<col=ffffff>Studs", 300, 20);
}
if (p.skillLvl[13] >= 37) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 38) {
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 39) {
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 40) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 41) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
}
if (p.skillLvl[13] >= 42) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 43) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 44) {
p.frames.setString(p, "<col=ffffff>2 hand sword", 300, 220);
}
if (p.skillLvl[13] >= 46) {
p.frames.setString(p, "<col=ffffff>Plate legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate skirt", 300, 228);
}
if (p.skillLvl[13] >= 48) {
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
}
if (p.skillLvl[13] >= 49) {
p.frames.setString(p, "<col=ffffff>Bullseye lantern", 300, 20);
}
return 3;

case 4:
if (p.skillLvl[13] >= 50) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
}
if (p.skillLvl[13] >= 51) {
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 52) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
}
if (p.skillLvl[13] >= 53) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 54) {
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 55) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 56) {
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
}
if (p.skillLvl[13] >= 57) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 58) {
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 59) {
p.frames.setString(p, "<col=ffffff>Grapple tips", 300, 20);
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 60) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 61) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
}
if (p.skillLvl[13] >= 62) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 63) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 64) {
p.frames.setString(p, "<col=ffffff>2 hand sword", 300, 220);
}
if (p.skillLvl[13] >= 66) {
p.frames.setString(p, "<col=ffffff>Plate legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate skirt", 300, 228);
}
if (p.skillLvl[13] >= 68) {
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
}
return 4;

case 5:
if (p.skillLvl[13] >= 70) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
}
if (p.skillLvl[13] >= 71) {
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 72) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
}
if (p.skillLvl[13] >= 73) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 74) {
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 75) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 76) {
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
}
if (p.skillLvl[13] >= 77) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 78) {
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 79) {
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 80) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 81) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
}
if (p.skillLvl[13] >= 82) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 83) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 84) {
p.frames.setString(p, "<col=ffffff>2 hand sword", 300, 220);
}
if (p.skillLvl[13] >= 86) {
p.frames.setString(p, "<col=ffffff>Plate legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate skirt", 300, 228);
}
if (p.skillLvl[13] >= 88) {
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
}
return 5;

case 6:
if (p.skillLvl[13] >= 85) {
p.frames.setString(p, "<col=ffffff>Dagger", 300, 20);
}
if (p.skillLvl[13] >= 86) {
p.frames.setString(p, "<col=ffffff>Axe", 300, 28);
}
if (p.skillLvl[13] >= 87) {
p.frames.setString(p, "<col=ffffff>Mace", 300, 36);
p.frames.setString(p, "<col=ffffff>Iron split", 300, 20);
}
if (p.skillLvl[13] >= 88) {
p.frames.setString(p, "<col=ffffff>Medium helm", 300, 44);
p.frames.setString(p, "<col=ffffff>Crosbow bolts", 300, 52);
}
if (p.skillLvl[13] >= 89) {
p.frames.setString(p, "<col=ffffff>Sword", 300, 60);
p.frames.setString(p, "<col=ffffff>Dart tips", 300, 68);
p.frames.setString(p, "<col=ffffff>Nails", 300, 76);
}
if (p.skillLvl[13] >= 90) {
p.frames.setString(p, "<col=ffffff>Arrow heads", 300, 108);
p.frames.setString(p, "<col=ffffff>Scimater", 300, 116);
p.frames.setString(p, "<col=ffffff>Pick axe", 300, 269);
}
if (p.skillLvl[13] >= 91) {
p.frames.setString(p, "<col=ffffff>Long sword", 300, 132);
p.frames.setString(p, "<col=ffffff>Limbs", 300, 124);
}
if (p.skillLvl[13] >= 92) {
p.frames.setString(p, "<col=ffffff>Full helm", 300, 148);
p.frames.setString(p, "<col=ffffff>Trowing knife", 300, 140);
}
if (p.skillLvl[13] >= 93) {
p.frames.setString(p, "<col=ffffff>Square Shield", 300, 156);
}
if (p.skillLvl[13] >= 94) {
p.frames.setString(p, "<col=ffffff>Warhammer", 300, 180);
}
if (p.skillLvl[13] >= 95) {
p.frames.setString(p, "<col=ffffff>Battleaxe", 300, 188);
}
if (p.skillLvl[13] >= 96) {
p.frames.setString(p, "<col=ffffff>Chainbody", 300, 196);
}
if (p.skillLvl[13] >= 97) {
p.frames.setString(p, "<col=ffffff>Kite shield", 300, 204);
}
if (p.skillLvl[13] >= 98) {
p.frames.setString(p, "<col=ffffff>Claws", 300, 212);
}
if (p.skillLvl[13] >= 99) {
p.frames.setString(p, "<col=ffffff>2 Handed Sword", 300, 220);
p.frames.setString(p, "<col=ffffff>Plate Legs", 300, 236);
p.frames.setString(p, "<col=ffffff>Plate Skirt", 300, 228);
p.frames.setString(p, "<col=ffffff>Plate Body", 300, 244);
}
return 6;
}
return -1;
}

public static int smithtab(Player p, int Type) {
switch (Type) {
case 1:
p.frames.setString(p, "Bronze Smithing", 300, 15);//Bronze
return 1;

case 2:
p.frames.setString(p, "Iron Smithing", 300, 15);//Iron
return 2;

case 3:
p.frames.setString(p, "Steel Smithing", 300, 15);//Steel
return 3;

case 4:
p.frames.setString(p, "Mithril Smithing", 300, 15);//Mithril
return 4;

case 5:
p.frames.setString(p, "Adamant Smithing", 300, 15);//Adamant
return 5;

case 6:
p.frames.setString(p, "Rune Smithing", 300, 15);//Rune
return 6;
}
return -1;
}

public static int AmoutOfBars(int Button2) {
switch (Button2) {
case 25:
case 24:
case 23:
case 22:
case 57:
case 56:
case 55:
case 54:
case 33:
case 32:
case 31:
case 30:
case 65:
case 64:
case 63:
case 62:
case 113:
case 112:
case 111:
case 110:
case 145:
case 144:
case 143:
case 142:
case 41:
case 40:
case 39:
case 38:
case 49:
case 48:
case 47:
case 46:
case 81:
case 80:
case 79:
case 78:
case 129:
case 128:
case 127:
case 126:
return 1;

case 121:
case 120:
case 119:
case 118:
case 137:
case 136:
case 135:
case 134:
case 153:
case 152:
case 151:
case 150:
case 161:
case 160:
case 159:
case 158:
return 2;

case 185:
case 184:
case 183:
case 182:
case 193:
case 192:
case 191:
case 190:
case 225:
case 224:
case 223:
case 222:
case 209:
case 208:
case 207:
case 206:
case 201:
case 200:
case 199:
case 198:
case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 3;

case 249:
case 248:
case 247:
case 246:
return 5;
}
return -1;
}

public static int lvlreq(int Type, int button2) {
switch (Type) {
case 1:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
case 33:
case 32:
case 31:
case 30:
return 1;

case 41:
case 40:
case 39:
case 38:
return 2;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 3;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 4;

case 121:
case 120:
case 119:
case 118:
case 113:
case 112:
case 111:
case 110:
return 5;

case 129:
case 128:
case 127:
case 126:
case 137:
case 136:
case 135:
case 134:
return 6;

case 153:
case 152:
case 151:
case 150:
case 145:
case 144:
case 143:
case 142:
return 7;

case 161:
case 160:
case 159:
case 158:
return 8;

case 185:
case 184:
case 183:
case 182:
return 9;

case 193:
case 192:
case 191:
case 190:
return 10;

case 201:
case 200:
case 199:
case 198:
return 11;

case 209:
case 208:
case 207:
case 206:
return 12;

case 225:
case 224:
case 223:
case 222:
return 14;

case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 16;

case 249:
case 248:
case 247:
case 246:
return 18;
}
return -1;

case 2:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
return 15;

case 33:
case 32:
case 31:
case 30:
return 16;

case 41:
case 40:
case 39:
case 38:
return 17;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 18;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 19;

case 113:
case 112:
case 111:
case 110:
case 121:
case 120:
case 119:
case 118:
return 20;

case 137:
case 136:
case 135:
case 134:
return 21;

case 145:
case 144:
case 143:
case 142:
case 153:
case 152:
case 151:
case 150:
return 22;

case 129:
case 128:
case 127:
case 126:
case 161:
case 160:
case 159:
case 158:
return 23;

case 185:
case 184:
case 183:
case 182:
return 24;

case 193:
case 192:
case 191:
case 190:
return 25;

case 201:
case 200:
case 199:
case 198:
return 26;

case 209:
case 208:
case 207:
case 206:
return 27;

case 225:
case 224:
case 223:
case 222:
return 29;

case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 31;

case 249:
case 248:
case 247:
case 246:
return 33;
}
return -1;

case 3:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
return 30;

case 33:
case 32:
case 31:
case 30:
return 31;

case 41:
case 40:
case 39:
case 38:
return 32;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 33;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 34;

case 113:
case 112:
case 111:
case 110:
case 121:
case 120:
case 119:
case 118:
return 35;

case 129:
case 128:
case 127:
case 126:
case 137:
case 136:
case 135:
case 134:
return 36;

case 145:
case 144:
case 143:
case 142:
case 153:
case 152:
case 151:
case 150:
return 37;

case 161:
case 160:
case 159:
case 158:
return 38;

case 185:
case 184:
case 183:
case 182:
return 39;

case 193:
case 192:
case 191:
case 190:
return 40;

case 201:
case 200:
case 199:
case 198:
return 41;

case 209:
case 208:
case 207:
case 206:
return 42;

case 225:
case 224:
case 223:
case 222:
return 44;

case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 46;

case 249:
case 248:
case 247:
case 246:
return 48;
}
return -1;

case 4:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
return 50;

case 33:
case 32:
case 31:
case 30:
return 51;

case 41:
case 40:
case 39:
case 38:
return 52;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 53;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 54;

case 113:
case 112:
case 111:
case 110:
case 121:
case 120:
case 119:
case 118:
return 55;

case 129:
case 128:
case 127:
case 126:
case 137:
case 136:
case 135:
case 134:
return 56;

case 145:
case 144:
case 143:
case 142:
case 153:
case 152:
case 151:
case 150:
return 57;

case 161:
case 160:
case 159:
case 158:
return 58;

case 185:
case 184:
case 183:
case 182:
return 59;

case 193:
case 192:
case 191:
case 190:
return 60;

case 201:
case 200:
case 199:
case 198:
return 61;

case 209:
case 208:
case 207:
case 206:
return 62;

case 225:
case 224:
case 223:
case 222:
return 64;

case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 66;

case 249:
case 248:
case 247:
case 246:
return 68;
}
return -1;

case 5:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
return 70;

case 33:
case 32:
case 31:
case 30:
return 71;

case 41:
case 40:
case 39:
case 38:
return 72;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 73;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 74;

case 113:
case 112:
case 111:
case 110:
case 121:
case 120:
case 119:
case 118:
return 75;

case 129:
case 128:
case 127:
case 126:
case 137:
case 136:
case 135:
case 134:
return 76;

case 145:
case 144:
case 143:
case 142:
case 153:
case 152:
case 151:
case 150:
return 77;

case 161:
case 160:
case 159:
case 158:
return 78;

case 185:
case 184:
case 183:
case 182:
return 79;

case 193:
case 192:
case 191:
case 190:
return 80;

case 201:
case 200:
case 199:
case 198:
return 81;

case 209:
case 208:
case 207:
case 206:
return 82;

case 225:
case 224:
case 223:
case 222:
return 84;

case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 238:
return 86;

case 249:
case 248:
case 247:
case 246:
return 88;
}
return -1;

case 6:
switch (button2) {
case 25:
case 24:
case 23:
case 22:
return 85;

case 33:
case 32:
case 31:
case 30:
return 86;

case 41:
case 40:
case 39:
case 38:
return 87;

case 49:
case 48:
case 47:
case 46:
case 57:
case 56:
case 55:
case 54:
return 88;

case 65:
case 64:
case 63:
case 62:
case 81:
case 80:
case 79:
case 78:
return 89;

case 113:
case 112:
case 111:
case 110:
case 121:
case 120:
case 119:
case 118:
return 90;

case 129:
case 128:
case 127:
case 126:
case 137:
case 136:
case 135:
case 134:
return 91;

case 145:
case 144:
case 143:
case 142:
case 153:
case 152:
case 151:
case 150:
return 92;

case 161:
case 160:
case 159:
case 158:
return 93;

case 185:
case 184:
case 183:
case 182:
return 94;

case 193:
case 192:
case 191:
case 190:
return 95;

case 201:
case 200:
case 199:
case 198:
return 96;

case 209:
case 208:
case 207:
case 206:
return 97;

case 225:
case 224:
case 223:
case 222:
case 233:
case 232:
case 231:
case 230:
case 241:
case 240:
case 239:
case 249:
case 248:
case 247:
case 246:
case 238:
return 99;
}
}
return -1;
}

/*Item #s For WcAxes*/
public static int WcAxe(int type) {
switch (type) {
case 1://Bronze
return 1351;
case 2://Iron
return 1349;
case 3://Steel
return 1353;
case 4://Mithril
return 1355;
case 5://Adamante
return 1357;
case 6://Rune
return 1359;
}
return -1;
}

/*Item #s For Daggers*/
public static int Dagger(int type) {
switch (type) {
case 1://Bronze
return 1205;
case 2://Iron
return 1203;
case 3://Steel
return 1207;
case 4://Mithril
return 1209;
case 5://Adamante
return 1211;
case 6://Rune
return 1213;
}
return -1;
}

/*Item #s For Maces*/
public static int Mace(int type) {
switch (type) {
case 1://Bronze
return 1422;
case 2://Iron
return 1420;
case 3://Steel
return 1424;
case 4://Mithril
return 1428;
case 5://Adamante
return 1430;
case 6://Rune
return 1432;
}
return -1;
}

/*Item #s For MedHelm*/
public static int MedHelm(int type) {
switch (type) {
case 1://Bronze
return 1139;
case 2://Iron
return 1137;
case 3://Steel
return 1141;
case 4://Mithril
return 1143;
case 5://Adamante
return 1145;
case 6://Rune
return 1147;
}
return -1;
}

/*Item #s For Bolts*/
public static int Bolts(int type) {
switch (type) {
case 1://Bronze
return 877;
case 2://Iron
return 9377;
case 3://Steel
return 9378;
case 4://Mithril
return 9379;
case 5://Adamante
return 9380;
case 6://Rune
return 9381;
}
return -1;
}

/*Item #s For Swords*/
public static int Sword(int type) {
switch (type) {
case 1://Bronze
return 1277;
case 2://Iron
return 1279;
case 3://Steel
return 1281;
case 4://Mithril
return 1285;
case 5://Adamante
return 1287;
case 6://Rune
return 1289;
}
return -1;
}

/*Item #s For DartTips*/
public static int DartTips(int type) {
switch (type) {
case 1://Bronze
return 819;
case 2://Iron
return 820;
case 3://Steel
return 821;
case 4://Mithril
return 822;
case 5://Adamante
return 823;
case 6://Rune
return 824;
}
return -1;
}

/*Item #s For ArrowTips*/
public static int Nails(int type) {
switch (type) {
case 1://Bronze
return 4819;
case 2://Iron
return 4820;
case 3://Steel
return 1539;
case 4://Mithril
return 4822;
case 5://Adamante
return 4823;
case 6://Rune
return 4824;
}
return -1;
}

/*?Item #s For Ironsplit?*/
public static int Items1(int type) {
switch (type) {
case 1://Bronze
return 1794;
case 2://Iron
return 7225;
case 3://Steel
return 2370;
case 4://Mithril
return -1;
case 5://Adamante
return -1;
case 6://Rune
return -1;
}
return -1;
}

/*Item #s For ArrowTips*/
public static int ArrowTips(int type) {
switch (type) {
case 1://Bronze
return 39;
case 2://Iron
return 40;
case 3://Steel
return 41;
case 4://Mithril
return 42;
case 5://Adamante
return 43;
case 6://Rune
return 44;
}
return -1;
}

/*Item #s For Scimaters*/
public static int Scimater(int type) {
switch (type) {
case 1://Bronze
return 1321;
case 2://Iron
return 1323;
case 3://Steel
return 1325;
case 4://Mithril
return 1329;
case 5://Adamante
return 1331;
case 6://Rune
return 1333;
}
return -1;
}

/*Item #s For CbowLimbs*/
public static int CbowLimbs(int type) {
switch (type) {
case 1://Bronze
return 9420;
case 2://Iron
return 9423;
case 3://Steel
return 9425;
case 4://Mithril
return 9427;
case 5://Adamante
return 9429;
case 6://Rune
return 9431;
}
return -1;
}

/*Item #s For LongSwords*/
public static int LongSword(int type) {
switch (type) {
case 1://Bronze
return 1291;
case 2://Iron
return 1293;
case 3://Steel
return 1295;
case 4://Mithril
return 1299;
case 5://Adamante
return 1301;
case 6://Rune
return 1303;
}
return -1;
}

/*Item #s For ThrowingKnifes*/
public static int ThrowingKnife(int type) {
switch (type) {
case 1://Bronze
return 864;
case 2://Iron
return 863;
case 3://Steel
return 865;
case 4://Mithril
return 866;
case 5://Adamante
return 867;
case 6://Rune
return 868;
}
return -1;
}

/*Item #s For Fullhelm*/
public static int FullHelm(int type) {
switch (type) {
case 1://Bronze
return 1155;
case 2://Iron
return 1153;
case 3://Steel
return 1157;
case 4://Mithril
return 1159;
case 5://Adamante
return 1161;
case 6://Rune
return 1163;
}
return -1;
}

/*Item #s For SQShield*/
public static int SQShield(int type) {
switch (type) {
case 1://Bronze
return 1173;
case 2://Iron
return 1175;
case 3://Steel
return 1177;
case 4://Mithril
return 1181;
case 5://Adamante
return 1183;
case 6://Rune
return 1185;
}
return -1;
}

/*Item #s For Lanterns*/
public static int Lantern(int type) {
switch (type) {
case 1://Bronze
return 1794;
case 2://Iron
return 7225;
case 3://Steel
return 2370;
case 4://Mithril
return -1;
case 5://Adamante
return -1;
case 6://Rune
return -1;
}
return -1;
}

/*Item #s For GrapleHooks*/
public static int GrapleHook(int type) {
switch (type) {
case 1://Bronze
return 1794;
case 2://Iron
return 7225;
case 3://Steel
return 2370;
case 4://Mithril
return -1;
case 5://Adamante
return -1;
case 6://Rune
return -1;
}
return -1;
}

/*Item #s For Warhammers*/
public static int Warhammer(int type) {
switch (type) {
case 1://Bronze
return 1337;
case 2://Iron
return 1335;
case 3://Steel
return 1339;
case 4://Mithril
return 1343;
case 5://Adamante
return 1345;
case 6://Rune
return 1347;
}
return -1;
}

/*Item #s For BattleAxes*/
public static int BattleAxe(int type) {
switch (type) {
case 1://Bronze
return 1375;
case 2://Iron
return 1363;
case 3://Steel
return 1365;
case 4://Mithril
return 1369;
case 5://Adamante
return 1371;
case 6://Rune
return 1373;
}
return -1;
}

/*Item #s For ChainBodies*/
public static int ChainBody(int type) {
switch (type) {
case 1://Bronze
return 1103;
case 2://Iron
return 1101;
case 3://Steel
return 1105;
case 4://Mithril
return 1109;
case 5://Adamante
return 1111;
case 6://Rune
return 1113;
}
return -1;
}

/*Item #s For KiteShields*/
public static int KiteShield(int type) {
switch (type) {
case 1://Bronze
return 1189;
case 2://Iron
return 1191;
case 3://Steel
return 1193;
case 4://Mithril
return 1197;
case 5://Adamante
return 1199;
case 6://Rune
return 1201;
}
return -1;
}

/*Item #s For Claws*/
public static int Claws(int type) {
switch (type) {
case 1://Bronze
return 3095;
case 2://Iron
return 3096;
case 3://Steel
return 3097;
case 4://Mithril
return 3099;
case 5://Adamante
return 3100;
case 6://Rune
return 3101;
}
return -1;
}

/*Item #s For TwoHandedSwords*/
public static int TwoHandedSword(int type) {
switch (type) {
case 1://Bronze
return 1307;
case 2://Iron
return 1309;
case 3://Steel
return 1311;
case 4://Mithril
return 1315;
case 5://Adamante
return 1317;
case 6://Rune
return 1319;
}
return -1;
}

/*Item #s For PlateSkirts*/
public static int PlateSkirt(int type) {
switch (type) {
case 1://Bronze
return 1087;
case 2://Iron
return 1081;
case 3://Steel
return 1083;
case 4://Mithril
return 1085;
case 5://Adamante
return 1091;
case 6://Rune
return 1093;
}
return -1;
}

/*Item #s For PlateLegs*/
public static int PlateLegs(int type) {
switch (type) {
case 1://Bronze
return 1075;
case 2://Iron
return 1067;
case 3://Steel
return 1069;
case 4://Mithril
return 1071;
case 5://Adamante
return 1073;
case 6://Rune
return 1079;
}
return -1;
}

/*Item #s For Platebodies*/
public static int PlateBody(int type) {
switch (type) {
case 1://Bronze
return 1117;
case 2://Iron
return 1115;
case 3://Steel
return 1119;
case 4://Mithril
return 1121;
case 5://Adamante
return 1123;
case 6://Rune
return 1127;
}
return -1;
}

/*Item #s For Pickaxes*/
public static int PickAxe(int type) {
switch (type) {
case 1://Bronze
return 1265;
case 2://Iron
return 1267;
case 3://Steel
return 1269;
case 4://Mithril
return 1273;
case 5://Adamante
return 1271;
case 6://Rune
return 1275;
}
return -1;
}

/*Returns the item # of a bar by the type*/
public static int Bar(int Type) {
switch (Type) {
case 1:
return 2349; //Bronze
case 2:
return 2351;//Iron
case 3:
return 2353;//Steel
case 4:
return 2359;//Mithril
case 5:
return 2361;//Iron
case 6:
return 2363;//Rune
}
return -1;
}

public static void additem(Player p, int Type, int Button2) {
switch (Button2) {
case 22:
case 23:
case 24:
case 25:
Engine.playerItems.addItem(p, Dagger(Type), 1);
break;

case 30:
case 31:
case 32:
case 33:
Engine.playerItems.addItem(p, WcAxe(Type), 1);
break;

case 38:
case 39:
case 40:
case 41:
Engine.playerItems.addItem(p, Mace(Type), 1);
break;

case 46:
case 47:
case 48:
case 49:
Engine.playerItems.addItem(p, MedHelm(Type), 1);
break;

case 54:
case 55:
case 56:
case 57:
Engine.playerItems.addItem(p, Bolts(Type), 1);
break;

case 62:
case 63:
case 64:
case 65:
Engine.playerItems.addItem(p, Sword(Type), 1);
break;

case 78:
case 79:
case 80:
case 81:
Engine.playerItems.addItem(p, Nails(Type), 1);
break;

case 110:
case 111:
case 112:
case 113:
Engine.playerItems.addItem(p, ArrowTips(Type), 1);
break;

case 118:
case 119:
case 120:
case 121:
Engine.playerItems.addItem(p, Scimater(Type), 1);
break;

case 126:
case 127:
case 128:
case 129:
Engine.playerItems.addItem(p, CbowLimbs(Type), 1);
break;

case 134:
case 135:
case 136:
case 137:
Engine.playerItems.addItem(p, LongSword(Type), 1);
break;

case 142:
case 143:
case 144:
case 145:
Engine.playerItems.addItem(p, ThrowingKnife(Type), 1);
break;

case 150:
case 151:
case 152:
case 153:
Engine.playerItems.addItem(p, FullHelm(Type), 1);
break;

case 158:
case 159:
case 160:
case 161:
Engine.playerItems.addItem(p, SQShield(Type), 1);
break;

case 182:
case 183:
case 184:
case 185:
Engine.playerItems.addItem(p, Warhammer(Type), 1);
break;

case 190:
case 191:
case 192:
case 193:
Engine.playerItems.addItem(p, BattleAxe(Type), 1);
break;

case 198:
case 199:
case 200:
case 201:
Engine.playerItems.addItem(p, ChainBody(Type), 1);
break;

case 206:
case 207:
case 208:
case 209:
Engine.playerItems.addItem(p, KiteShield(Type), 1);
break;

case 225:
case 224:
case 223:
case 222:
Engine.playerItems.addItem(p, TwoHandedSword(Type), 1);
break;

case 230:
case 231:
case 232:
case 233:
Engine.playerItems.addItem(p, PlateSkirt(Type), 1);
break;

case 238:
case 239:
case 240:
case 241:
Engine.playerItems.addItem(p, PlateLegs(Type), 1);
break;

case 246:
case 247:
case 248:
case 249:
Engine.playerItems.addItem(p, PlateBody(Type), 1);
break;
}
}

public static int findItemSlot(Player p, int item) {
for (int i = 0; i < p.items.length; i++)
if (item == p.items) return i;
return -1;
}

public static int XpBar(int Type) {
switch (Type) {
case 1:
return 50;
case 2:
return 125;
case 3:
return 200;
case 4:
return 275;
case 5:
return 375;
case 6:
return 500;
}
return -1;
}

public static void EarnedXp(Player p, int Type, int button2){
int s5 = XpBar(Type) / 10;
int s1 = (AmoutOfBars(button2) * s5);
p.addSkillXP(s1 * xprate, 13);
}

public static void smith(Player p, int Type, int amout, int button2) {
boolean log = false;
for (int i = 0; i < amout; i++) {
if (p.skillLvl[13] >= lvlreq(Type, button2)) {
if (Engine.playerItems.invItemCount(p, Bar(Type)) >= AmoutOfBars(button2)) {
p.frames.removeShownInterface(p);
Engine.playerItems.deleteItem(p, Bar(Type), findItemSlot(p, Bar(Type)), AmoutOfBars(button2));
additem(p, Type, button2);
EarnedXp(p,Type,button2);
p.requestAnim(898,0);
}
}
}
}
}



-ActionButtons.java-

Add A Import to your Smithing.java

And Add this:


case 300:
if (buttonId == 25) {
Smithing.smith(p, Smithing.type, 1, 25);
}
if (buttonId == 24) {
Smithing.smith(p, Smithing.type, 5, 24);
}
if (buttonId == 22) {
Smithing.smith(p, Smithing.type, 28, 22);
}
if (buttonId == 33) {
Smithing.smith(p, Smithing.type, 1, 33);
}
if (buttonId == 32) {
Smithing.smith(p, Smithing.type, 5, 32);
}
if (buttonId == 30) {
Smithing.smith(p, Smithing.type, 28, 30);
}
if (buttonId == 41) {
Smithing.smith(p, Smithing.type, 1, 41);
}
if (buttonId == 40) {
Smithing.smith(p, Smithing.type, 5, 40);
}
if (buttonId == 38) {
Smithing.smith(p, Smithing.type, 28, 38);
}
if (buttonId == 49) {
Smithing.smith(p, Smithing.type, 1, 49);
}
if (buttonId == 48) {
Smithing.smith(p, Smithing.type, 5, 48);
}
if (buttonId == 46) {
Smithing.smith(p, Smithing.type, 28, 46);
}
if (buttonId == 54) {
Smithing.smith(p, Smithing.type, 1, 54);
}
if (buttonId == 55) {
Smithing.smith(p, Smithing.type, 5, 55);
}
if (buttonId == 57) {
Smithing.smith(p, Smithing.type, 28, 57);
}
if (buttonId == 62) {
Smithing.smith(p, Smithing.type, 1, 62);
}
if (buttonId == 63) {
Smithing.smith(p, Smithing.type, 5, 63);
}
if (buttonId == 65) {
Smithing.smith(p, Smithing.type, 28, 65);
}
if (buttonId == 78) {
Smithing.smith(p, Smithing.type, 1, 78);
}
if (buttonId == 79) {
Smithing.smith(p, Smithing.type, 5, 79);
}
if (buttonId == 81) {
Smithing.smith(p, Smithing.type, 28, 81);
}
if (buttonId == 113) {
Smithing.smith(p, Smithing.type, 1, 113);
}
if (buttonId == 112) {
Smithing.smith(p, Smithing.type, 5, 112);
}
if (buttonId == 110) {
Smithing.smith(p, Smithing.type, 28, 110);
}
if (buttonId == 121) {
Smithing.smith(p, Smithing.type, 1, 121);
}
if (buttonId == 120) {
Smithing.smith(p, Smithing.type, 5, 120);
}
if (buttonId == 118) {
Smithing.smith(p, Smithing.type, 28, 118);
}
if (buttonId == 129) {
Smithing.smith(p, Smithing.type, 1, 129);
}
if (buttonId == 128) {
Smithing.smith(p, Smithing.type, 5, 128);
}
if (buttonId == 126) {
Smithing.smith(p, Smithing.type, 28, 126);
}
if (buttonId == 137) {
Smithing.smith(p, Smithing.type, 1, 137);
}
if (buttonId == 136) {
Smithing.smith(p, Smithing.type, 5, 136);
}
if (buttonId == 134) {
Smithing.smith(p, Smithing.type, 28, 134);
}
if (buttonId == 145) {
Smithing.smith(p, Smithing.type, 1, 145);
}
if (buttonId == 144) {
Smithing.smith(p, Smithing.type, 5, 144);
}
if (buttonId == 142) {
Smithing.smith(p, Smithing.type, 28, 142);
}
if (buttonId == 153) {
Smithing.smith(p, Smithing.type, 1, 153);
}
if (buttonId == 152) {
Smithing.smith(p, Smithing.type, 5, 152);
}
if (buttonId == 150) {
Smithing.smith(p, Smithing.type, 28, 150);
}
if (buttonId == 161) {
Smithing.smith(p, Smithing.type, 1, 161);
}
if (buttonId == 160) {
Smithing.smith(p, Smithing.type, 5, 160);
}

if (buttonId == 158) {
Smithing.smith(p, Smithing.type, 28, 158);
}
if (buttonId == 185) {
Smithing.smith(p, Smithing.type, 1, 185);
}
if (buttonId == 184) {
Smithing.smith(p, Smithing.type, 5, 184);
}
if (buttonId == 182) {
Smithing.smith(p, Smithing.type, 28, 182);
}
if (buttonId == 193) {
Smithing.smith(p, Smithing.type, 1, 193);
}
if (buttonId == 192) {
Smithing.smith(p, Smithing.type, 5, 192);
}
if (buttonId == 191) {
Smithing.smith(p, Smithing.type, 1, 191);
}
if (buttonId == 190) {
Smithing.smith(p, Smithing.type, 28, 190);
}
if (buttonId == 201) {
Smithing.smith(p, Smithing.type, 1, 201);
}
if (buttonId == 200) {
Smithing.smith(p, Smithing.type, 5, 200);
}
if (buttonId == 199) {
Smithing.smith(p, Smithing.type, 1, 199);
}
if (buttonId == 198) {
Smithing.smith(p, Smithing.type, 28, 198);
}
if (buttonId == 209) {
Smithing.smith(p, Smithing.type, 1, 209);
}
if (buttonId == 208) {
Smithing.smith(p, Smithing.type, 5, 208);
}
if (buttonId == 207) {
Smithing.smith(p, Smithing.type, 1, 207);
}
if (buttonId == 206) {
Smithing.smith(p, Smithing.type, 28, 206);
}
if (buttonId == 225) {
Smithing.smith(p, Smithing.type, 1, 225);
}
if (buttonId == 224) {
Smithing.smith(p, Smithing.type, 5, 224);
}
if (buttonId == 223) {
Smithing.smith(p, Smithing.type, 1, 223);
}
if (buttonId == 222) {
Smithing.smith(p, Smithing.type, 28, 222);
}
if (buttonId == 233) {
Smithing.smith(p, Smithing.type, 1, 233);
}
if (buttonId == 232) {
Smithing.smith(p, Smithing.type, 5, 232);
}
if (buttonId == 231) {
Smithing.smith(p, Smithing.type, 1, 231);
}
if (buttonId == 230) {
Smithing.smith(p, Smithing.type, 28, 230);
}
if (buttonId == 241) {
Smithing.smith(p, Smithing.type, 1, 241);
}
if (buttonId == 240) {
Smithing.smith(p, Smithing.type, 5, 240);
}
if (buttonId == 239) {
Smithing.smith(p, Smithing.type, 1, 239);
}
if (buttonId == 238) {
Smithing.smith(p, Smithing.type, 28, 238);
}
if (buttonId == 249) {
Smithing.smith(p, Smithing.type, 1, 249);
}
if (buttonId == 248) {
Smithing.smith(p, Smithing.type, 5, 248);
}
if (buttonId == 247) {
Smithing.smith(p, Smithing.type, 1, 247);
}
if (buttonId == 246) {
Smithing.smith(p, Smithing.type, 28, 246);
}
break;

I did not use a switch statement on purpose to show you that it can be done both ways.
If you want you can use what I tell you and use switch statements for this section.


-ItemOnObject.java-

Add Again A Smithing Import.

And This:


if (itemUsed == 2477 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 1);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}

if (itemUsed == 2479 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 2);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}

if (itemUsed == 2481 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 3);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}

if (itemUsed == 2487 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 4);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}

if (itemUsed == 2489 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 5);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}

if (itemUsed == 2491 && usedWith == 53004) {
if (pi.invItemCount(p, 2347) >= 1) {
Smithing.smithing(p, 6);
} else {
p.frames.sendMessage(p, "You need a hammer to smith this.");
}
}



|| Explanation ||

Since this file is 2000 Lines Long instead of lecturing you on what every little line is im gona explain the two Java coding aspects then explain what all the voids do so you can improve on this code.

[I]-Switch Statements-

Use: Pretty Much To Get Rid of long If{}Elseif{}ElseIf... Strings
Declared: switch (Int) {

switch (int) {
case 1:
p.dosomething(Example)
break;

If they int was 1 then it would execute the command under Case 1.

-Void Statements-

Voids Statements are oftenly used in situations of tasks that want to be preformed again and again but with different conditions based on the variables that are given.

public void example(int x, int y, int z) {

pi.deleteitem(x);
pi.giveitem(y);
pi.idk(z);
}

Now you can change x, y, z whenever a action is called be it a packet or on a interface.

case 1:
example(5, 6, 7);
break;

case 2:
example(8, 9, 10);
break;

Case One Would Delete Item Five, Give Item 6, And IDK 7

Case Two Would Delete Item Six, Give Item Nine, And IDK 10

|| Explanation Of Voids ||

To Be Finished At A Later Date

|| Conclusion ||

I will regularly update this thread with new code until I achieve 100% Smtihing.
Id Say it's about 90% Right Now. Sorry about not posting the Bar making process because I don't want to publish what I did not help create but I can make a Snippet of it later if you guys ask me enough.

PLEASE POST BUGS/ISSUES BUT NOT COMPILER ERRORS.

Credits: Me, Jagex

Break
June 20th, 2010, 21:44
This is not ur's, Iv'e seen this already.

Angel
June 20th, 2010, 21:49
Please tell me the author.

I never stated it was mine but I did finish it. :) So if you have something nice to say instead of stating I'm a leacher I would be absolutely excited to hear it.

Emtec
October 6th, 2010, 20:56
I might use this end Fix it up for my source,

Dodge'
October 7th, 2010, 21:14
lol i just made a new source after not coding in three months, i dont even have content yet... lol fml