Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → /seticon /swapicon

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 9

1

Topic: /seticon /swapicon

I tried to apply the script / seticon and / swapicon and have entered the code

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
{
    char key[256];
    char clienttag_str[5];

    if (!clienttag)
    {
    eventlog(eventlog_level_error,__FUNCTION__,"got bad clienttag");
    return 0;
    }
    std::sprintf(key,"Record\\%s\\%s\\rank",tag_uint_to_str(clienttag_str,clienttag),id);
    return account_get_numattr(account,key);
}


 
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
{
    char temp[256];
    
    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_set_boolattr(account, temp, val);
}


extern int account_get_auth_icon(t_account * account, char const * icon_name)
{
    char temp[256];

    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_get_boolattr(account, temp);
}

but still put out an error when building pvpgn

17>..\..\..\source\src\bnetd\command.cpp(774): warning C4146: unary minus operator applied to unsigned type, result still unsigned
17>..\..\..\source\src\bnetd\command.cpp(1761): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1762): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1763): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1764): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1765): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1766): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1767): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1768): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1769): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1770): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1771): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1772): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1773): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1774): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1775): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1776): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1777): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1778): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1779): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1780): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1781): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1782): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1783): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1784): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1785): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1786): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1787): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1877): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1956): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1958): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1960): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1962): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1964): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1966): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1968): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1970): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1972): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1974): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1976): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1978): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1980): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1982): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1984): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1986): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1988): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1990): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1992): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1994): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1996): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1998): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2000): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2002): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2004): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2006): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2008): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2037): error C3861: 'account_set_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2044): error C3861: 'account_set_auth_icon': identifier not found

anyone can help me on this issue

2

Re: /seticon /swapicon

A4erz wrote:

I tried to apply the script / seticon and / swapicon and have entered the code

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
{
    char key[256];
    char clienttag_str[5];

    if (!clienttag)
    {
    eventlog(eventlog_level_error,__FUNCTION__,"got bad clienttag");
    return 0;
    }
    std::sprintf(key,"Record\\%s\\%s\\rank",tag_uint_to_str(clienttag_str,clienttag),id);
    return account_get_numattr(account,key);
}


 
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
{
    char temp[256];
    
    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_set_boolattr(account, temp, val);
}


extern int account_get_auth_icon(t_account * account, char const * icon_name)
{
    char temp[256];

    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_get_boolattr(account, temp);
}

but still put out an error when building pvpgn

17>..\..\..\source\src\bnetd\command.cpp(774): warning C4146: unary minus operator applied to unsigned type, result still unsigned
17>..\..\..\source\src\bnetd\command.cpp(1761): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1762): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1763): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1764): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1765): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1766): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1767): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1768): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1769): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1770): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1771): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1772): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1773): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1774): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1775): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1776): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1777): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1778): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1779): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1780): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1781): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1782): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1783): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1784): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1785): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1786): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1787): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1877): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1956): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1958): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1960): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1962): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1964): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1966): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1968): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1970): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1972): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1974): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1976): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1978): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1980): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1982): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1984): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1986): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1988): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1990): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1992): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1994): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1996): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1998): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2000): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2002): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2004): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2006): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2008): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2037): error C3861: 'account_set_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2044): error C3861: 'account_set_auth_icon': identifier not found

anyone can help me on this issue

---------------------------------------------------------
account_wrap.cpp

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
{
    char key[256];
    char clienttag_str[5];

    if (!clienttag)
    {
    eventlog(eventlog_level_error,__FUNCTION__,"got bad clienttag");
    return 0;
    }
    std::sprintf(key,"Record\\%s\\%s\\rank",tag_uint_to_str(clienttag_str,clienttag),id);
    return account_get_numattr(account,key);
}


 
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
{
    char temp[256];
    
    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_set_boolattr(account, temp, val);
}


extern int account_get_auth_icon(t_account * account, char const * icon_name)
{
    char temp[256];

    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_get_boolattr(account, temp);
}

