Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • puppajohn: Come and join us today for amazing content !
      August 16, 2019, 10:26:16 PM
    • puppajohn:[link] come and join us now! you have donator on your server? no problem we restore your donator credits and symbol ! free M box on loggins
      August 16, 2019, 10:26:02 PM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW || EP GETS YOU OSRS GP TOKENS
      August 15, 2019, 05:13:07 PM
    • hodford: autoscape,0rg is actually fudgein lit as come check it out
      August 13, 2019, 02:59:58 AM
    • ragnoroker: Brand new server! Hosting Raids Event all day + More! - 20+ online, Join today [link]
      August 11, 2019, 07:45:49 AM
    • ragnoroker: Brand new server! Hosting Raids Event all day + More! - 20+ online, Join today [link]
      August 11, 2019, 07:45:46 AM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW
      August 08, 2019, 07:29:43 PM
    • ragnoroker:Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today [link]
      August 08, 2019, 11:05:53 AM
    • ragnoroker:Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today [link]
      August 08, 2019, 11:05:46 AM
    • asshole_rule: bernie sanders
      August 06, 2019, 07:54:02 PM
    • PavSwag: #AS 100M OSRS GP GIVEAWAY!! [link] 317 Oldschool RuneScape Private Server emulating core factors of the game with a strong economy and balance of experience to bossing and prestiging -Receive DONATOR Perks by maxing to 99s- Lumbridge remade - Login with a starter set of armour and items - PK District - Preloading sets - Activity points for training - All Skills Working, Skilling Island, Skilling Pets, Skilling Rewards - All Working Max Capes - 25+ Bosses with Pets - Superior Slayer Encounters - Player Owned Shops - Minigames, Construction, Sawmill, Warriors Guild, Pest Control, Barrows (with pets), Fight Caves, Inferno Caves, Chambers of Xeric, Custom Raids - NPC Drop Table, Kills Tracker, Points Tracker, Extra settings. - Doubled Xp & Points Weekends - Vote System - Vote4Donor - Competitive Highscores - Tons of Content - Join us today for bonus giveaways and free ultra mystery box upon login!   Official YouTube Media: [youtube]P5D0eXEmjA4[/youtube] Join NOW Ill personally give you Ultra Mystery Boxes (Twisted Bow??) Im the Developer :smiley: Heres the Discord:  [link] BTW 100m OSRS GP Giveaways WEEKLY!
      August 05, 2019, 01:05:53 PM
    • ragnoroker: Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today :) - [link]
      August 05, 2019, 12:48:52 PM
    • ragnoroker: Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today :) - [link]
      August 05, 2019, 12:48:47 PM
    • suelo: does the search not work on here?
      August 05, 2019, 02:12:08 AM
    • PavSwag: #AS 100M OSRS GP GIVEAWAY!! [link] 317 Oldschool RuneScape Private Server emulating core factors of the game with a strong economy and balance of experience to bossing and prestiging -Receive DONATOR Perks by maxing to 99s- Lumbridge remade - Login with a starter set of armour and items - PK District - Preloading sets - Activity points for training - All Skills Working, Skilling Island, Skilling Pets, Skilling Rewards - All Working Max Capes - 25+ Bosses with Pets - Superior Slayer Encounters - Player Owned Shops - Minigames, Construction, Sawmill, Warriors Guild, Pest Control, Barrows (with pets), Fight Caves, Inferno Caves, Chambers of Xeric, Custom Raids - NPC Drop Table, Kills Tracker, Points Tracker, Extra settings. - Doubled Xp & Points Weekends - Vote System - Vote4Donor - Competitive Highscores - Tons of Content - Join us today for bonus giveaways and free ultra mystery box upon login!   Official YouTube Media: [youtube]P5D0eXEmjA4[/youtube] Join NOW Ill personally give you Ultra Mystery Boxes (Twisted Bow??) Im the Developer :smiley: Heres the Discord:  [link] BTW 100m OSRS GP Giveaways WEEKLY!
      August 04, 2019, 11:48:39 PM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW?
      August 04, 2019, 11:21:52 PM
    • ragnoroker:Brand new server! - 20+ online, Many events tonight :) come join the fun. [link]!
      August 04, 2019, 12:39:24 PM
    • ragnoroker:Brand new server! - 20+ online, Many events tonight :) come join the fun. [link]!
      August 04, 2019, 12:39:18 PM
    • ragnoroker:Brand new server! - 20+ online, Many events tonight :) come join the fun. [link]!
      August 04, 2019, 12:39:13 PM
    • hodford: www generic-x.c 0m
      August 04, 2019, 02:35:58 AM

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