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.
Posted 27 November 2016 - 10:09 PM
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.
Posted 28 November 2016 - 02:35 PM
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:
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);
}
Posted 28 November 2016 - 07:29 PM
Thank you, works perfect.
How about the joining guilds? can i make it so players cannot invite group_id = 1 players to their guild?
Posted 29 November 2016 - 01:44 AM
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:
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;
}
Edited by Easycore, 29 November 2016 - 07:42 PM.
Posted 29 November 2016 - 05:53 PM
Perfect thanks,
Was missing the closing } but all working other than that.
Much appreciated.
0 members, 1 guests, 0 anonymous users