Jump to content
  • 0

how to disable guild recruiting on a specific time?


Brynner

Question


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

im just wondering if its possible to disable recruiting guild member on a specific time?

 

ex.

from

OnClock0000: to OnClock0025:. you can't invite guild member on your guild. after OnClock0026: it will be back to normal. you can now invite guild members.

 

thanks in advance.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

This isn't possible via a script. You'd have to make a source change in /src/map/guild.c::guild_invite. If you want to disable during WoE you can just do something like:

    if (agit_flag || agi2_flag) {
        clif_guild_inviteack(sd,0);
        return 0;
    }

 

If you are wanting to disable for specific times outside of WoE then you'll need to check with the timer.

    time_t timer;
    struct tm *t;
 
    time(&timer);
    t = localtime(&timer);
 
    if (t->tm_wday == x && t->tm_hour == 0 && t->tm_min >= 0 && t->tm_min < 26) {
        clif_guild_inviteack(sd,0);
        return 0;
    }

You'd need to change the x in the t->tm_wday to some value from 0-6 (Sunday = 0, Saturday = 6).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

thanks for the quick reply. so it would be just like this?

 

    if (t->tm_wday == 0 && 9 && t->tm_hour == 00 && t->tm_min >= 25 && t->tm_min < 26) {
        clif_guild_inviteack(sd,0);
        return 0;
    }

from sunday to sat. 00:00 to 00:25mins? how about multiple time sir?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Use || for every schedule sets

Link to comment
Share on other sites


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

You're wanting to disable guild invitations on all of Saturday and up to Sunday at 12:25AM?

if (t->tmwday == 6 || (t->tm_wday == 0 && t->tm_hour == 0 && t->tm_min >= 0 && t->tm_min < 26)) {

Or you're trying to disable on Saturday and Sunday, both days at 12:25AM?

if ((t->tm_wday == 0 || t->tm_wday == 6) && t->tm_hour == 0 && t->tm_min >= 0 && t->tm_min < 26))
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...