[Tutorial] c# Loot frame - the enumerator items and Number of coins menu

User Tag List

Results 1 to 1 of 1
  1. #1
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    [Tutorial] c# Loot frame - the enumerator items and Number of coins

    why you need to - determine whether the open-frame with the loot, the number of coins and lists the items lying in it

    uint Loot_frame = 0xA0A024, //4.0.6.13596

    Code:
    #region using
    using System;
    using System.Collections.Generic;
    using System.Runtime.InteropServices;
    #endregion
    public class LootFrame
    {
        WOW wow;
        uint lf_base;
        public string base_adr { get { return String.Format("{0:x2}", lf_base); } }
    
        public bool coins_looted { get; set; }
        public uint copper
        {
            get
            {
                uint count = wow.Read<uint>(lf_base + 860);
                if (count == uint.MaxValue)
                {
                    coins_looted = true;
                    return 0;
                }
                else
                {
                    coins_looted = false;
                    return count;
                }
            }
        }
        public List<Loot> loot
        {
            get
            {
                List<Loot> list = new List<Loot>();
                wow_loot wloot = new wow_loot();
                Loot loot = new Loot();
                int count = 0;
                while ((wloot = wow.Read<wow_loot>((uint)(lf_base + (wloot.Size * count)))).id > 0)
                {
                    loot = new Loot();
                    loot.id = wloot.id;
                    loot.type = wloot.type;
    
                    list.Add(loot);
                    count++;
                }
                return list;
            }
    
        }
        public LootFrame(WOW _wow)
        {
            wow = _wow;
            lf_base = wow.base_adr + (uint)Offs.Player.Loot_frame; //0xA0A024 in 4.0.6.13596
            wow.ed.pg_loot.SelectedObject = this;
        }
    }
    
    [StructLayout(LayoutKind.Sequential)]
    public struct wow_loot
    {
        public uint id;//0-4
        public uint hz;//4-8
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16 - 8)]
        public byte[] b;
        public uint hz2;//16-20
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24 - 20)]
        public byte[] b2;
        public uint type; //24-28
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 36 - 28)]
        public byte[] b3;
        public int Size { get { return Marshal.SizeOf(this); } } //36
    }
    public struct Loot //36
    {
        public uint id; // item id in ItemBD, >>http://www.wowhead.com/item=56968
        public uint type;
        public override string ToString()
        {
            return id.ToString();
        }
    }
    how to use the example
    Code:
    #region LOOT
        bool loot_started;
        int loot_tik;
        void Loot(Unit unit) //Key '+' /script c=GetNumLootItems(); for i=0, c do LootSlot(i+1);ConfirmLootSlot(i+1);end; 
        {
            if (loot_started == false)
            {
                loot_tik = 0;
                Log("Loot[Start] " + unit.guid);
                Post.Press(VK.ADD); //<< Key '+'
                loot_started = true;
                return;
            }
            if (loot_window.loot.Count != 0 || loot_window.copper != 0) //еше не залутал
            {
                loot_tik++;
                if (debug) Log("Loot[" + loot_tik + "] " + unit.guid);
            }
            else
            {
                Log("Loot Done[" + loot_tik + "] " + unit.guid);
                task.actions.RemoveAt(0);
                loot_started = false;
                looted_done.Add(unit);
            }
    
            if (can_skin && unit.Creature == CreatureType.Beast)
            {
                task.actions.Add(Action.Skin);
            }
            if (task.actions.Count == 0)
                task = null;
        } 
        #endregion
    Last edited by GameAssist; 02-09-2011 at 03:40 AM.

    [Tutorial] c# Loot frame - the enumerator items and Number of coins

Similar Threads

  1. [Exploit]Gem items and keep the gems to use again
    By Zifa in forum Age of Conan Exploits|Hacks
    Replies: 91
    Last Post: 09-10-2008, 04:58 PM
  2. [Theory] Buy an arena item and "keep" the points.
    By condordanish in forum World of Warcraft Exploits
    Replies: 26
    Last Post: 06-18-2008, 05:15 AM
  3. request about the bare feet and item swap at 2.4
    By ccsk in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 03-31-2008, 07:27 AM
  4. Equip 4 of the same item and get stats for all
    By Stinja1 in forum WoW EMU Guides & Tutorials
    Replies: 12
    Last Post: 10-24-2007, 07:40 PM
All times are GMT -5. The time now is 04:32 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search