My current item on object won't work.
My method.
Code:
case 192: // Use an item on an object
junk = inStream.readSignedWordBigEndianA();
int UsedOnObjectID = inStream.readUnsignedWordBigEndian();
int UsedOnY = inStream.readSignedWordBigEndianA();
int ItemSlot = (inStream.readSignedWordBigEndianA() - 128);
int UsedOnX = inStream.readUnsignedWordBigEndianA();
int ItemID = inStream.readUnsignedWord();
if(!playerHasItem(ItemID)) break;
if(UsedOnObjectID == 3994 && !blockSmithing){
for(int fi = 0; fi < misc.smelt_frame.length; fi++)
sendFrame246(misc.smelt_frame[fi], 150, misc.smelt_bars[fi]);
sendFrame164(2400);
//smelting = true;
//smelt_id = ItemID;
} else if(UsedOnObjectID == 3994 && blockSmithing) {
sendMessage("Smiting has been disabled for mopar clients due to duping command.");
}
if (UsedOnObjectID == 2781 || UsedOnObjectID == 2728) { // furnace, range
if (/*CheckForSkillUse2(ItemID, ItemSlot) ==*/ true) {
skillX = UsedOnX;
skillY = UsedOnY;
checkCooking(ItemID);
}
} else if (UsedOnObjectID == 2783) { // anvil
int Type = CheckSmithing(ItemID, ItemSlot);
if (Type != -1) {
skillX = UsedOnX;
skillY = UsedOnY;
OpenSmithingFrame(Type);
}
} else {
println_debug(
"Item: " + ItemID + " - Used On Object: "
+ UsedOnObjectID + " - X: " + UsedOnX + " - Y: "
+ UsedOnY);
}
Then I try adding this to it.
Code:
if (UsedOnObjectID == 3830 && ItemID == 954) {
setAnimation(828);
teleportToX = 3507;
teleportToY = 9494;
heightLevel = 0;
sendMessage("You climb down the Rope and Enter the Kalphite Lair.");
}
And it doesn't work. ANy1 hlp? will rep++