Jump to content
  • 0

how to add 3 minute delay on @request?


jpnazar

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

how to add 3 minute delay on @request?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

inside

trunk/src/map/pc.h

 

unsigned int canuseitem_tick;
unsigned int request_delay_tick; <------ ADD THIS 

inside

trunk/src/map/atcommand.c

@request

if( DIFF_TICK( sd->request_delay_tick,gettick() ) > 0 ){
	clif_displaymessage(fd,"There is a 3 minutes delay in using @request command");
	return 0;
}else{
	sd->request_delay_tick = gettick() + 180000; 
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

where to add this what part?

if( DIFF_TICK( sd->request_delay_tick,gettick() ) > 0 ){
	clif_displaymessage(fd,"There is a 3 minutes delay in using @request command");
	return 0;
}else{
	sd->request_delay_tick = gettick() + 180000; 
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  188
  • Reputation:   16
  • Joined:  06/12/12
  • Last Seen:  

/*=====================================
 * Send a @request message to all GMs of lowest_gm_level.
 * Usage: @request <petition>
 *-------------------------------------*/
ACMD_FUNC(request)
{
    if (!message || !*message) {
        clif_displaymessage(sd->fd,msg_txt(sd,277));    // Usage: @request <petition/message to online GMs>.
        return -1;
    }

    sprintf(atcmd_output, msg_txt(sd,278), message);    // (@request): %s
    intif_wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output);
if( DIFF_TICK( sd->request_delay_tick,gettick() ) > 0 ){
    clif_displaymessage(fd,"There is a 5 seconds delay in using @go command");
    return 0;
}else{
    sd->request_delay_tick = gettick() + 180000; 
}
    clif_disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
    clif_displaymessage(sd->fd,msg_txt(sd,279));    // @request sent.
    return 0;
}
 


 

i think this would work

 : find "

Send a @request message to all GMs of lowest_gm_level." on atcommand replace with above.
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...