Radian Posted December 18, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted December 18, 2014 Hello everyone can I request something like this. =========================================================== Example in the group.conf : id: 0 name: "Player" level: 0 char_limit: 9 // Character limitation [ Min 1 / Max 9 ] =========================================================== Quote Link to comment Share on other sites More sharing options...
Lighta Posted December 18, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted December 18, 2014 oh ye look quite nice idea =) You just need the login_serv to parse group.conf with those values. Also you need to handle the case of vip_increase. Quote Link to comment Share on other sites More sharing options...
Radian Posted December 18, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted December 18, 2014 oh ye look quite nice idea =) Thank you.. You just need the login_serv to parse group.conf with those values. Also you need to handle the case of vip_increase. but how can I do that ? Quote Link to comment Share on other sites More sharing options...
Lighta Posted December 18, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted December 18, 2014 See src/map/pc_group.c. Either you copy the read_config part, or you move that file into common/ so login could access it. Note that moving stuff to common will make 1 object for all the 3 serv. Quote Link to comment Share on other sites More sharing options...
Radian Posted December 19, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted December 19, 2014 oh ye look quite nice idea =) You just need the login_serv to parse group.conf with those values. Also you need to handle the case of vip_increase. I appreciate your suggestion, but i really don't have any idea with it im sorry. Anyone willing to make this mod? Quote Link to comment Share on other sites More sharing options...
Lighta Posted December 19, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted December 19, 2014 I don't want to say ok I'll do it cause I have lot of old diff waiting to be finish. For what I remeber when I was playing with vip, which was altering the numbr of char available the sequence was at follow. Login_serv read group int logchrif_send_accdata(int fd, uint32 aid) => send to char how many Char this account couldhave depending on login.howmanychar_perAccount.conf and VIP. chlogif_parse_reqaccdata => verify that value cap it chclif_mmo_send082d() or chclif_mmo_send006b() => display the availables char to client. Ok now since all the data are being transfered you could read it anywhere, (login or char). Now the only difficulty here is reading group.conf (I mean for you, for us to implent it to rA we have to besure all combinaison is working fine and since idk what the max character isanymore that my issue.) Ok so to read a config file it's easy and could be done like so config_setting_t *groups = NULL; //struct to hold conf reading const char *config_filename = "conf/groups.conf"; // specify your conf file if (conf_read_file(&pc_group_config, config_filename)) //dump your conf file into a struct return; groups = config_lookup(&pc_group_config, "groups"); //read the group name 'group' if (groups != NULL) { group_count = config_setting_length(groups); //get number of group defined (admin+player+support.... for (i = 0; i < group_count; ++i) { //loop for each of them int char_pergroup = 0, int id=0; //declaration of the data we looking on the conf config_setting_t *cur_group = config_setting_get_elem(groups, i); config_setting_lookup_int(group, "id", &id)); reading the group_id config_setting_lookup_int(group, "char_pergroup", &char_pergroup); //reading field char_pergroup and put it into char_pergroup variable idb_put(group_db, id, char_pergroup); //retain hashset <groupid,char_pergroup> into a db. } } Now do not I only read id and char_pergroup from this group.conf. Also to retain I used a DB name group_db, this one have to be created before trying to read group.conf (I suggest into a do_init somewhere, and don't forget to destroy it also (in do_final)) Once you have that value it's simply a matter of sending the correct value from the different function I have listed for you in the sequence. Quote Link to comment Share on other sites More sharing options...
Radian Posted January 23, 2015 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted January 23, 2015 I've tried to read and look for those code but I can't think of a way to apply it. Quote Link to comment Share on other sites More sharing options...
Question
Radian
Hello everyone can I request something like this.
===========================================================
Example in the group.conf :
id: 0
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.