---------------------------------------------------------
AND account_wrap.h

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
extern int account_get_auth_icon(t_account * account, char const * icon_name)

3 (edited by A4erz 18.01.2015 08:02)

Re: /seticon /swapicon

DropDead wrote:
A4erz wrote:

I tried to apply the script / seticon and / swapicon and have entered the code

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
{
    char key[256];
    char clienttag_str[5];

    if (!clienttag)
    {
    eventlog(eventlog_level_error,__FUNCTION__,"got bad clienttag");
    return 0;
    }
    std::sprintf(key,"Record\\%s\\%s\\rank",tag_uint_to_str(clienttag_str,clienttag),id);
    return account_get_numattr(account,key);
}


 
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
{
    char temp[256];
    
    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_set_boolattr(account, temp, val);
}


extern int account_get_auth_icon(t_account * account, char const * icon_name)
{
    char temp[256];

    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_get_boolattr(account, temp);
}

but still put out an error when building pvpgn

17>..\..\..\source\src\bnetd\command.cpp(774): warning C4146: unary minus operator applied to unsigned type, result still unsigned
17>..\..\..\source\src\bnetd\command.cpp(1761): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1762): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1763): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1764): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1765): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1766): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1767): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1768): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1769): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1770): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1771): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1772): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1773): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1774): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1775): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1776): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1777): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1778): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1779): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1780): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1781): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1782): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1783): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1784): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1785): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1786): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1787): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1846): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1848): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1850): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1852): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1854): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1856): error C3861: 'account_get_ladder_rank2': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1877): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1956): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1958): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1960): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1962): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1964): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1966): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1968): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1970): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1972): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1974): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1976): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1978): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1980): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1982): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1984): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1986): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1988): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1990): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1992): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1994): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1996): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(1998): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2000): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2002): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2004): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2006): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2008): error C3861: 'account_get_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2037): error C3861: 'account_set_auth_icon': identifier not found
17>..\..\..\source\src\bnetd\command.cpp(2044): error C3861: 'account_set_auth_icon': identifier not found

anyone can help me on this issue

---------------------------------------------------------
account_wrap.cpp

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
{
    char key[256];
    char clienttag_str[5];

    if (!clienttag)
    {
    eventlog(eventlog_level_error,__FUNCTION__,"got bad clienttag");
    return 0;
    }
    std::sprintf(key,"Record\\%s\\%s\\rank",tag_uint_to_str(clienttag_str,clienttag),id);
    return account_get_numattr(account,key);
}


 
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
{
    char temp[256];
    
    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_set_boolattr(account, temp, val);
}


extern int account_get_auth_icon(t_account * account, char const * icon_name)
{
    char temp[256];

    std::sprintf(temp,"BNET\\auth\\icon\\%.100s",icon_name);
    return account_get_boolattr(account, temp);
}

---------------------------------------------------------
AND account_wrap.h

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id)
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val)
extern int account_get_auth_icon(t_account * account, char const * icon_name)

get an error like thishttp://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/6500/6946/thumb/p19btie6ud1vvuj961t371ho9tq71.JPG

please provide full tutorial if not bother you

4

Re: /seticon /swapicon

You need to add a semicolon after each function declaration in account_wrap.h

5

Re: /seticon /swapicon

xboi209 wrote:

You need to add a semicolon after each function declaration in account_wrap.h

Yes. thanks for correcting. big_smile

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id);
extern int account_set_auth_icon(t_account * account, char const * icon_name, int val);
extern int account_get_auth_icon(t_account * account, char const * icon_name);

6

Re: /seticon /swapicon

okay thank you, now already successfully
but there is little obstacle in creating a new icon.
icon just look at BNET but not visible on profile

can anybody help me in solving this problem

7

Re: /seticon /swapicon

A4erz wrote:

okay thank you, now already successfully
but there is little obstacle in creating a new icon.
icon just look at BNET but not visible on profile

can anybody help me in solving this problem

