Results 1 to 9 of 9

Thread: Help - MMH doesnt work?

  1. #1
    iBot User
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    86
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    11 Post(s)
    Reputation
    15
    Rep Power
    5

    Help - MMH doesnt work?

    hey guys, i copied a MMH script from one script to another because i need it in this one

    but when i copy it it doesnt work, in the original it does

    whats wrong? heres a screenshot of my ibot after i copied it



    and here the script

    Code:
    -- [[ INIT START ]] --
        --
        --                       88                                                                
        --                       ""                                                ,d              
        --                                                                         88              
        --            ,adPPYba,  88  8b,dPPYba,  88,dPYba,,adPYba,   ,adPPYYba,  MM88MMM  ,adPPYba,
        --            I8[    ""  88  88P'   "Y8  88P'   "88"    "8a  ""     `Y8    88    a8P_____88
        --             `"Y8ba,   88  88          88      88      88  ,adPPPPP88    88    8PP"""""""
        --            aa    ]8I  88  88          88      88      88  88,    ,88    88,   "8b,   ,aa
        --   Author:  `"YbbdP"'  88  88          88      88      88  `"8bbdP"Y8    "Y888  `"Ybbd8"'
        --   
        --   Monitor My Hunting!
        --
        --   Version: 1.0
        --   Created: 7.09.2012
        --   Last update: 18.09.2012
        --
        
        MONITOR_MY_HUNTING = MONITOR_MY_HUNTING or {
            SCRIPT_NAME = "Dragon Lords",
            SCRIPT_VERSION = "1.0 by NWA",
            
            CLEARED_STATS = false,
            INITIALIZED = false,
        }
    
        MONITOR_MY_HUNTING.SHOW_ALL_ITEMS = false
        MONITOR_MY_HUNTING.ITEMS_LIST = {
        {NAME = "gold coin", VALUE = 1},
        {NAME = "platinum coin", VALUE = 100},
           {NAME = "Dragon Scale Mail", VALUE = 40000},
           {NAME = "Royal Helmet", VALUE = 30000},
           {NAME = "Dragon Slayer", VALUE = 15000},
           {NAME = "Dragon Lord Trophy", VALUE = 10000},
           {NAME = "Tower Shield", VALUE = 8000},
           {NAME = "Dragon Shield", VALUE = 4000},
           {NAME = "Fire Sword", VALUE = 4000},
           {NAME = "Dragonbone Staff", VALUE = 3000},
           {NAME = "Wand of Inferno", VALUE = 3000},
           {NAME = "Dragon Hammer", VALUE = 2000},
           {NAME = "Serpent Sword", VALUE = 1000},
           {NAME = "Zaoan Armor", VALUE = 14000},
           {NAME = "Zaoan Legs", VALUE = 14000},
           {NAME = "Zaoan Shoes", VALUE = 5000},
           {NAME = "Small Diamond", VALUE = 300},
           {NAME = "Small Emerald", VALUE = 250},
           {NAME = "Small Sapphire", VALUE = 250},
           {NAME = "Dragon's Tail", VALUE = 100},
           {NAME = "Red Dragon Scale", VALUE = 200},
           {NAME = "Red Dragon Leather", VALUE = 200},
           {NAME = "Green Dragon Scale", VALUE = 100},
           {NAME = "Green Dragon Leather", VALUE = 100},
           {NAME = "High Guard Flag", VALUE = 550},
           {NAME = "High Guard Shoulderplates", VALUE = 130},
           {NAME = "Spiked Iron Ball", VALUE = 100},
        }
     
        MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES = false
        MONITOR_MY_HUNTING.SUPPLIES_LIST = {
            {NAME = "Great Mana Potion", PRICE = 120},
            {NAME = "Strong Mana Potion", PRICE = 80},
            {NAME = "Sudden Death Rune", PRICE = 108},
        }
        
        -- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --
        
        MONITOR_MY_HUNTING.TEMP_ITEMS_LIST = MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or {}
        MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST or {}
        MONITOR_MY_HUNTING.COLORS = MONITOR_MY_HUNTING.COLORS or {
            BLACK = rgbcolor(1, 1, 1),
            ORANGE = rgbcolor(255, 165, 0),
            BLUE = rgbcolor(30, 144, 255),
            CORNSILK = rgbcolor(205, 200, 177),
            WHITE = rgbcolor(255, 255, 255),
            GREEN = rgbcolor(107, 142, 35),
            RED = rgbcolor(178, 34, 34),
        }
        
        local function CreateMessageObject(MESSAGE_DATA)
            if (type(MESSAGE_DATA) ~= "userdata") then
                return setmetatable({__data = {TYPE = -1, TIME_STAMP = -1, SENDER_NAME = "", SENDER_LEVEL = -1, CONTENT = ""}}, MessageMetaTable)
            else
                return setmetatable({__data = {TYPE = MESSAGE_DATA.type, TIME_STAMP = Misc.ConvertToSeconds(string.sub(MESSAGE_DATA.text, 1, 5)), SENDER_NAME = MESSAGE_DATA.sender,  SENDER_LEVEL = tonumber((tostring(string.match(MESSAGE_DATA.text, ".+ (%b[]): .+")):gsub("[^%d]", ""))) or 0, CONTENT = string.sub(MESSAGE_DATA.text, 7)}}, MessageMetaTable)
            end
        end
        
        local function addtextshadow(DISPLAY_TEXT, X_OFFSET, Y_OFFSET, FONT_COLOR)
            setfontcolor(MONITOR_MY_HUNTING.COLORS.BLACK)
            addtext(DISPLAY_TEXT, X_OFFSET + 1, Y_OFFSET + 1)
            setfontcolor(FONT_COLOR)
            addtext(DISPLAY_TEXT, X_OFFSET, Y_OFFSET)
        end
    -- [[ INIT END ]] --
    
    if (not Stats.Update()) then
        local SERVER_LOG_MESSAGES = getnewmessages("Server Log")
        local SERVER_LOG_MESSAGES_COUNT = SERVER_LOG_MESSAGES.count - 1
        
        for INDEX = 0, SERVER_LOG_MESSAGES_COUNT do
            local MESSAGE_OBJECT = CreateMessageObject(SERVER_LOG_MESSAGES[SERVER_LOG_MESSAGES_COUNT - INDEX])
            
            if (MESSAGE_OBJECT:Type() == 19 and MESSAGE_OBJECT:Content():lower():match("^loot of")) then
                local LOOT_INFO = Message.ParseLootMessage(MESSAGE_OBJECT, true)
    
                if (#LOOT_INFO.NAME > 0) then
                    Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] = (Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] or 0) + 1
                    
                    for _, LOOT_ITEM in ipairs(LOOT_INFO.ITEMS) do
                        if (Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID]) then
                            Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY = Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY + LOOT_ITEM.QUANTITY
                        else
                            Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID] = {ID = LOOT_ITEM.ID, NAME = LOOT_ITEM.NAME, QUANTITY = LOOT_ITEM.QUANTITY, VALUE = Item.GetValue (LOOT_ITEM.ID)}
                        end
                    end
                end
            end
        end
    end
    
    local RESET_ITEMS_AND_SUPPLIES = #MONITOR_MY_HUNTING.ITEMS_LIST ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or #MONITOR_MY_HUNTING.SUPPLIES_LIST ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST
    
    if (not RESET_ITEMS_AND_SUPPLIES) then
        for INDEX, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
            if (LOOT_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].NAME or LOOT_ITEM.VALUE ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].VALUE) then
                RESET_ITEMS_AND_SUPPLIES = true
                break
            end
        end
    end
    
    if (not RESET_ITEMS_AND_SUPPLIES) then
        for INDEX, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
            if (SUPPLY_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].NAME or SUPPLY_ITEM.PRICE ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].PRICE) then
                RESET_ITEMS_AND_SUPPLIES = true
                break
            end
        end
    end
    
    if (not MONITOR_MY_HUNTING.INITIALIZED or RESET_ITEMS_AND_SUPPLIES) then
        if (not MONITOR_MY_HUNTING.CLEARED_STATS) then
            Stats.Clear(CLEAR_STATS_ALL)
            Stats.Update()
            
            MONITOR_MY_HUNTING.CLEARED_STATS = true
        end
        
        MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = {}, {}
            
        for _, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
            local LOOT_ITEM_ID = Item.GetID(type(LOOT_ITEM.NAME) ~= "table" and LOOT_ITEM.NAME or unpack(LOOT_ITEM.NAME))
            
            Stats.AddItemsLooted(LOOT_ITEM_ID, 0, LOOT_ITEM.VALUE)
            table.insert(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, {ID = LOOT_ITEM_ID, NAME = LOOT_ITEM.NAME, VALUE = LOOT_ITEM.VALUE})
        end
         
        for _, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
            local SUPPLY_ITEM_ID = Item.GetID(type(SUPPLY_ITEM.NAME) ~= "table" and SUPPLY_ITEM.NAME or unpack(SUPPLY_ITEM.NAME))
            
            Stats.AddSuppliesUsed(SUPPLY_ITEM_ID, 0, SUPPLY_ITEM.PRICE)
            table.insert(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, {ID = SUPPLY_ITEM_ID, NAME = SUPPLY_ITEM.NAME, PRICE = SUPPLY_ITEM.PRICE})
        end
        
        MONITOR_MY_HUNTING.INITIALIZED = true
    end
    
    setposition(Client.ClientWindow().right - 434, Client.WorldWindow().top + 5)
    
    local Y_POSITION, INDEX, ITEMS_LOOTED_WORTH, SUPPLIES_USED_WORTH = 30, 0, 0, 0
    
    addtextshadow(sprintf("%s v%s", MONITOR_MY_HUNTING.SCRIPT_NAME:upper(), MONITOR_MY_HUNTING.SCRIPT_VERSION), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
    
    Y_POSITION = Y_POSITION + 20
    
    addtextshadow("ITEMS LOOTED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)
    
    Y_POSITION = Y_POSITION + 20
    
    for _, LOOT_ITEM in pairs(Stats.GetItemsLooted()) do
        if ((MONITOR_MY_HUNTING.SHOW_ALL_ITEMS or table.find(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, LOOT_ITEM.ID, "ID")) and LOOT_ITEM.QUANTITY > 0) then
        addtextshadow(((#LOOT_ITEM.NAME > 17 and sprintf("%s...", string.match(string.sub(LOOT_ITEM.NAME, 1, 17), "(.-)%s?$"))) or LOOT_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX * 16),  MONITOR_MY_HUNTING.COLORS.CORNSILK)
        addtextshadow(sprintf("%s (%sK)", Misc.FormatNumber(LOOT_ITEM.QUANTITY), tostring(math.floor(LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX * 16),  MONITOR_MY_HUNTING.COLORS.WHITE)
    
        INDEX, ITEMS_LOOTED_WORTH = INDEX + 1, ITEMS_LOOTED_WORTH + (LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY)
        end
    end
    
    addtextshadow("Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
    addtextshadow(sprintf("%s GPs", Misc.FormatNumber(ITEMS_LOOTED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
    
    Y_POSITION = Y_POSITION + 20
    
    addtextshadow("SUPPLIES USED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)
    
    Y_POSITION = Y_POSITION + 20
    
    for _, SUPPLY_ITEM in pairs(Stats.GetSuppliesUsed()) do
        if ((MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES or table.find(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, SUPPLY_ITEM.ID, "ID")) and SUPPLY_ITEM.QUANTITY > 0) then
            addtextshadow(((#SUPPLY_ITEM.NAME > 17 and sprintf("%s...", string.match(string.sub(SUPPLY_ITEM.NAME, 1, 17), "(.-)%s?$"))) or SUPPLY_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX *  16), MONITOR_MY_HUNTING.COLORS.CORNSILK)
            addtextshadow(sprintf("%s (%sK)", Misc.FormatNumber(SUPPLY_ITEM.QUANTITY), tostring(math.floor(SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX *  16), MONITOR_MY_HUNTING.COLORS.WHITE)
    
            INDEX, SUPPLIES_USED_WORTH = INDEX + 1, SUPPLIES_USED_WORTH + (SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY)
        end
    end
    
    addtextshadow("Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
    addtextshadow(sprintf("%s GPs", Misc.FormatNumber(SUPPLIES_USED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
    
    Y_POSITION = Y_POSITION + 20
    
    addtextshadow(sprintf("%s: %s GPs (%s K/H)", ((ITEMS_LOOTED_WORTH >= SUPPLIES_USED_WORTH and ("PROFIT")) or ("WASTE")), Misc.FormatNumber(ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH),  tostring(math.floor(((ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH) * 3600) / (System.HuntingTime() / 1000) / 100) / 10)), 10, Y_POSITION + (INDEX * 16), ITEMS_LOOTED_WORTH >=  SUPPLIES_USED_WORTH and MONITOR_MY_HUNTING.COLORS.GREEN or MONITOR_MY_HUNTING.COLORS.RED)

  2. #2
    Normal User dgkdgk's Avatar
    Join Date
    Jun 2012
    Location
    Norway
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    18
    Rep Power
    5
    Try this one

    PHP Code:
    -- [[ INIT START ]] --
            --
            --                       
    88                                                                
            
    --                       ""                                                ,d              
            
    --                                                                         88              
            
    --            ,adPPYba,  88  8b,dPPYba,  88,dPYba,,adPYba,   ,adPPYYba,  MM88MMM  ,adPPYba,
            --            
    I8[    ""  88  88P'   "Y8  88P'   "88"    "8a  ""     `Y8    88    a8P_____88
            --             `"
    Y8ba,   88  88          88      88      88  ,adPPPPP88    88    8PP"""""""
            --            aa    ]8I  88  88          88      88      88  88,    ,88    88,   "
    8b,   ,aa
            
    --   Author:  `"YbbdP"'  88  88          88      88      88  `"8bbdP"Y8    "Y888  `"Ybbd8"'
            --  
            --   Monitor My Hunting
            --  
            --   Version: 1.0
            --   Created: 7.09.2012
            --   Last update: 18.09.2012
            --
           
            MONITOR_MY_HUNTING = MONITOR_MY_HUNTING or {
                    SCRIPT_NAME = "
    Monitor My Hunting",
                    SCRIPT_VERSION = "
    1.0",
                   
                    CLEARED_STATS = false,
                    INITIALIZED = false,
            }
     
            MONITOR_MY_HUNTING.SHOW_ALL_ITEMS = false
            MONITOR_MY_HUNTING.ITEMS_LIST = {
                    {NAME = "
    gold coin", VALUE = 1},
                    {NAME = "
    platinum coin", VALUE = 100},
                    {NAME = "
    small sapphire", VALUE = 250},
                    {NAME = "
    golden mug", VALUE = 250},
                    {NAME = "
    green mushroom", VALUE = 100},
                    {NAME = "
    red dragon scale", VALUE = 200},
                    {NAME = "
    life crystal", VALUE = 500},
                    {NAME = "
    red dragon leather", VALUE = 200},
                    {NAME = "
    strange helmet", VALUE = 500},
                    {NAME = "
    fire sword", VALUE = 4000},
                    {NAME = "
    Small Diamond", VALUE = 250},
                    {NAME = "
    tower shield", VALUE = 8000},
                    {NAME = "
    dragon slayer", VALUE = 15000},
                    {NAME = "
    dragon scale mail", VALUE = 40000},
                    {NAME = "
    royal helmet", VALUE = 30000},
                    {NAME = "
    dragon lord trophy", VALUE = 10000},
                    {NAME = "
    magma boots", VALUE = 2500},
                    {NAME = "
    spiked iron ball", VALUE = 100},
                    {NAME = "
    Cursed Shoulder Spikes", VALUE = 320},
                    {NAME = "
    Small Amethyst", VALUE = 200},
                    {NAME = "
    Terra rod", VALUE = 2000},
                    {NAME = "
    Wand of inferno", VALUE = 3000},
                    {NAME = "
    Zaoan Robe", VALUE = 12000},
                    {NAME = "
    High Guard Shoulderplates", VALUE = 130},
                    {NAME = "
    Lizard Leather", VALUE = 100},
                    {NAME = "
    Broken Halber", VALUE = 100},
                    {NAME = "
    Legionnaire Flags", VALUE = 500},
                    {NAME = "
    Lizard Trophy", VALUE = 0},                 
                    {NAME = "
    Yellow Gem", VALUE = 1000},      
            }
     
            MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES = false
            MONITOR_MY_HUNTING.SUPPLIES_LIST = {
                    {NAME = "
    strong mana potion", PRICE = 80},
                    {NAME = "
    great mana potion", PRICE = 120},
                    {NAME = "
    sudden death rune", PRICE = 108},
                    {NAME = "
    power bolt bolt", PRICE = 7},
                    {NAME = "
    Crystalline Arrow", PRICE = 20},
                    {NAME = "
    Onyx Arrow", PRICE = 7},


            }
           
            -- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --
           
            MONITOR_MY_HUNTING.TEMP_ITEMS_LIST = MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or {}
            MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST or {}
            MONITOR_MY_HUNTING.COLORS = MONITOR_MY_HUNTING.COLORS or {
                    BLACK = rgbcolor(1, 1, 1),
                    ORANGE = rgbcolor(255, 165, 0),
                    BLUE = rgbcolor(30, 144, 255),
                    CORNSILK = rgbcolor(205, 200, 177),
                    WHITE = rgbcolor(255, 255, 255),
                    GREEN = rgbcolor(107, 142, 35),
                    RED = rgbcolor(178, 34, 34),
            }
           
            local function CreateMessageObject(MESSAGE_DATA)
                    if (type(MESSAGE_DATA) ~= "
    userdata") then
                            return setmetatable({__data = {TYPE = -1, TIME_STAMP = -1, SENDER_NAME = "", SENDER_LEVEL = -1, CONTENT = ""}}, MessageMetaTable)
                    else
                            return setmetatable({__data = {TYPE = MESSAGE_DATA.type, TIME_STAMP = Misc.ConvertToSeconds(string.sub(MESSAGE_DATA.text, 1, 5)), SENDER_NAME = MESSAGE_DATA.sender, SENDER_LEVEL = tonumber((tostring(string.match(MESSAGE_DATA.text, "
    .+ (%b[]): .+")):gsub("[^%d]", ""))) or 0, CONTENT = string.sub(MESSAGE_DATA.text, 7)}}, MessageMetaTable)
                    end
            end
           
            local function addtextshadow(DISPLAY_TEXT, X_OFFSET, Y_OFFSET, FONT_COLOR)
                    setfontcolor(MONITOR_MY_HUNTING.COLORS.BLACK)
                    addtext(DISPLAY_TEXT, X_OFFSET + 1, Y_OFFSET + 1)
                    setfontcolor(FONT_COLOR)
                    addtext(DISPLAY_TEXT, X_OFFSET, Y_OFFSET)
            end
    -- [[ INIT END ]] --
     
    if (not Stats.Update()) then
            local SERVER_LOG_MESSAGES = getnewmessages("
    Server Log")
            local SERVER_LOG_MESSAGES_COUNT = SERVER_LOG_MESSAGES.count - 1
           
            for INDEX = 0, SERVER_LOG_MESSAGES_COUNT do
                    local MESSAGE_OBJECT = CreateMessageObject(SERVER_LOG_MESSAGES[SERVER_LOG_MESSAGES_COUNT - INDEX])
                   
                    if (MESSAGE_OBJECT:Type() == 19 and MESSAGE_OBJECT:Content():lower():match("
    ^loot of")) then
                            local LOOT_INFO = Message.ParseLootMessage(MESSAGE_OBJECT, true)
     
                            if (#LOOT_INFO.NAME > 0) then
                                    Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] = (Stats.__data.MONSTERS_KILLED[LOOT_INFO.NAME] or 0) + 1
                                   
                                    for _, LOOT_ITEM in ipairs(LOOT_INFO.ITEMS) do
                                            if (Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID]) then
                                                    Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY = Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID].QUANTITY + LOOT_ITEM.QUANTITY
                                            else
                                                    Stats.__data.ITEMS_LOOTED[LOOT_ITEM.ID] = {ID = LOOT_ITEM.ID, NAME = LOOT_ITEM.NAME, QUANTITY = LOOT_ITEM.QUANTITY, VALUE = Item.GetValue(LOOT_ITEM.ID)}
                                            end
                                    end
                            end
                    end
            end
    end
     
    local RESET_ITEMS_AND_SUPPLIES = #MONITOR_MY_HUNTING.ITEMS_LIST ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST or #MONITOR_MY_HUNTING.SUPPLIES_LIST ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST
     
    if (not RESET_ITEMS_AND_SUPPLIES) then
            for INDEX, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
                    if (LOOT_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].NAME or LOOT_ITEM.VALUE ~= MONITOR_MY_HUNTING.TEMP_ITEMS_LIST[INDEX].VALUE) then
                            RESET_ITEMS_AND_SUPPLIES = true
                            break
                    end
            end
    end
     
    if (not RESET_ITEMS_AND_SUPPLIES) then
            for INDEX, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
                    if (SUPPLY_ITEM.NAME ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].NAME or SUPPLY_ITEM.PRICE ~= MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST[INDEX].PRICE) then
                            RESET_ITEMS_AND_SUPPLIES = true
                            break
                    end
            end
    end
     
    if (not MONITOR_MY_HUNTING.INITIALIZED or RESET_ITEMS_AND_SUPPLIES) then
            if (not MONITOR_MY_HUNTING.CLEARED_STATS) then
                    Stats.Clear(CLEAR_STATS_ALL)
                    Stats.Update()
                   
                    MONITOR_MY_HUNTING.CLEARED_STATS = true
            end
           
            MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST = {}, {}
                   
            for _, LOOT_ITEM in ipairs(MONITOR_MY_HUNTING.ITEMS_LIST) do
                    local LOOT_ITEM_ID = Item.GetID(type(LOOT_ITEM.NAME) ~= "
    table" and LOOT_ITEM.NAME or unpack(LOOT_ITEM.NAME))
                   
                    Stats.AddItemsLooted(LOOT_ITEM_ID, 0, LOOT_ITEM.VALUE)
                    table.insert(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, {ID = LOOT_ITEM_ID, NAME = LOOT_ITEM.NAME, VALUE = LOOT_ITEM.VALUE})
            end
             
            for _, SUPPLY_ITEM in ipairs(MONITOR_MY_HUNTING.SUPPLIES_LIST) do
                    local SUPPLY_ITEM_ID = Item.GetID(type(SUPPLY_ITEM.NAME) ~= "
    table" and SUPPLY_ITEM.NAME or unpack(SUPPLY_ITEM.NAME))
                   
                    Stats.AddSuppliesUsed(SUPPLY_ITEM_ID, 0, SUPPLY_ITEM.PRICE)
                    table.insert(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, {ID = SUPPLY_ITEM_ID, NAME = SUPPLY_ITEM.NAME, PRICE = SUPPLY_ITEM.PRICE})
            end
           
            MONITOR_MY_HUNTING.INITIALIZED = true
    end
     
    setposition(Client.ClientWindow().right - 434, Client.WorldWindow().top + 5)
     
    local Y_POSITION, INDEX, ITEMS_LOOTED_WORTH, SUPPLIES_USED_WORTH = 30, 0, 0, 0
     
    addtextshadow(sprintf("
    %s v%s", MONITOR_MY_HUNTING.SCRIPT_NAME:upper(), MONITOR_MY_HUNTING.SCRIPT_VERSION), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
     
    Y_POSITION = Y_POSITION + 20
     
    addtextshadow("
    ITEMS LOOTED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)
     
    Y_POSITION = Y_POSITION + 20
     
    for _, LOOT_ITEM in pairs(Stats.GetItemsLooted()) do
        if ((MONITOR_MY_HUNTING.SHOW_ALL_ITEMS or table.find(MONITOR_MY_HUNTING.TEMP_ITEMS_LIST, LOOT_ITEM.ID, "
    ID")) and LOOT_ITEM.QUANTITY > 0) then
            addtextshadow(((#LOOT_ITEM.NAME > 17 and sprintf("
    %s...", string.match(string.sub(LOOT_ITEM.NAME, 1, 17), "(.-)%s?$"))) or LOOT_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.CORNSILK)
            addtextshadow(sprintf("
    %(%sK)", Misc.FormatNumber(LOOT_ITEM.QUANTITY), tostring(math.floor(LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
     
            INDEX, ITEMS_LOOTED_WORTH = INDEX + 1, ITEMS_LOOTED_WORTH + (LOOT_ITEM.VALUE * LOOT_ITEM.QUANTITY)
        end
    end
     
    addtextshadow("
    Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
    addtextshadow(sprintf("
    %s GPs", Misc.FormatNumber(ITEMS_LOOTED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
     
    Y_POSITION = Y_POSITION + 20
     
    addtextshadow("
    SUPPLIES USED", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.BLUE)
     
    Y_POSITION = Y_POSITION + 20
     
    for _, SUPPLY_ITEM in pairs(Stats.GetSuppliesUsed()) do
        if ((MONITOR_MY_HUNTING.SHOW_ALL_SUPPLIES or table.find(MONITOR_MY_HUNTING.TEMP_SUPPLIES_LIST, SUPPLY_ITEM.ID, "
    ID")) and SUPPLY_ITEM.QUANTITY > 0) then
            addtextshadow(((#SUPPLY_ITEM.NAME > 17 and sprintf("
    %s...", string.match(string.sub(SUPPLY_ITEM.NAME, 1, 17), "(.-)%s?$"))) or SUPPLY_ITEM.NAME):ucwords(), 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.CORNSILK)
            addtextshadow(sprintf("
    %(%sK)", Misc.FormatNumber(SUPPLY_ITEM.QUANTITY), tostring(math.floor(SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY / 100) / 10)), 140, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
     
            INDEX, SUPPLIES_USED_WORTH = INDEX + 1, SUPPLIES_USED_WORTH + (SUPPLY_ITEM.PRICE * SUPPLY_ITEM.QUANTITY)
        end
    end
     
    addtextshadow("
    Total:", 10, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.WHITE)
    addtextshadow(sprintf("
    %s GPs", Misc.FormatNumber(SUPPLIES_USED_WORTH)), 10 + 35, Y_POSITION + (INDEX * 16), MONITOR_MY_HUNTING.COLORS.ORANGE)
     
    Y_POSITION = Y_POSITION + 20
     
    addtextshadow(sprintf("
    %s: %s GPs (%s K/H)", ((ITEMS_LOOTED_WORTH >= SUPPLIES_USED_WORTH and ("PROFIT")) or ("WASTE")), Misc.FormatNumber(ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH), tostring(math.floor(((ITEMS_LOOTED_WORTH - SUPPLIES_USED_WORTH) * 3600) / (System.HuntingTime() / 1000) / 100) / 10)), 10, Y_POSITION + (INDEX * 16), ITEMS_LOOTED_WORTH >= SUPPLIES_USED_WORTH and MONITOR_MY_HUNTING.COLORS.GREEN or MONITOR_MY_HUNTING.COLORS.RED) 
    Last edited by dgkdgk; 03-18-2013 at 09:10 PM.

  3. #3
    iBot User
    Join Date
    Jan 2013
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    4
    I have the same problem. Tried dgkdgk script (only changing items) and it doesnt work too

  4. #4
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Quote Originally Posted by andrerca12 View Post
    I have the same problem. Tried dgkdgk script (only changing items) and it doesnt work too
    download latest version of sirmate's library (1.1.1) and copy it to library folder, reset the bot and should work. (Open bot as admin)

  5. #5
    iBot User
    Join Date
    Jan 2013
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by Eli View Post
    download latest version of sirmate's library (1.1.1) and copy it to library folder, reset the bot and should work. (Open bot as admin)
    Thanks, but still with problem :/

  6. #6
    Normal User
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    same here im too cant use Sirmate's MMH

  7. #7
    Premium User iwoq's Avatar
    Join Date
    Mar 2012
    Location
    Derby
    Posts
    154
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    14 Post(s)
    Reputation
    11
    Rep Power
    5
    change for new: use complete hud from forum is work!

    http://www.tibiaibot.com/forum/showt...ate-Ready-HUDS
    Last edited by iwoq; 04-08-2013 at 10:09 PM.

  8. #8
    iBot User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    10
    Rep Power
    4
    Not work

  9. #9
    Normal User
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    I got same problem done with all and sirmate's MMH dont works i am trying to repair that from 2.0.0 and still its dont work. got latests sirmate's library- lateset ibot version - running as adminst. 4 times formatted my pc coz of this and still dont works . using win7 home basic.

    "15:56 : LUAoAction:HUD: - LuaInterface.LuaScriptException: [string "chunk"]:112: ')' expected near '&'"
    that is one debug copy
    and that is another script's debug
    "15:58 : LUAoAction:HUD: - LuaInterface.LuaScriptException: [string "chunk"]:84: attempt to index global 'Stats' (a nil value)" i can copy more debug's for any MMH script

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •