Example #1
0
        void dropStack(string[] args)
        {
            functions lookup = new functions();

            Classes.Item thisitem = null;

            if (!lookup.isNumeric(args[2]))
            {
                return;
            }

            foreach (Classes.Item b in Mainform.inventory)
            {
                if (b.slot == (short.Parse(args[2])))
                {
                    thisitem = b;
                    break;
                }
            }

            if (thisitem == null)
            {
                return;
            }

            Packets.ClickWindow click  = new Packets.ClickWindow(Socket, Mainform, short.Parse(args[2]), 0, 0, thisitem);
            Packets.ClickWindow click2 = new Packets.ClickWindow(Socket, Mainform, -999, 0, 0, thisitem); //Slot -999 is outside window click, which drops it.
        }
Example #2
0
        public creativeInventory(Wrapped.Wrapped socket, Form1 mainform)
        {
            functions helper = new functions();

            int slot = socket.readShort();

            Classes.Item thisitem = helper.returnSlot(socket);

            if (slot == -1)
            {
                ClickWindow click2 = new ClickWindow(socket, mainform, -999, 0, 0, thisitem);
            }
        }
        public ConfirmTransaction(Wrapped.Wrapped socket, Form1 mainform)
        {
            // Should only be sent if we actually receive one with a "false" for accepted.
            byte  windowID     = socket.readByte();
            short actionNumber = socket.readShort();
            bool  accepted     = socket.readBool();

            if (accepted == false)
            {
                socket.writeByte(0x6A);
                socket.writeByte(windowID);
                socket.writeShort(actionNumber);
                socket.writeBool(accepted);
                ClickWindow cw = new ClickWindow(socket, mainform, -999, 0, 0, null); // If we're holding something on our cursor, drop it.
            }
        }