Jump to content
  • 0
vBrenth

Bypass the delay.

Question

How can i bypass the channel delay ? when im using GM character?

http://herc.ws/board/topic/316-introducing-hercules-channel-system/?p=36329

   	 } else {            int v = atoi(sub3);            if( k == hChSys_OPT_MSG_DELAY ) {                if( v < 0 || v > 300 ) {                    sprintf(atcmd_output, msg_txt(1451), v, opt_str[k]);// value '%d' for option '%s' is out of range (limit is 0-300)                    clif->message(fd, atcmd_output);                    return false;                }                if( v == 0 ) {                    channel->opt &=~ k;                    channel->msg_delay = 0;                    sprintf(atcmd_output, msg_txt(1453), opt_str[k],channel->name,v);// option '%s' is now disabled for channel '%s'                    clif->message(fd, atcmd_output);                    return true;                } else {                    channel->opt |= k;                    channel->msg_delay = v;                    sprintf(atcmd_output, msg_txt(1452), opt_str[k],channel->name,v);// option '%s' is now enabled for channel '%s' with %d seconds                    clif->message(fd, atcmd_output);                    return true;                }            } else {

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Change

 

if( v < 0 || v > 300 ) { 

TO

if( (sd->group_id < 1) && (v < 0 || v > 300) ) { //If GM Group < 1, then Delay Applies, If Group_ID>=1,Delay is Bypassed 

Share this post


Link to post
Share on other sites
  • 0

If I got the question right, he wants to bypass the message delay and not the ability to bypass the delay ranges (Which is what you suggested)

 

If you wish to bypass messaging delay on a gm account you'd have to go to clif.c and search for clif_hercules_chsys_send

void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {	if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {		clif->colormes(sd->fd,COLOR_RED,msg_txt(1455));		return;	} else {		char message[150];		snprintf(message, 150, "[ #%s ] %s : %s",channel->name,sd->status.name, msg);		clif->chsys_msg(channel,sd,message);		if( channel->type == hChSys_IRC )			ircbot->relay(sd->status.name,msg);		if( channel->msg_delay != 0 )			sd->hchsysch_tick = timer->gettick();	}}

Replace with:

 

void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {	if( !pc_get_group_level(sd) && channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {		clif->colormes(sd->fd,COLOR_RED,msg_txt(1455));		return;	} else {		char message[150];		snprintf(message, 150, "[ #%s ] %s : %s",channel->name,sd->status.name, msg);		clif->chsys_msg(channel,sd,message);		if( channel->type == hChSys_IRC )			ircbot->relay(sd->status.name,msg);		if( channel->msg_delay != 0 )			sd->hchsysch_tick = timer->gettick();	}}

(Modified the first if statement on the code by adding !pc_get_group_level(sd) && )

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.