vBrenth 39 Posted May 23, 2014 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 { Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted May 23, 2014 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 Quote Share this post Link to post Share on other sites
0 Xgear 44 Posted May 23, 2014 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) && ) Quote Share this post Link to post Share on other sites
0 vBrenth 39 Posted May 23, 2014 Thanks both of you problem solve, works both. Quote Share this post Link to post Share on other sites
How can i bypass the channel delay ? when im using GM character?
http://herc.ws/board/topic/316-introducing-hercules-channel-system/?p=36329
Share this post
Link to post
Share on other sites