Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → [solved] please helpe me make new icon

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 12

1

Topic: [solved] please helpe me make new icon

i use this code

http://forums.harpywar.com/viewtopic.php?id=1007

But i get error like this


/home/pvpgn/src/bnetd/command.cpp: In function ‘int pvpgn::bnetd::_handle_seticon_command(pvpgn::bnetd::t_connection*, const char*)’:
/home/pvpgn/src/bnetd/command.cpp:4489:98: error: ‘account_get_auth_icon’ was not declared in this scope
         snprintf(msgtemp, sizeof(msgtemp), "Bomb: Bomb , %d",account_get_auth_icon(account,"bomb"));
                                                                                                  ^
/home/pvpgn/src/bnetd/command.cpp:4563:75: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘const char*’ [-Wformat=]
         eventlog(eventlog_level_warn,__FUNCTION__,"unknown icon: %x", text);
                                                                           ^
/home/pvpgn/src/bnetd/command.cpp:4570:43: error: ‘account_set_auth_icon’ was not declared in this scope
     account_set_auth_icon(account, icon, 1);
                                           ^
/home/pvpgn/src/bnetd/command.cpp:4577:43: error: ‘account_set_auth_icon’ was not declared in this scope
     account_set_auth_icon(account, icon, 0);
                                           ^
make[2]: *** [src/bnetd/CMakeFiles/bnetd.dir/command.o] Error 1
make[1]: *** [src/bnetd/CMakeFiles/bnetd.dir/all] Error 2


How to solve it Thanks

Added: 18.10.2014 02:17

waw no one cannot help me oh big_smile , useless this forum tongue only view my post

2

Re: [solved] please helpe me make new icon

You added the code only command.cpp or account_wrap.cpp and account_wrap.h too?
if only command.cpp - the error is obvious

3

Re: [solved] please helpe me make new icon

XOM91K wrote:

You added the code only command.cpp or account_wrap.cpp and account_wrap.h too?
if only command.cpp - the error is obvious

Thanks for reply me , but what i need to add code in account_wrap.h , because dont have any code in that tutorial .

Izit i add this code

extern int account_get_ladder_rank2(t_account * account, t_clienttag clienttag, const char* id);
?

Please help me , Thanks before

Added: 18.10.2014 10:36

Thannks for you bro already help , work 100 %

Added: 18.10.2014 13:34

@XOM91K i already success , compile it , i also add iconindex_exp.txt  into icon-war3.bni ,  when i give icon to my account  nothing change icon with my account,  what error again bro ?? can you tell me ? Thanks Before

4

Re: [solved] please helpe me make new icon

In database what writes?

5

Re: [solved] please helpe me make new icon

Just use the latest code with icon stash support or extract the proper code from the repo commits https://github.com/HarpyWar/pvpgn

http://forums.harpywar.com/viewtopic.php?pid=6149#p6149

Do not ask for support in PM.

6

Re: [solved] please helpe me make new icon

Thanks you @harpy and @XOM91K  , now i just wanna ask , how about make own flags like in  this link :

forums.pvpgn.org/index.php?topic … 19#msg9219

i just confuse how to changes like this

for example :

  if (account_get_auth_admin(acc,channel) == 1 || account_get_auth_admin(acc,NULL) == 1)
    newflags = RKD1; // MF_BLIZZARD
  else if (account_get_auth_operator(acc,channel) == 1 ||
      account_get_auth_operator(acc,NULL) == 1)
    newflags = MF_BNET;
  else if (channel_conn_is_tmpOP(conn_get_channel(c),c))
    newflags = MF_GAVEL;
  else if ((account_get_auth_voice(acc,channel) == 1) ||
      (channel_conn_has_tmpVOICE(conn_get_channel(c),c)))
    newflags = MF_VOICE;
  else
    if ((conn_get_clienttag(c) == CLIENTTAG_WARCRAFT3_UINT) ||
   (conn_get_clienttag(c) == CLIENTTAG_WAR3XP_UINT))
      newflags = W3_ICON_SET;
    else
      newflags = 0;

   newflags = 0x00000080;   // That's it. It should appear in the icon D channel for any user.

  if (conn_get_flags(c) != newflags) {
    conn_set_flags(c, newflags);
    channel_update_userflags(c);
  }

  return 0;
}

where find MF_Blizzard , MF_bnetd , MF_VOICE , MF_GAVEL ?

Because i wanna add my own flag .

then 1 more question izit can change color of admin or operator ??

7

Re: [solved] please helpe me make new icon

color text chat or color nickname?  smile

8

Re: [solved] please helpe me make new icon

Are you talking about Starcraft?
Why do you want use flags? Use icons instead.

Do not ask for support in PM.

9

Re: [solved] please helpe me make new icon

XOM91K wrote:

color text chat or color nickname?  smile

Color text bro smile

Added: 26.10.2014 15:29

HarpyWar wrote:

Are you talking about Starcraft?
Why do you want use flags? Use icons instead.

This for warcrft III battle net , yah i know can use command /flag , but the things is  i wanna make the new rank apart operator , and admin , then  i wanna make diffrent flag when i promote  new rank to users , not flag Mf_bnet or MF_BLIZZARD but my own FLag , izit can rite ?

10

Re: [solved] please helpe me make new icon

Flags can have an ID value degree of two: 0x2, 0x4, 0x8, ... . So count is limited.
Anyway it needs some testing to add a new rank in addition to voice/operator/admin.
You should find all the occurences in code. For example find "account_get_auth_voice" (or "MF_VOICE", etc..) and add your own rank using the same way.

Do not ask for support in PM.

11

Re: [solved] please helpe me make new icon

There are several pre-defined event-colors in Battle.net chat. It's in a file war3xlocal.mpq\UI\FrameDef\NetworkStrings.fdf (archive war3xlocal.mpq is on a client side):

...
// --- chatdisplay colors
CHATCOLOR_TALK_USER                 "|CFFFED312",
CHATCOLOR_TALK_MESSAGE              "|CFFFFFFFF",
CHATCOLOR_WHISPER_USER              "|CFFFED312",
CHATCOLOR_WHISPER_MESSAGE           "|CFF00FF00",
CHATCOLOR_WHISPERSENT_USER          "|CFFFED312",
CHATCOLOR_WHISPERSENT_MESSAGE       "|CFF00FF00",
CHATCOLOR_INFO_MESSAGE              "|CFF80D8FF",
CHATCOLOR_BROADCAST_MESSAGE         "|CFF80D8FF",
CHATCOLOR_EMOTE_MESSAGE             "|CFF888888",
CHATCOLOR_ERROR_MESSAGE             "|CFFFF0000",
...

That events are defined in message.h in PvPGN code, and you can use it in a function message_send_text().

Any HEX color you can use only in news.txt, w3motd.txt and in a game/lobby chat.

Do not ask for support in PM.

12

Re: [solved] please helpe me make new icon

REALLY THANKS YOU HARPY WARS

Posts: 12

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] The Source Code → [solved] please helpe me make new icon



Generated in 0.097 seconds (82% PHP - 18% DB) with 20 queries