Bypass the delay.

vBrenth

New member
Messages
392
Points
0
Age
35
Location
Philippines
Discord
Brenth
Github
vBrenth
Emulator
Client Version
RE
How can i bypass the channel delay ? when im using GM character?

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

Code:
   	 } 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 {
 
Change

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

Code:
if( (sd->group_id < 1) && (v < 0 || v > 300) ) { //If GM Group < 1, then Delay Applies, If Group_ID>=1,Delay is Bypassed 
 
Last edited by a moderator:
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) && )

 
Last edited by a moderator:
Back
Top