Join or Create guild restrictions.

Total

New member
Messages
14
Points
0
Hello,

I want to make it so any account that has group_id = 1 not able to join or create a guild.

Is there a setting already available for this? if not how can i make this happen?

Your help is much appreciated.

 
In clif.c

Find:

void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
{
char name[NAME_LENGTH];
safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);

if(map->list[sd->bl.m].flag.guildlock) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}

guild->create(sd, name);
}

And replace for:

Code:
void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
{
	char name[NAME_LENGTH];
	safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);

	if(sd->group_id == 1){
		clif->message(fd, "You cannot create a Guild.");
		return;
	}
	if(map->list[sd->bl.m].flag.guildlock) {
		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
		return;
	}

	guild->create(sd, name);
}
 
Thank you, works perfect.

How about the joining guilds? can i make it so players cannot invite group_id = 1 players to their guild?

 
Thank you, works perfect.

How about the joining guilds? can i make it so players cannot invite group_id = 1 players to their guild?
Inc clif.c

Find:

bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
if ( t_sd == NULL )// not online or does not exist
return false;

nullpo_retr(false, sd);
nullpo_retr(false, t_sd);
if ( map->list[sd->bl.m].flag.guildlock ) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return false;
}

if (t_sd->state.noask) {// @noask [LuzZza]
clif->noask_sub(sd, t_sd, 2);
return false;
}

guild->invite(sd,t_sd);
return true;
}

Replace for:

Code:
bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
	if ( t_sd == NULL )// not online or does not exist
		return false;

	nullpo_retr(false, sd);
	nullpo_retr(false, t_sd);
	if ( map->list[sd->bl.m].flag.guildlock ) {
		clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
		return false;
	}
        if(sd->group_id == 1){
            clif->message(fd, "You cannot create a Guild.");
            return false;
}
	if (t_sd->state.noask) {// @noask [LuzZza]
		clif->noask_sub(sd, t_sd, 2);
		return false;
	}

	guild->invite(sd,t_sd);
	return true;
}
 
Last edited by a moderator:
Perfect thanks,

Was missing the closing } but all working other than that.

Much appreciated.

 
Back
Top