viewing paste Unknown #13907 | C++

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//Whether or not to create guild
int guild_created(int account_id,int guild_id) {
        struct map_session_data *sd=map_id2sd(account_id);
 
        if(sd==NULL)
                return 0;
        if(!guild_id) {
                clif_guild_created(sd, 2); // Creation failure (presence of the same name Guild)
                return 0;
        }
 
        sd->status.guild_id = guild_id;
        clif_guild_created(sd,0);
        if(battle_config.guild_emperium_check)
                pc_delitem(sd,pc_search_inventory(sd,ITEMID_EMPERIUM),1,0,0,LOG_TYPE_CONSUME);  //emperium consumption
        if(sd->status.zeny < 1000000){ //zeny requirement
                clif_guild_created(sd,3); //or maybe a clif_display for custom message
        return 0;
}
Viewed 680 times, submitted by Pneuma.