WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   EPGP Battle Bot (https://www.wowinterface.com/forums/showthread.php?t=55125)

n00bsteam 02-12-17 08:49 AM

EPGP Battle Bot
 
Hi all! :o

Can somebody help to make this addon work in 7.1.5?

Now it work, but can give ep\gp only to players at split servers, i'm think that problem it name to EPGP (sent only name but need name-realmname.

I try to make it work by myself, but i cant make it work(

Here repo of addon - https://github.com/hurricup/WoW-EPGP-BattleBot

P.S. Author doesnt play now and cant help me.

Thx for reading! :rolleyes:

n00bsteam 02-12-17 11:11 PM

Ok, mb someone ca help whit code?

I have this:

Code:

local item = table.remove(queue, 1);
        local rule = item['rule']
        local reason, value, currency, player = battle_bot_get_rule_as_string(rule), rule['value'], rule['currency'], item['player']
       
        if( currency == 'GP' ) then
            if( EPGP:CanIncGPBy(reason, value) ) then
                EPGP:IncGPBy( player, reason, value )
            else
                print("Unabe to charge GP", player, reason, value) -- debugging
            end
        else
            if( EPGP:CanIncEPBy(reason, value) ) then
                EPGP:IncEPBy( player, reason, value )
            else
                print("Unabe to charge EP", player, reason, value) -- debugging
            end
        end

here "player" have only playerName, but it doesnt work, seems to be there playerName-RealmName

I have this code from EPGP Addone:

Code:

local ourRealmName = string.gsub(GetRealmName(), "%s+", "")    -- Realm name with no spaces
function EPGP:GetFullCharacterName(name)
        if string.find(name, "%-") then
                return name;
        else
                return name .. "-" .. ourRealmName;
        end
end

i try to make like this:

Code:

        local item = table.remove(queue, 1);
        local rule = item['rule']
                local ourRealmName = string.gsub(GetRealmName(), "%s+", "")
        local reason, value, currency, player = battle_bot_get_rule_as_string(rule), rule['value'], rule['currency'], item['player']
       
        if( currency == 'GP' ) then
                        if string.find(player, "%-") then
                        fullname = player;
                else
                        fullname = player .. "-" .. ourRealmName
                end
            else
            if( EPGP:CanIncGPBy(reason, value) ) then
                EPGP:IncGPBy( fullname, reason, value )
            else
                print("Unabe to charge GP", fullname, reason, value) -- debugging
            end
        else
            if( EPGP:CanIncEPBy(reason, value) ) then
                EPGP:IncEPBy( fullname, reason, value )
            else
                print("Unabe to charge EP", fullname, reason, value) -- debugging
            end
        end

But it doesnt work. What is wrong? :confused::(

n00bsteam 02-12-17 11:51 PM

WoW! I make it work! xD

Rozenkreicer 04-27-17 11:17 AM

Same trouble here, can someone help?

Rozenkreicer 05-04-17 07:46 PM

Took some time, but the problem is solved.


All times are GMT -6. The time now is 02:24 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI