Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • _^_: guys i just want you to know that icepush has a reddit now [link]
      February 17, 2019, 09:43:26 PM
    • jme: ask Mopman for help
      February 17, 2019, 09:29:21 PM
    • jme: irc.moparisthebest.com:+6697
      February 17, 2019, 09:28:40 PM
    • jme: oi
      February 17, 2019, 09:28:06 PM
    • lare69: dead af lol
      February 13, 2019, 09:54:56 PM
    • lare69: wtf happened here
      February 13, 2019, 09:54:46 PM
    • SnowRSPS: Join Our Discord: [link] - Open 24.7
      February 08, 2019, 05:40:53 PM
    • SnowRSPS: SnowRSPS is a Custom 07 Runescape remake private server Online 24.7 since 2012, We were known as *Snow317* for years, but now we own all Snow names, and will continue to Grow! Join us Anytime. SnowPS.org | Snow317.com | Snowscape.net | SnowRSPS.com - 1000+ Custom Items - 20+ Bosses - AutoDonations - & Daily Updates! Join Our Discord: [link]
      February 08, 2019, 05:40:35 PM
    • SnowRSPS: SnowRSPS is a Custom 07 Runescape remake private server Online 24.7 since 2012, We were known as *Snow317* for years, but now we own all Snow names, and will continue to Grow! Join us Anytime. SnowPS.org | Snow317.com | Snowscape.net | SnowRSPS.com - 1000+ Custom Items - 20+ Bosses - AutoDonations - & Daily Updates! Join our discord! : [link]
      February 08, 2019, 05:39:49 PM
    • Scully: This forum is more dead than I could have imagined lol.
      February 06, 2019, 08:19:38 PM
    • Scully: Sup fam
      February 06, 2019, 08:05:49 PM
    • usman555: hey how's everyone doing
      February 04, 2019, 04:23:50 PM
    • _^_: i am coming here every few days and just letting everyone know we are still around
      February 03, 2019, 07:52:03 PM
    • DeathsChaos9::palm:
      February 02, 2019, 11:12:47 PM
    • divinity-os:[link][link][link][link][link]
      January 31, 2019, 11:05:35 AM
    • divinity-os:[link]
      January 31, 2019, 11:05:00 AM
    • Travas: BUILD THE WALL
      January 29, 2019, 11:24:21 AM
    • Wilkooo: YEET
      January 23, 2019, 09:29:54 PM
    • Combatx: anyone here?
      January 21, 2019, 04:34:06 PM
    • SnowRSPS:[link][link][link][link][link][link][link]
      January 18, 2019, 08:23:50 PM

    Author Topic: [718+] Floor Item Examining + Packets  (Read 133 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineTeamPositive

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +10/-10
      • View Profile
    [718+] Floor Item Examining + Packets
    « on: October 28, 2018, 04:33:59 PM »
    Being that I spent many hours working with this, trying to figure out what exactly was the issue and why it wouldn't work, I've decided to share this information with you all so that it may save you both the time and trouble. Furthermore, because I only have seen one snippet pertinent towards item floor examining and the amount of 718 revisions+ that have ground item examining are slim to none.

    What was the issue? Well, as most of you are surely aware, client packets must be precise. The variables were not.
    NOTE: If you either used this or if this helped you in ANY way, please don't hesitate to give thanks (its FREE!)



    First you'll need to declare your packets+size inside WPD:
    Code: [Select]
        private final static int ITEM_ON_FLOOR_EXAMINE = 102;
    Then add this under processPackets method:
    Code: [Select]
            } else if (packetId == ITEM_ON_FLOOR_EXAMINE) {
                int y = stream.readUnsignedShort(); //CLIENT SENDS THEM BACKWARDS ON PURPOSE
                int x = stream.readUnsignedShortLE();
                int id = stream.readUnsignedShort();
                boolean forceRun = stream.readUnsigned128Byte() == 1;
                player.getPackets().sendItemMessage(0, 15263739, id, x, y, ItemExamines.getExamine(new Item(id))); // ChatboxMessage

    Inside WPE:
    Code: [Select]
        public void sendItemMessage(int border, int colour, int id, int x, int y, String message) {
            sendGameMessage(message);
            sendGlobalString(306, message);
            sendGlobalConfig(1699, colour); //"color" - Default; 1 - Black
            sendGlobalConfig(1700, border); //"border" - Default; 0 - White; 1 - Red; 2 - No Border
            sendGlobalConfig(1695, 1);
            sendItemInterface(new Item(id), new WorldTile(x, y, player.getPlane()), true, 746, 0, 1177);
        }

        public void sendItemInterface(Item item, WorldTile tile, boolean noclipped, int windowId, int windowComponentId, int interfaceId) {
            int[] xteas = new int[4];
            OutputStream stream = new OutputStream(30);
            stream.writePacket(player, 36);
            stream.writeByte128(noclipped ? 1 : 0);
            stream.writeIntV2(xteas[0]);
            stream.writeIntLE((windowId << 16) | windowComponentId);
            stream.writeIntV1(xteas[1]);
            stream.writeShort(item.getId());
            stream.writeIntV1(xteas[2]);
            stream.writeInt(xteas[3]);
            stream.writeShortLE(interfaceId);
            stream.writeInt((tile.getPlane() << 28) | (tile.getX() << 14) | tile.getY());
            session.write(stream);
        }


    (click to show/hide)
    « Last Edit: October 28, 2018, 04:43:23 PM by TeamPositive »
    Runescape Gambling

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal