Jump to content
  • 0
Brynner

how to disable guild recruiting on a specific time?

Question

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.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

try this, inside guild.c

 

int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {    struct guild *g;    int i;    nullpo_ret(sd);    g=sd->guild;    if(tsd==NULL || g==NULL)        return 0;    if( (i=guild->getposition(g,sd))<0 || !(g->position[i].mode&0x0001) )        return 0; //Invite permission.    if(!battle_config.invite_request_check) {	    if (tsd->party_invite > 0 || tsd->trade_partner || tsd->adopt_invite) { //checking if there no other invitation pending            clif->guild_inviteack(sd,0);            return 0;        }    }        if (!tsd->fd) { //You can't invite someone who has already disconnected.        clif->guild_inviteack(sd,1);        return 0;    }+    if(mapreg_readreg( add_str( "$@inviteflag" ) )==1){+        clif->message(sd->fd, "Can't invite people now!");+        return 0;+    }            if(tsd->status.guild_id>0 ||        tsd->guild_invite>0 ||        ((iMap->agit_flag || iMap->agit2_flag) && map[tsd->bl.m].flag.gvg_castle))    {    //Can't invite people inside castles. [Skotlex]        clif->guild_inviteack(sd,0);        return 0;    }    //search an empty spot in guild    ARR_FIND( 0, g->max_member, i, g->member[i].account_id == 0 );    if(i==g->max_member){        clif->guild_inviteack(sd,3);        return 0;    }    tsd->guild_invite=sd->status.guild_id;    tsd->guild_invite_account=sd->status.account_id;    clif->guild_invite(tsd,g);    return 0;}

 

 

$@inviteflag = 1 ----> Can't invite people

 

 

-    script    asdfjkl    -1,{end;OnInit:    if(gettime(3) >0 || gettime(2) > 25 ) end;OnClock0:    set $@inviteflag,1;    end;OnClock0026:    set $@inviteflag,0;    end;}
Edited by Angelmelody

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.