Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • nervo: wow its been awhile since i've logged in
      December 18, 2018, 04:33:19 PM
    • Salayor: o.O
      December 13, 2018, 01:02:33 AM
    • ZHer0kool: This is by far one of my oldest existing forum accounts
      December 12, 2018, 08:40:43 PM
    • DeathsChaos9::|
      December 12, 2018, 06:41:54 PM
    • TheMane221: Dont know if this is allowed but I have an OSRS account I need to sell asap. 95 att, 92 str, 93 def, 94 hp, 77 range and 73 magic. Dm me please.
      December 09, 2018, 04:27:28 PM
    • runescape3dude: I haven't been on here in about 10 years
      December 08, 2018, 11:14:56 PM
    • runescape3dude: holy crap
      December 08, 2018, 11:14:47 PM
    • howi: Gosh i never been on this site since... ever
      December 08, 2018, 01:36:16 AM
    • TinyScape: ur gay
      December 07, 2018, 09:03:26 PM
    • Travas: drub is gay
      December 02, 2018, 11:48:32 PM
    • drubrkletern: asdf
      November 27, 2018, 02:44:00 PM
    • Black Paw: TokHaar aims to give you the best OSRS features in Real High Definition with a mixture of 550 content! (Quality Driven RSPS) -- Come join us for → PvP, PvMing, Skilling, Prosperous Economy, Minigames/Bosses & Much more.. [link]
      November 21, 2018, 06:55:31 PM
    • i5hy: AllstarLegends - Oldschool Nostalgia @ Allstarlegends.eu Long Lasting server been around since 2013-2014
      November 21, 2018, 01:49:59 PM
    • lordvirius: Is there a mobile private server?
      November 21, 2018, 09:34:33 AM
    • Coldmedicine: FREE ADVERTISEMENT ON DISCORD
      November 20, 2018, 03:30:50 AM
    • Coldmedicine:[link]
      November 20, 2018, 03:30:42 AM
    • Coldmedicine: ...
      November 20, 2018, 03:24:02 AM
    • dylanwill: message me bros
      November 19, 2018, 04:49:29 PM
    • dylanwill: I got banned from runeserver
      November 19, 2018, 04:49:08 PM
    • Wayne.RSPS: TokHaar aims to give you the best OSRS features in Real High Definition with a mixture of 550 content! (Quality Driven RSPS) -- Come join us for → PvP, PvMing, Skilling, Prosperous Economy, Minigames/Bosses & Much more.. [link]
      November 16, 2018, 11:24:39 AM

    Author Topic: [718+] Floor Item Examining + Packets  (Read 80 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