Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → [Request] PvPGN FIX

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 23

1

Topic: [Request] PvPGN FIX

please help me .. I would like to ask pvpgn and in the win32 folder pvpgnnya no-project and taught me to edit / red, / nullred, / nullann, / talk, / meall, / redchat, / annchat please help me

but I thank you before

2

Re: [Request] PvPGN FIX

aLbHy wrote:

please help me .. I would like to ask pvpgn and in the win32 folder pvpgnnya no-project and taught me to edit / red, / nullred, / nullann, / talk, / meall, / redchat, / annchat please help me

but I thank you before

/red?

message_type_error

/nullred?

message_type_error

and

snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);

/nullann?

message_type_info

and

snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);

/talk?

message_type_talk

/meall?

message_type_emote

/redchat?

message_type_error

and modifi do_whisper

3

Re: [Request] PvPGN FIX

/nullredchat and /nullannchat

4 (edited by Zeloit 23.05.2013 09:49)

Re: [Request] PvPGN FIX

zzzzz

is not null

snprintf(msgtemp, sizeof(msgtemp), "%s: %s: %s",account_get_grade(account),conn_get_username(c),&text[i]);

is null

snprintf(msgtemp, sizeof(msgtemp), "%s",&text[i]);

5

Re: [Request] PvPGN FIX

please explain it properly .. I do not understand because I am a beginner

Added: 23.05.2013 12:57

zeloit thanks .. but if the / nullredchat and / nullannchaat what his code?

6

Re: [Request] PvPGN FIX

change and edit to do_whisper, you create do_chat  << you know?
different at do chat, change message_type_whisper to message_type_info,
and than, you creating new command, like /whisper, ex:

static int _handle_chat_command(t_connection * c, char const *text)
{
char         user[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];
  unsigned int i,j;

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

  if ((dest[0]=='\0') || (text[i]=='\0'))
    {
      message_send_text(c,message_type_info,c,"Sends chat to one user, info type");
      message_send_text(c,message_type_info,c,"type: /chat <username> <text>");
      return 0;
    }

  do_chat(c,user,&text[i]);

  return 0;
}

Added: 23.05.2013 13:14

before, you create:

static void do_chat(t_connection * user_c, char const * dest, char const * text)
{
    t_connection * dest_c;
    char const *   tname;

    if (account_get_auth_mute(conn_get_account(user_c))==1)
    {
      message_send_text(user_c,message_type_error,user_c,"Your account has been muted, you can't chat to other users.");
      return;
    }  
    
    if (!(dest_c = connlist_find_connection_by_name(dest,conn_get_realm(user_c))))
    {
    message_send_text(user_c,message_type_error,user_c,"That user is not logged on.");
    return;
    }

    if (conn_get_dndstr(dest_c))
    {
        snprintf(msgtemp, sizeof(msgtemp), "%.64s is unavailable (%.128s)",conn_get_username(dest_c),conn_get_dndstr(dest_c));
        message_send_text(user_c,message_type_info,user_c,msgtemp);
        return;
    }

    message_send_text(user_c,message_type_info,dest_c,text);

    if (conn_get_awaystr(dest_c))
    {
        snprintf(msgtemp, sizeof(msgtemp), "%.64s is away (%.128s)",conn_get_username(dest_c),conn_get_awaystr(dest_c));
        message_send_text(user_c,message_type_info,user_c,msgtemp);
    }

    message_send_text(dest_c,message_type_info,user_c,text);

    if ((tname = conn_get_username(user_c)))
    {
        char username[1+MAX_USERNAME_LEN]; /* '*' + username (including NUL) */

    if (std::strlen(tname)<MAX_USERNAME_LEN)
    {
            std::sprintf(username,"*%s",tname);
        conn_set_lastsender(dest_c,username);
    }
    }
}

7

Re: [Request] PvPGN FIX

Error :     char         user[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];

8

Re: [Request] PvPGN FIX

aLbHy wrote:

Error :     char         user[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];

eaea

char    dest[MAX_USERNAME_LEN+MAX_REALMNAME_LEN];

9

Re: [Request] PvPGN FIX

Albhy..

you use pvpgn version 1.8.5 ?

10

Re: [Request] PvPGN FIX

Janu..

I do not know .. I only download what's in love zeloit .. while I can not / clan create

11

Re: [Request] PvPGN FIX

not using /clan create

because your pvpgn not version 1.99-SVN

12

Re: [Request] PvPGN FIX

I do not know what to download version 1.99 that there win32-project

13

Re: [Request] PvPGN FIX

use pvpgn magic builder for newbie

14

Re: [Request] PvPGN FIX

I've no pvpgn builder but no folder win32-project

do you have the files win32-project pvpgn version 1.99?

please help me smile

15

Re: [Request] PvPGN FIX

pvpgn 1.99 not using win32-project..

code.google.com/p/pvpgn-magic-builder/

that is link download pvpgn magic builder

you must completed all requirment

16

Re: [Request] PvPGN FIX

If I've downloaded all of my requirements can edit the pvpgn?

17

Re: [Request] PvPGN FIX

you must have Visual C++ 2010 (Express is supported) to compile pvpgn

18

Re: [Request] PvPGN FIX

long if I download visual studio 2010 if possible. I'm pvpgn builder got you janu

Added: 23.05.2013 13:44

Zeloit :


zeloit fixed error which char dest [+ MAX_USERNAME_LEN MAX_REALMNAME_LEN];

Added: 23.05.2013 13:49

I already have a microsoft visual studio 2010 express

19

Re: [Request] PvPGN FIX

error do_chat(c,user,&text[i]); "user undeclared identifier" 

20

Re: [Request] PvPGN FIX

Dante wrote:
error do_chat(c,user,&text[i]); "user undeclared identifier" 

added

char const * user;

21

Re: [Request] PvPGN FIX

added next to where? please explain

22

Re: [Request] PvPGN FIX

Zeloit, Can you provide full source?
For command /chat

23

Re: [Request] PvPGN FIX

facepalm. Are you know C++?

Posts: 23

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 → [Request] PvPGN FIX



Generated in 0.161 seconds (85% PHP - 15% DB) with 20 queries