Esempio n. 1
0
        public bool ResetCharacterStatSkill()
        {
            OldPacket pkt = new OldPacket(PacketFamily.StatSkill, PacketAction.Junk);

            pkt.AddInt(1234); //shop ID, ignored by eoserv - eomain may require this to be correct
            return(!m_client.ConnectedAndInitialized || !Initialized || m_client.SendPacket(pkt));
        }
Esempio n. 2
0
        public bool JunkItem(short id, int amount)
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Junk);

            pkt.AddShort(id);
            pkt.AddInt(amount);

            return(m_client.SendPacket(pkt));
        }
Esempio n. 3
0
        /// <summary>
        /// Add an item to a pending trade offer
        /// </summary>
        /// <param name="itemID">Item ID of the item to add</param>
        /// <param name="amount">Amount of the item to add</param>
        public bool TradeAddItem(short itemID, int amount)
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Trade, PacketAction.Add);

            pkt.AddShort(itemID);
            pkt.AddInt(amount);

            return(m_client.SendPacket(pkt));
        }
Esempio n. 4
0
        public bool ForgetSpell(short spellID)
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.StatSkill, PacketAction.Remove);

            pkt.AddInt(1234); //shop ID, ignored by eoserv - eomain may require this to be correct
            pkt.AddShort(spellID);

            return(m_client.SendPacket(pkt));
        }
Esempio n. 5
0
        public bool DoCastSelfSpell(short spellID)
        {
            if (spellID < 0)
            {
                return(false);
            }

            if (!Initialized || !m_client.ConnectedAndInitialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Spell, PacketAction.TargetSelf);

            pkt.AddChar(1); //target type
            pkt.AddShort(spellID);
            pkt.AddInt(DateTime.Now.ToEOTimeStamp());

            return(m_client.SendPacket(pkt));
        }
Esempio n. 6
0
        public bool DropItem(short id, int amount, byte x = 255, byte y = 255) //255 means use character's current location
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Drop);

            pkt.AddShort(id);
            pkt.AddInt(amount);
            if (x == 255 && y == 255)
            {
                pkt.AddByte(x);
                pkt.AddByte(y);
            }
            else
            {
                pkt.AddChar(x);
                pkt.AddChar(y);
            }

            return(m_client.SendPacket(pkt));
        }