Provide screenshots please.

8 (edited by A4erz 04.02.2015 09:29)

Re: /seticon /swapicon

DropDead wrote:
A4erz wrote:

okay thank you, now already successfully
but there is little obstacle in creating a new icon.
icon just look at BNET but not visible on profile

can anybody help me in solving this problem

Provide screenshots please.

icon terlihat pada loby battlenet

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9gkjav19gp133r1aqaln21dhd1.png

but which appear on the profile is peon icon

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9h1ebq1khoqb418acoq61c411.JPG

please give me a tutorial that icon on the profile looks like this

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9guq3ae2p17mdn76146atgm3.png

Added: 04.02.2015 18:36

    // Ramdom - Nothing, Grean Dragon Whelp, Azure Dragon (Blue Dragon), Red Dragon, Deathwing, Nothing
// Humans - Peasant, Footman, Knight, Archmage, Medivh, Nothing
// Orcs - Peon, Grunt, Tauren, Far Seer, Thrall, Nothing
// Undead - Acolyle, Ghoul, Abomination, Lich, Tichondrius, Nothing
// Night Elves - Wisp, Archer, Druid of the Claw, Priestess of the Moon, Furion Stormrage, Nothing
// Demons - Nothing, ???(wich unit is nfgn), Infernal, Doom Guard, Pit Lord/Manaroth, Archimonde
// ADDED TFT ICON BY DJP 07/16/2003
static const char * profile_code[12][6] = {
{ NULL, "ngrd", "nadr", "nrdr", "nbwm", NULL },
{ "hpea", "hfoo", "hkni", "Hamg", "nmed", NULL },
{ "opeo", "ogru", "otau", "Ofar", "Othr", NULL },
{ "uaco", "ugho", "uabo", "Ulic", "Utic", NULL },
{ "ewsp", "earc", "edoc", "Emoo", "Efur", NULL },
{ NULL, "nfng", "ninf", "nbal", "Nplh", "Uwar" }, /* not used by RoC */
{ NULL, "nmyr", "nnsw", "nhyc", "Hvsh", "Eevm" },
{ "hpea", "hrif", "hsor", "hspt", "Hblm", "Hjai" },
{ "opeo", "ohun", "oshm", "ospw", "Oshd", "Orex" },
{ "uaco", "ucry", "uban", "uobs", "Ucrl", "Usyl" },
{ "ewsp", "esen", "edot", "edry", "Ekee", "Ewrd" },
{ NULL, "nfgu", "ninf", "nbal", "Nplh", "Uwar" }
};

there is someone who gives tutors to modify the source profile_code, but I am confused as to what I should do on the source.

if any of the master who can solve my problem, please take the time master to help me for a while, and I would say many thx

Added: 09.02.2015 22:36

up

9

Re: /seticon /swapicon

A4erz wrote:
DropDead wrote:
A4erz wrote:

okay thank you, now already successfully
but there is little obstacle in creating a new icon.
icon just look at BNET but not visible on profile

can anybody help me in solving this problem

Provide screenshots please.

icon terlihat pada loby battlenet

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9gkjav19gp133r1aqaln21dhd1.png

but which appear on the profile is peon icon

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9h1ebq1khoqb418acoq61c411.JPG

please give me a tutorial that icon on the profile looks like this

http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/7000/7000/thumb/p19d9guq3ae2p17mdn76146atgm3.png

Added: 04.02.2015 18:36

    // Ramdom - Nothing, Grean Dragon Whelp, Azure Dragon (Blue Dragon), Red Dragon, Deathwing, Nothing
