Thread: [Dodian] item on object won't work

Results 1 to 3 of 3
  1. #1 [Dodian] item on object won't work 
    Extreme Donator


    Join Date
    Nov 2007
    Posts
    2,712
    Thanks given
    47
    Thanks received
    9
    Discord
    View profile
    Rep Power
    650
    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++
    Reply With Quote  
     

  2. #2  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    I've no idea lol, i don't work with 'common' servers (dodian, emulous etc) so i'm unfamiliar with them, it all looks a big mess either way.

    Reply With Quote  
     

  3. #3  
    Registered Member Glabay's Avatar
    Join Date
    Jul 2008
    Age
    31
    Posts
    1,212
    Thanks given
    141
    Thanks received
    55
    Discord
    View profile
    Rep Power
    455
    Why not make it so if you have the item in your inventory?

    Code:
    			if (UsedOnObjectID == 3830) {
    				if (playerHasItem(954)) {
    					setAnimation(828);
    					teleportToX = 3507;
    					teleportToY = 9494;
    					heightLevel = 0;
    					sendMessage("You climb down the Rope and Enter the Kalphite Lair.");
    				} else {
    					sendMessage("You need a Rope to climb down here.");
    				}
    			}
    Or.

    Code:
    			if (UsedOnObjectID == 3830) {
    				if (!playerHasItem(954)) {
    					sendMessage("You need a Rope to climb down here.");
    						return;
    				} else {
    					setAnimation(828);
    					teleportToX = 3507;
    					teleportToY = 9494;
    					heightLevel = 0;
    					sendMessage("You climb down the Rope and Enter the Kalphite Lair.");
    				}
    			}
    PI * 13.37 = 42
    There are 10 kinds of people; those who know Binary and those who don't
    Why programmers confuse Christmas and Halloween; Because 31 OCT = 25 DEC.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •