client.java:16260: illegal start of expression
public boolean woodcutting() {
^
1 error
Files Compiled Successfully!
Press any key to continue . . .
Thats the error
Code:
public boolean wear(int wearID, int slot) {
if (duelFight && duelRule[3]) {
sendMessage("Equipment changing has been disabled in this duel");
return false;
}
int targetSlot = 0;
targetSlot = itemType(wearID);
int[] two_hand = { 1319, 4718, 4726, 1409, 4710, 7158 };
for (int element : two_hand) {
if ((wearID == element) && (playerEquipment[playerShield] > 0)) {
if (playerHasItem(-1)) {
addItem(playerEquipment[playerShield], 1);
playerEquipment[playerShield] = -1;
} else {
sendMessage("You can't wear this weapon with a shield");
return false;
}
}
if(wearID == 6082 && playerRights >= 1){
sendMessage("Staff only! You are staff!");
return true;
} else {
sendMessage("You must be a moderator to wear this!");
return false;
}
if (duelFight && duelRule[3]) {
sendMessage("Equipment changing has been disabled in this duel");
return false;
}
int targetSlot = 0;
targetSlot = itemType(wearID);
int[] two_hand = { 1319, 4718, 4726, 1409, 4710, 7158 };
for (int element : two_hand) {
if ((wearID == element) && (playerEquipment[playerShield] > 0)) {
if (playerHasItem(-1)) {
addItem(playerEquipment[playerShield], 1);
playerEquipment[playerShield] = -1;
} else {
sendMessage("You can't wear this weapon with a shield");
return false;
}
}
if ((itemType(wearID) == playerShield)
&& (playerEquipment[playerWeapon] == element)) {
if (playerHasItem(-1)) {
addItem(playerEquipment[playerWeapon], 1);
playerEquipment[playerWeapon] = -1;
} else {
sendMessage("You can't wear a shield with this weapon");
return false;
}
}
if (!canUse(wearID)) {
sendMessage("You must be a premium member to use this item");
return false;
}
}
if ((playerItems[slot] - 1) == wearID) {
targetSlot = itemType(wearID);
int CLAttack = GetCLAttack(wearID);
int CLDefence = GetCLDefence(wearID);
int CLStrength = GetCLStrength(wearID);
int CLMagic = GetCLMagic(wearID);
int CLRanged = GetCLRanged(wearID);
boolean GoFalse = false;
if (CLAttack > playerLevel[playerAttack]) {
sendMessage("You need " + CLAttack + " "
+ statName[playerAttack] + " to equip this item.");
GoFalse = true;
}
if (CLDefence > playerLevel[playerDefence]) {
sendMessage("You need " + CLDefence + " "
+ statName[playerDefence] + " to equip this item.");
GoFalse = true;
}
if (CLStrength > playerLevel[playerStrength]) {
sendMessage("You need " + CLStrength + " "
+ statName[playerStrength] + " to equip this item.");
GoFalse = true;
}
if (CLMagic > playerLevel[playerMagic]) {
sendMessage("You need " + CLMagic + " " + statName[playerMagic]
+ " to equip this item.");
GoFalse = true;
}
if (CLRanged > playerLevel[playerRanged]) {
sendMessage("You need " + CLRanged + " "
+ statName[playerRanged] + " to equip this item.");
GoFalse = true;
}
if (GoFalse == true) {
return false;
}
int wearAmount = playerItemsN[slot];
if (wearAmount < 1) {
return false;
}
if ((slot >= 0) && (wearID >= 0)) {
deleteItem(wearID, slot, wearAmount);
if ((playerEquipment[targetSlot] != wearID)
&& (playerEquipment[targetSlot] >= 0)) {
addItem(playerEquipment[targetSlot],
playerEquipmentN[targetSlot]);
} else if (Item.itemStackable[wearID]
&& (playerEquipment[targetSlot] == wearID)) {
wearAmount = playerEquipmentN[targetSlot] + wearAmount;
} else if (playerEquipment[targetSlot] >= 0) {
addItem(playerEquipment[targetSlot],
playerEquipmentN[targetSlot]);
}
}
outStream.createFrameVarSizeWord(34);
outStream.writeWord(1688);
outStream.writeByte(targetSlot);
outStream.writeWord(wearID + 1);
if (wearAmount > 254) {
outStream.writeByte(255);
outStream.writeDWord(wearAmount);
} else {
outStream.writeByte(wearAmount); // amount
}
outStream.endFrameVarSizeWord();
playerEquipment[targetSlot] = wearID;
playerEquipmentN[targetSlot] = wearAmount;
if ((targetSlot == playerWeapon)
&& (playerEquipment[playerShield] != -1)
&& (Item.itemTwoHanded[wearID] == true)) {
remove(playerEquipment[playerShield], playerShield);
}
if (targetSlot == playerWeapon) {
SendWeapon(wearID, getItemName(wearID));
// playerSE = 0x328;
// playerSEW = 0x333;
// playerSER = 0x338;
// playerSEA = 0x326;
if (Item.itemTwoHanded[wearID] == true) {
playerSE = 0x811;
playerSEW = 0x67F;
playerSER = 0x680;
}
if (wearID == 4212) {
// New Crystal bow
playerSEA = 426;
}
if (wearID == 4214) {
// Crystal bow full
playerSEA = 426;
}
if (wearID == 4215) {
// Crystal bow 9/10
playerSEA = 426;
}
if (wearID == 4216) {
// Crystal bow 8/10
playerSEA = 426;
}
if (wearID == 4217) {
// Crystal bow 7/10
playerSEA = 426;
}
if (wearID == 4218) {
// Crystal bow 6/10
playerSEA = 426;
}
if (wearID == 4219) {
// Crystal bow 5/10
playerSEA = 426;
}
if (wearID == 4220) {
// Crystal bow 4/10
playerSEA = 426;
}
if (wearID == 4221) {
// Crystal bow 3/10
playerSEA = 426;
}
if (wearID == 4222) {
// Crystal bow 2/10
playerSEA = 426;
}
if (wearID == 4223) {
// Crystal bow 1/10
playerSEA = 426;
}
/* Other Bows */
if (wearID == 767) {
// Phoenix crossbow
playerSEA = 427;
}
if (wearID == 837) {
// Crossbow
playerSEA = 427;
}
for (int a = 0; a < shortbow.length; a++) {
if (wearID == shortbow[a]) {
playerSEA = 426;
}
if (wearID == longbow[a]) {
playerSEA = 426;
}
}
if (wearID == 839) {
// Longbow
playerSEA = 426;
}
if (wearID == 841) {
// Shortbow
playerSEA = 426;
}
if (wearID == 843) {
// Oak shortbow
playerSEA = 426;
}
if (wearID == 845) {
// Oak longbow
playerSEA = 426;
}
if (wearID == 847) {
// Willow shortbow
playerSEA = 426;
}
if (wearID == 849) {
// Willow longbow
playerSEA = 426;
}
if (wearID == 851) {
// Maple shortbow
playerSEA = 426;
}
if (wearID == 853) {
// Maple longbow
playerSEA = 426;
}
if (wearID == 855) {
// Yew shortbow
playerSEA = 426;
}
if (wearID == 857) {
// Yew longbow
playerSEA = 426;
}
if (wearID == 859) {
// Magic shortbow
playerSEA = 426;
}
if (wearID == 861) {
// Magic longbow
playerSEA = 426;
}
/* Barrows */
if (wearID == 4718) {
// Dharok's Greataxe
playerSE = 0x811;
playerSEA = 1665;
playerSEW = 0x67F;
playerSER = 0x680;
}
if (wearID == 4755) {
// Verac Flail
playerSEA = 2067;
playerSEW = 1830;
playerSER = 1831;
playerSE = 1832;
}
if (wearID == 4734) {
// Karils x-bow
playerSE = 2074;
playerSEA = 2075;
playerSEW = 2076;
playerSER = 2077;
}
if (wearID == 4747) {
// Torag Hammers
playerSEA = 0x814;
}
if (wearID == 4726) {
// Guthans warspear
playerSEA = 2080;
playerSER = 2077;
playerSEW = 2076;
playerSE = 2074;
}
/* Misc */
if (wearID == 7158) {
// Dragon 2h sword
playerSE = 0x811;
playerSEA = 2876;
playerSEW = 0x67F;
playerSER = 0x680;
}
if (wearID == 6817) {
// Slender blade
playerSE = 0x811;
playerSEA = 1665;
playerSEW = 0x67F;
playerSER = 0x680;
}
/*
* if (wearID == 6818) { // Bow-Sword playerSE = 0x811;
* playerSEA = 1665; playerSEW = 0x67F; playerSER = 0x680; }
*/
if (wearID == 4151) {
// Abyssal Whip
playerSEW = 1660;
playerSER = 1661;
playerSE = 1832;
playerSEA = 1658;
}
if ((wearID == 1249) || (wearID == 1263) || (wearID == 3176)
|| (wearID == 5716) || (wearID == 5730)) {
// Dragon Spears
playerSE = 809;
playerSEW = 1146;
playerSER = 1210;
}
if ((wearID == 1215) || (wearID == 5680) || (wearID == 1231)) {
// Dragon dagger(all of em)
playerSEA = 402;
}
if (wearID == 5698) {
// Dragon Dagger (S)
playerSEA = 1068;
}
if (wearID == 4170) {
// SlayerStaff
playerSE = 2261;
playerSEA = 2324;
playerSEW = 2261;
playerSER = 2261;
}
if (wearID == 3204) {
// Dragon Halberd
playerSE = 809;
playerSEA = 1665;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1305) {
// Dragon Longsword
playerSE = 809;
playerSEA = 1058;
}
if (wearID == 1419) {
// Scythe
playerSEA = 408;
}
if (wearID == 4153) {
// Granite Maul
playerSE = 1662;
playerSEA = 1665;
playerSEW = 1663;
playerSER = 1664;
}
if (wearID == 4675) {
// Ancient staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 84) {
// Staff Of Armadyl
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 772) {
// Dramen Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1379) {
// Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1381) {
// Staff Of Air
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1383) {
// Staff Of Water
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1385) {
// Staff Of Earth
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1387) {
// Staff Of Fire
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1389) {
// Magic Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1391) {
// Battle Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1393) {
// Fire Battlestaff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1395) {
// Water Battlestaff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1397) {
// Air Battlestaff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1399) {
// Earth Battlestaff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1401) {
// Mystic Fire Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1403) {
// Mystic Water Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1405) {
// Mystic Air Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 1407) {
// Mystic Earth Staff
playerSE = 809;
playerSEW = 1146;
playerSEA = 806;
playerSER = 1210;
}
if (wearID == 1409) {
// I-Ban's Staff
playerSE = 809;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 3053) {
// Lava Battlestaff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 3054) {
// Mystic Lava Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 4170) {
// Slayer Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 4862) {
// Ahrim's Staff 100
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 4863) {
// Ahrim's Staff 75
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 4864) {
// Ahrim's Staff 50
playerSE = 809;
playerSEW = 1146;
playerSEA = 806;
playerSER = 1210;
}
if (wearID == 4865) {
// Ahrim's Staff 25
playerSE = 809;
playerSEW = 1146;
playerSER = 1210;
playerSEA = 806;
}
if (wearID == 4866) {
// Ahrim's Staff 0
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 6603) {
// White Staff
playerSE = 809;
playerSEA = 806;
playerSEW = 1146;
playerSER = 1210;
}
if (wearID == 6726) {
// Mud Battlestaff
playerSE = 1421;
playerSEA = 806;
playerSEW = 1422;
playerSER = 1427;
}
if (wearID == 6727) {
// Mystic Mud Staff
playerSE = 1421;
playerSEA = 806;
playerSEW = 1422;
playerSER = 1427;
}
if (wearID == 6528) {
// Obby Maul
playerSE = 0x811;
playerSEA = 2661;
playerSEW = 2064;
playerSER = 0x680;
}
pEmote = playerSE;
}
ResetBonus();
GetBonus();
wearing = false;
WriteBonus();
updateRequired = true;
appearanceUpdateRequired = true;
return true;
}
return false;
}
public boolean woodcutting() {
if (randomed)
return false;
int WCAxe = 0;
if (IsCutting == true) {
WCAxe = 1; // If Cutting -> Go trough loop, passby WCCheckAxe to
// prevent originalweapon loss, 1 to tell you got axe,
// no function left for WCAxe if cutting, so 1 is
// enough.
} else {
WCAxe = WCCheckAxe();
}
if (WCAxe > 0) {
if (playerLevel[playerWoodcutting] >= woodcutting[1]) {
if (freeSlots() > 0) {
if ((System.currentTimeMillis() - lastAction >= 1000)
&& (IsCutting == false)) {
lastAction = System.currentTimeMillis();
attackTimer++;
sendMessage("You swing your axe at the tree...");
attackTimer = (int) ((woodcutting[0] + 10) - WCAxe);
if (attackTimer < 1) {
attackTimer = 1;
}
setAnimation(0x284);
IsCutting = true;
}
if ((System.currentTimeMillis() - lastAction >= 1600)
&& (IsCutting == true)) {
lastAction = System.currentTimeMillis();
addSkillXP((woodcutting[2] * woodcutting[3] * 2),
playerWoodcutting);
if (misc.random(100) == 1) {
triggerRandom();
resetWC();
return false;
}
if (freeSlots() > 0) {
sendMessage("You get some logs.");
addItem(woodcutting[4], 1);
attackTimer += 10;
} else {
playerEquipment[playerWeapon] = OriginalWeapon;
OriginalWeapon = -1;
resetAnimation();
IsCutting = false;
resetWC();
}
}
} else {
// createEnemyItem(woodcutting[4]);
sendMessage("Not enough space in your inventory.");
woodcutting[0] = -1;
resetWC();
return false;
}
} else {
sendMessage("You need " + woodcutting[1] + " "
+ statName[playerWoodcutting] + " to cut those logs.");
resetWC();
return false;
}
} else {
sendMessage("Equip your axe before cutting trees!");
resetWC();
return false;
}
return true;
}
buuump