// Humans - Peasant, Footman, Knight, Archmage, Medivh, Nothing
// Orcs - Peon, Grunt, Tauren, Far Seer, Thrall, Nothing
// Undead - Acolyle, Ghoul, Abomination, Lich, Tichondrius, Nothing
// Night Elves - Wisp, Archer, Druid of the Claw, Priestess of the Moon, Furion Stormrage, Nothing
// Demons - Nothing, ???(wich unit is nfgn), Infernal, Doom Guard, Pit Lord/Manaroth, Archimonde
// ADDED TFT ICON BY DJP 07/16/2003
static const char * profile_code[12][6] = {
{ NULL, "ngrd", "nadr", "nrdr", "nbwm", NULL },
{ "hpea", "hfoo", "hkni", "Hamg", "nmed", NULL },
{ "opeo", "ogru", "otau", "Ofar", "Othr", NULL },
{ "uaco", "ugho", "uabo", "Ulic", "Utic", NULL },
{ "ewsp", "earc", "edoc", "Emoo", "Efur", NULL },
{ NULL, "nfng", "ninf", "nbal", "Nplh", "Uwar" }, /* not used by RoC */
{ NULL, "nmyr", "nnsw", "nhyc", "Hvsh", "Eevm" },
{ "hpea", "hrif", "hsor", "hspt", "Hblm", "Hjai" },
{ "opeo", "ohun", "oshm", "ospw", "Oshd", "Orex" },
{ "uaco", "ucry", "uban", "uobs", "Ucrl", "Usyl" },
{ "ewsp", "esen", "edot", "edry", "Ekee", "Ewrd" },
{ NULL, "nfgu", "ninf", "nbal", "Nplh", "Uwar" }
};

there is someone who gives tutors to modify the source profile_code, but I am confused as to what I should do on the source.

if any of the master who can solve my problem, please take the time master to help me for a while, and I would say many thx

Added: 09.02.2015 22:36

up

Add in command.cpp

static int _handle_swapicon_command(t_connection * c, char const *text);
static int _handle_seticon_command(t_connection * c, char const *text);

    { "/seticon"            , _handle_seticon_command },
    { "/icon"               , _handle_swapicon_command },

