Jump to content
  • 0

how to disable guild recruiting on a specific time?


Question

Posted

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.

4 answers to this question

Recommended Posts

Posted

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).

Posted

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?

Posted

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))

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...