static int _handle_seticon_command(t_connection * c, char const *text)
{
    t_account *    account;
    char *    command;
    char *    username;
    char *  icon;
    char     t[MAX_MESSAGE_LEN];
    unsigned int i,j;
    char    arg1[256];
    char    arg2[256];
    char    arg3[256];

    std::strncpy(t, text, MAX_MESSAGE_LEN - 1);
    for (i=0; t[i]!=' ' && t[i]!='\0'; i++); /* skip command /groups */

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!=' ' && t[i]!='\0'; i++) /* get command */
    if (j<sizeof(arg1)-1) arg1[j++] = t[i];
    arg1[j] = '\0';

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!=' ' && t[i]!='\0'; i++) /* get username */
    if (j<sizeof(arg2)-1) arg2[j++] = t[i];
    arg2[j] = '\0';

    for (; t[i]==' '; i++); /* skip spaces */
    for (j=0; t[i]!='\0'; i++) /* get icon */
    if (j<sizeof(arg3)-1) arg3[j++] = t[i];
    arg3[j] = '\0';

    command = arg1;
    username = arg2;
    icon = arg3;
    
    for (i=0; i<std::strlen(icon); i++)
    if (std::isupper((int)icon[i])) icon[i] = std::tolower((int)icon[i]);
    
    if (arg1[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }

    if (!std::strcmp(command,"help") || !std::strcmp(command,"h")) {
    message_send_text(c,message_type_info,c,"Set icons (Setting custom icons for users).");
    message_send_text(c,message_type_info,c,"Type: /seticon add <username> <icon code> - añadir un icono al perfil de usuario");
    message_send_text(c,message_type_info,c,"Type: /seticon del <username> <icon code> - eliminar un icono del perfil de usuario");
    message_send_text(c,message_type_info,c,"Type: /seticon list <username> - muestra iconos de usuario actual que puede utilizar");
    return 0;
    }

    if (arg2[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }

    if (!(account = accountlist_find_account(username))) {
    message_send_text(c,message_type_error,c,"Invalid user.");
    return 0;
    }

    if (!std::strcmp(command,"list") || !std::strcmp(command,"l")) {
        
        message_send_text(c,message_type_info,c,"Icon Name: Icon Code , Attribute");
        message_send_text(c,message_type_info,c,"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");    
        snprintf(msgtemp, sizeof(msgtemp), "Bomb: Bomb , %d",account_get_auth_icon(account,"bomb"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SafeList1: SS1 , %d",account_get_auth_icon(account,"ss1"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SafeList2: SS2 , %d",account_get_auth_icon(account,"ss2"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "SafeList3: SS3 , %d",account_get_auth_icon(account,"ss3"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "IronFist: Kift , %d",account_get_auth_icon(account,"kift"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Peasant: Peasant , %d",account_get_auth_icon(account,"peasant"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Footman: Foot , %d",account_get_auth_icon(account,"foot"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Knight: Knight , %d",account_get_auth_icon(account,"knight"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Archmage: Ezalor , %d",account_get_auth_icon(account,"ezalor"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Bloodmage: Invoker , %d",account_get_auth_icon(account,"invoker"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Medivh: Medivh , %d",account_get_auth_icon(account,"medivh"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Peon: Peon , %d",account_get_auth_icon(account,"peon"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Grunt: Grunt , %d",account_get_auth_icon(account,"grunt"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Tauren: Shaker , %d",account_get_auth_icon(account,"shaker"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Far Seer: Chen , %d",account_get_auth_icon(account,"chen"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Thrall: Thrall , %d",account_get_auth_icon(account,"thrall"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Wisp: Wisp , %d",account_get_auth_icon(account,"wisp"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Archer: Arch , %d",account_get_auth_icon(account,"arch"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Druid of the Claw: Syllabear , %d",account_get_auth_icon(account,"druid"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Priestess of the Moon: Mirana , %d",account_get_auth_icon(account,"mirana"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Warden: Mortred , %d",account_get_auth_icon(account,"mortred"));
        message_send_text(c,message_type_info,c,msgtemp);        
        snprintf(msgtemp, sizeof(msgtemp), "Furion Stormrage: Furion , %d",account_get_auth_icon(account,"furion"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Acolyte: Acolyte , %d",account_get_auth_icon(account,"acolyte"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Ghoul: Naix , %d",account_get_auth_icon(account,"naix"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Abomination: Pudge , %d",account_get_auth_icon(account,"pudge"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Lich: Lich , %d",account_get_auth_icon(account,"lich"));
        message_send_text(c,message_type_info,c,msgtemp);
        snprintf(msgtemp, sizeof(msgtemp), "Tichondrius: Balanar , %d",account_get_auth_icon(account,"balanar"));
        message_send_text(c,message_type_info,c,msgtemp);
        message_send_text(c,message_type_info,c,"Note: Hammer and Ladder icons are not displayed on this list.");
    return 0;
    }
    
    if (arg3[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /seticon <command> <username> <icon code>");
    return 0;
    }    
    
    if (!std::strcmp(icon,"bomb") || !std::strcmp(icon,"ss1") || !std::strcmp(icon,"ss2") || !std::strcmp(icon,"ss3")
    || !std::strcmp(icon,"kift") || !std::strcmp(icon,"peasant") || !std::strcmp(icon,"foot") || !std::strcmp(icon,"knight")
    || !std::strcmp(icon,"ezalor") || !std::strcmp(icon,"medivh")|| !std::strcmp(icon,"peon")|| !std::strcmp(icon,"grunt")
    || !std::strcmp(icon,"shaker") || !std::strcmp(icon,"chen") || !std::strcmp(icon,"thrall") || !std::strcmp(icon,"wisp")
    || !std::strcmp(icon,"arch") || !std::strcmp(icon,"syllabear") || !std::strcmp(icon,"mirana") || !std::strcmp(icon,"mortred")
    || !std::strcmp(icon,"furion") || !std::strcmp(icon,"acolyte") || !std::strcmp(icon,"naix") || !std::strcmp(icon,"pudge")
    || !std::strcmp(icon,"lich") || !std::strcmp(icon,"balanar") || !std::strcmp(icon,"invoker")) {
        /*Do nothing.*/
    }
    else
    {
        eventlog(eventlog_level_warn,__FUNCTION__,"unknown icon: %x", text);
        snprintf(msgtemp, sizeof(msgtemp), "No such icon, unable to set!");
        message_send_text(c,message_type_error,c,msgtemp);
        return 0;
    }
        
    if (!std::strcmp(command,"add") || !std::strcmp(command,"a")) {
    account_set_auth_icon(account, icon, 1);
    snprintf(msgtemp, sizeof(msgtemp) ,"%.128s is setted to the requested account.", icon);
    message_send_text(c,message_type_info,c,msgtemp);
    return 0;
    }

    if (!std::strcmp(command,"del") || !std::strcmp(command,"d")) {
    account_set_auth_icon(account, icon, 0);
    snprintf(msgtemp, sizeof(msgtemp) ,"%.128s is removed from the requested account.", icon);
    message_send_text(c,message_type_info,c,msgtemp);
    return 0;
    }

    snprintf(msgtemp, sizeof(msgtemp), "got unknown command: %.128s", command);
    message_send_text(c,message_type_error,c,msgtemp);
    return 0;

}
static int _handle_swapicon_command(t_connection * c, char const *text)
{
  
  t_account *   account;
  t_clienttag     clienttag;
  char const     *user_icon;
  unsigned int i,j;
  char    arg1[256];
  char *    icon;
  
  account = conn_get_account(c);
  clienttag = conn_get_clienttag(c);
  user_icon = "XXXX";
  
  for (i=0; text[i]!=' ' && text[i]!='\0'; i++);
  for (; text[i]==' '; i++);

  for (j=0; text[i]!=' ' && text[i]!='\0'; i++) /* get icon */
  if (j<sizeof(arg1)-1) arg1[j++] = text[i];
  arg1[j] = '\0';
  
  icon = arg1;
  
    if (arg1[0] =='\0') {
    message_send_text(c,message_type_info,c,"usage: /swapicon <icon code>");
    message_send_text(c,message_type_info,c,"iconos disponibles:");

        message_send_text(c,message_type_info,c,"Icon Code (Icon Name)  ");
        message_send_text(c,message_type_info,c,"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
        if (account_get_auth_icon(account,"bomb") == 1) message_send_text(c,message_type_info,c, "Bomb (Bomb)");
        if (account_get_auth_icon(account,"ss1") == 1) message_send_text(c,message_type_info,c, "SS1 (SafeList1)");
        if (account_get_auth_icon(account,"ss2") == 1) message_send_text(c,message_type_info,c, "SS2 (SafeList2)");
        if (account_get_auth_icon(account,"ss3") == 1) message_send_text(c,message_type_info,c, "SS3 (SafeList3)");
        if (account_get_auth_icon(account,"kift") == 1) message_send_text(c,message_type_info,c, "Kift (IronFist)");
        if (account_get_auth_icon(account,"peasant") == 1) message_send_text(c,message_type_info,c, "Peasant (Peasant)");
        if (account_get_auth_icon(account,"foot") == 1) message_send_text(c,message_type_info,c, "Foot (Footman)");
        if (account_get_auth_icon(account,"knight") == 1) message_send_text(c,message_type_info,c, "Knight (Knight)");
        if (account_get_auth_icon(account,"ezalor") == 1) message_send_text(c,message_type_info,c, "Ezalor (Archmage)");
        if (account_get_auth_icon(account,"invoker") == 1) message_send_text(c,message_type_info,c, "Invoker (Bloodmage)");
        if (account_get_auth_icon(account,"medivh") == 1) message_send_text(c,message_type_info,c, "Medivh (Medivh)");
        if (account_get_auth_icon(account,"peon") == 1) message_send_text(c,message_type_info,c, "Peon (Peon)");
        if (account_get_auth_icon(account,"grunt") == 1) message_send_text(c,message_type_info,c, "Grunt (Grunt)");
        if (account_get_auth_icon(account,"shaker") == 1) message_send_text(c,message_type_info,c, "Shaker (Tauren)");
        if (account_get_auth_icon(account,"chen") == 1) message_send_text(c,message_type_info,c, "Chen (Far Seer)");
        if (account_get_auth_icon(account,"thrall") == 1) message_send_text(c,message_type_info,c, "Thrall (Thrall)");
        if (account_get_auth_icon(account,"wisp") == 1) message_send_text(c,message_type_info,c, "Wisp (Wisp)");
        if (account_get_auth_icon(account,"arch") == 1) message_send_text(c,message_type_info,c, "Arch (Archer)");
        if (account_get_auth_icon(account,"syllabear") == 1) message_send_text(c,message_type_info,c, "Syllabear (Druid of the Claw)");
        if (account_get_auth_icon(account,"mirana") == 1) message_send_text(c,message_type_info,c, "Mirana (Priestess of the Moon)");
        if (account_get_auth_icon(account,"mortred") == 1) message_send_text(c,message_type_info,c, "Mortred (Warden)");
        if (account_get_auth_icon(account,"furion") == 1) message_send_text(c,message_type_info,c, "Furion (Furion Stormrage)");
        if (account_get_auth_icon(account,"acolyte") == 1) message_send_text(c,message_type_info,c, "Acolyte (Acolyte)");
        if (account_get_auth_icon(account,"naix") == 1) message_send_text(c,message_type_info,c, "Naix (Ghoul)");
        if (account_get_auth_icon(account,"pudge") == 1) message_send_text(c,message_type_info,c, "Pudge (Abomination)");
        if (account_get_auth_icon(account,"lich") == 1) message_send_text(c,message_type_info,c, "Lich (Lich)");
        if (account_get_auth_icon(account,"balanar") == 1) message_send_text(c,message_type_info,c, "Balanar (Tichondrius)");
        if (account_get_command_groups(account) >  1) message_send_text(c,message_type_info,c, "Hammer (Hammer)");
        message_send_text(c,message_type_info,c,"Ladder - In case you have reached the top 100 in Solo or Team");
    return 0;
    }
    
    for (i=0; i<std::strlen(icon); i++)
    if (std::isupper((int)icon[i])) icon[i] = std::tolower((int)icon[i]);
    
    /*Checking if icon exist and applying his code to user_icon value.*/
      /* BOMB aqui es BMOB entonces WBOB es BOBW */
    if (!std::strcmp(icon,"bomb"))    user_icon="BOBW";
    if (!std::strcmp(icon,"ss1"))    user_icon="XDRF";
    if (!std::strcmp(icon,"ss2"))    user_icon="XEBF";
    if (!std::strcmp(icon,"ss3"))    user_icon="XTWF";
    if (!std::strcmp(icon,"kift"))    user_icon="XLYT";
    if (!std::strcmp(icon,"peasant"))     user_icon="1H3M"; 
        if (!std::strcmp(icon,"foot"))     user_icon="2H3M";
        if (!std::strcmp(icon,"knight"))     user_icon="3H3M";
        if (!std::strcmp(icon,"ezalor"))     user_icon="4H3M";
        if (!std::strcmp(icon,"medivh"))     user_icon="5H3M";
    if (!std::strcmp(icon,"invoker"))     user_icon="TRAA";
    if (!std::strcmp(icon,"peon"))     user_icon="1O3M";
        if (!std::strcmp(icon,"grunt"))     user_icon="2O3M";
        if (!std::strcmp(icon,"shaker"))     user_icon="3O3M";
        if (!std::strcmp(icon,"chen"))     user_icon="4O3M";
        if (!std::strcmp(icon,"thrall"))     user_icon="5O3M";
    if (!std::strcmp(icon,"wisp"))    user_icon="1N3M";
        if (!std::strcmp(icon,"arch"))    user_icon="2N3M";
        if (!std::strcmp(icon,"syllabear"))    user_icon="3N3M";
        if (!std::strcmp(icon,"mirana"))    user_icon="4N3M";
        if (!std::strcmp(icon,"furion"))    user_icon="5N3M";
    if (!std::strcmp(icon,"mortred"))    user_icon="IAMA"; 
    if (!std::strcmp(icon,"acolyte"))    user_icon="1U3M";
        if (!std::strcmp(icon,"naix"))    user_icon="2U3M";
        if (!std::strcmp(icon,"pudge"))    user_icon="3U3M";
    if (!std::strcmp(icon,"lich"))    user_icon="4U3M";
        if (!std::strcmp(icon,"balanar"))    user_icon="5U3M";
    
    if (!std::strcmp(icon,"hammer"))
    {
                /* special hammer icon for all crew members */
        if (account_get_command_groups(account) >  1)
         {
        user_icon="GUNB";            
        account_set_user_icon(account,clienttag,user_icon);
        conn_update_w3_playerinfo(c);
        channel_rejoin(c);
        return 0;
        }
        else {
            snprintf(msgtemp, sizeof(msgtemp), "Usted debe ser un miembro de la tripulación DarKGameS Battle.Net para establecer este icono!");
            message_send_text(c,message_type_error,c,msgtemp);    
            return 0;        
            }    
    }
    if (!std::strcmp(icon,"ladder"))
    {
                /* all solo and team rank special icons */
        if ((account_get_ladder_rank2(account, clienttag, "Solo") < 11) & (account_get_ladder_rank2(account, clienttag, "Solo") != 0))
            user_icon="DERW"; 
        else if ((account_get_ladder_rank2(account, clienttag, "Team") < 11) & (account_get_ladder_rank2(account, clienttag, "Team") != 0))
            user_icon="NRGW";
        else if ((account_get_ladder_rank2(account, clienttag, "Solo") < 31) & (account_get_ladder_rank2(account, clienttag, "Solo") != 0))
            user_icon="DLGW";
        else if ((account_get_ladder_rank2(account, clienttag, "Team") < 31) & (account_get_ladder_rank2(account, clienttag, "Team") != 0))
            user_icon="2LGW";
        else if ((account_get_ladder_rank2(account, clienttag, "Solo") < 101) & (account_get_ladder_rank2(account, clienttag, "Solo") != 0))
            user_icon="RUPW";
        else if ((account_get_ladder_rank2(account, clienttag, "Team") < 101) & (account_get_ladder_rank2(account, clienttag, "Team") != 0))
            user_icon="DNIW";
        else {
            snprintf(msgtemp, sizeof(msgtemp), "Usted debe llegar a 100 wins en solitario o Juegos en equipo escalera para configurar este icono!");
            message_send_text(c,message_type_error,c,msgtemp);    
            return 0;
            }
    
        account_set_user_icon(account,clienttag,user_icon);
        conn_update_w3_playerinfo(c);
        channel_rejoin(c);        
        return 0;
    }
    if (!std::strcmp(user_icon,"XXXX"))
    {
        eventlog(eventlog_level_warn,__FUNCTION__,"unknown icon: %x", icon);
        snprintf(msgtemp, sizeof(msgtemp), "No such icon. type /swapicon para ver los iconos disponibles.");
        message_send_text(c,message_type_error,c,msgtemp);
        return 0;
    }
    
        if (account_get_auth_icon(account,icon) == 1)
        {
            account_set_user_icon(account,clienttag,user_icon);
            conn_update_w3_playerinfo(c);
            channel_rejoin(c);
        }
        else
        {
            snprintf(msgtemp, sizeof(msgtemp), "El siguiente icono no está disponible para su cuenta.");
            message_send_text(c,message_type_error,c,msgtemp);    
        }
    
  return 0;
}

Posts: 9

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] The Source Code → /seticon /swapicon