Jump to content

Lighta

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Lighta

  1. well you could do it like that to but you're algo is like 2^joblen then mine... because you will check lot of empty space.

    Which job are not listed?

    If you want for instance see if HighPriest can wear item i:

    if(i.job & 0x00000100 && i.class & 2)

    (if the job is priest and the base is trans then it's an high priest).

     

    But yeah you need to parse the 2 column for high something, altought if you're goal is to see who could wear what you could probably do the 1st parse on i.class, then i.job for the remaining list.

    On sql (assuming mysql) it will be a :

    select * from item_db where equip_jobs&0x00000100 and equip_upper&2;

     

    (untested but something very close to this)

    • Upvote 1
  2. If I understand you correctly you trying to compare custom_item struct to item_db struct and feel a bit lost ? well actually the wiki may be confusing but the 2 file have the exact structure.

    Job,Upper == Job,Class

    job = restriction by player job attribute.

    upper or class = restriction by group class, (like trans, baby etc)

     

    Now you could very well put all the trans job combined into the job column and that will perform the same way as if you had put the restriction into upper. (although I may not sure about processing speed for this, but it will probably be at best equal or lower then the upper check)

     

    The hexadecimal  and binary representation is quite the same. we just use hexa for easier representation.

    Novice (2^00): hexa=0x1 bin=1 decimal=1

    Swordman : hexa 0x2 bin=10 decimal=2

    ....

    ok maybe my exemple suck but just look deeper into hexadecimal representation you'll see that we shift 1 bit up each time.

     

    If you looking for a pseudo-code to deflat that number :

    i=0; while(i < job_len) { if(field & 1<<i) job[i].authorised; i++ }
    

    Basically we loop trough all the job we have and since each job is like job1=01, job2=10.. we just move our mask 1 bit up each time.

     

    Hope I answered your question, but idk really what u looking for really =(

  3. it not on our current plan no,

    we might extend or add some db to offert you guys more configuration possibility and allow for us to add content without hardcoding them but nothing like reformat those to LUA like.

    From Herc they claim 2 point :

    -readibility : ok ye sure for 1 item but for many boarf, (just because you don't always know wich column is what in our format but you can insert it in any tabler like excel say csv and poof all good.

    -faster : yeah, well this is mainly due to libconfig, when you parse with it you have to specify what kind of type is each field. Since parsing bool or int is faster then parsing string then it's normal.

    -inherit : use definition of another item and add stuff to it, (well @override mostly), not that used but this could be usefull ye why not, but we just need to add a column to this to our current format.

    • Upvote 1
  4. Ah ok for the status_change_clear_buffs part, for the debuff_on_logout part coupled with SC_NO_SAVE I have a feeling that a bit too overly complex.

    I mean for logout we should just say, if he have NO_SAVE drop it that it.

  5. Look good look good, didn't review it yet but if you people want to try it and give us feedback that will help.

    The main idea when I started was this:

    -Offert a way to easily add/remove Status_Icone without the need of recompiling server.

    -Allow Status_Bonus, to be enable or disable by simply removing SCB from it. (not just prevent the recalculation like actual but really doesn't trigger the bonus)

    -Allow Status listing mode alteration on the fly (without the need of reboot). like if you wanted put a status that was removed on death permanent just alter his flag.

    (whereas adding it to a hardcoded list actually).

    In short remove as possible the hardcoded list into the emulator and offert the possibility of admin to edit this easily without the need of src edit.

     

    @Cydh

    In sc_config_db.txt I didn't get the purpose of type (buff/debuff) and it seem you have forget to put it in your exemple =). What does this implies?

    SCO_REM_ONLOGOUT        = Remove when player logs out

    Shouldn't this be the default ? so we should have SCM_NO_REM_ONLOGOUT instead ??

  6. That make sense @Ceejay Abne. I can't really what you have add directly but I suppose it was a number after the scanf.

    sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 3

    That should fix your data requirement.

    About stackable not able to being bounded, I don't see you will want to make this ? I think that will remove a big possibility of usage.

    Let say you have done a new instances, that require party to go in etc and you give 100 condensed white potion to everyone in the team to help to do it.

    You may want to itembound it to party so those new potion wont stored and kafra and used for another purpose.

    (It doesn't totally force to be used here but it's a little constraint).

    Or if you organize a TvT tournament etc, in that case is even better cause you could chose to break their party in the end and the item will be destroy.

     

    @retroflag, this is possible and you have the base to do it but it will require little src edit and to finish the design. 1 problem about your idea is currently when a monster drop there is 3 priority pickup, then everyone can loot the item, how will you deal with that or do you want to be bounded only when it was looted ?

  7. 1) Noitemtrade that could be usefull but it's kinda the same idea as item_trade.txt (they both restrict item exchange) so instead having a mapflag for this I'd rather have a option for that in this db. Or maybe we could have both so item_trade.txt would stay item specific while the mapflag will prevent anykind of trade?? (not sure yet I just don't like having similar concept into multiple file as it's confusing after..)

    Anyway noitemtrade mapflag is a pretty easy src edit with no offi usage yet (I think) so the necesity of us adding this is limited.

    (What I really mean is that we could add hundred of mapflag for various reason, so I think we should choose the one that would be the more usefull to not tend to a bloatware. If you understand the mapflag concept, that one is easy enough to not have us to do it for you)

     

    2) Idk what is that, this one look a bit more interesting as it doesn't look as intuitive as adding a mapflag with a restriction on it.

     

    3) Medium difficulty but look really like a addon / mod

     

    4) See guildhp is something I would be ok to add as a battleflag 

     

    5) Need a list to comment it but script and atcommand are imo the the easiest module to start off, (due to low couplage) so that like level 1, we have an infinity of script command that could be added, some may be usefull some bof, if we go to the end all src fonction could somewhat have script equivalent. (So that admin won't have to reboot to apply change etc..). But script are slower then src (always) so in the end it doesn't sound like the solution.

    Imo I think we should judge each script command, now if it's a suplement of an existing funciton and that it keep backward then ye go on.

    But mostof time anyway if there something thatit's not possible to do it in script actually will add a command tomake it so.

     

    6) This sound like guardian, best would be to revamp monster of guardian command to add parameter to makethem ally or specify their maxhp and such.

    • Upvote 1
  8. If he building the conf the compilation went fine.

    Not about the newline error you can open the specified file and add a line at the end of it if you feel more secure about this.

    He need to leave each subdirectory of src to build them all.

    Say our serv is in /home/rathena

    When you do 'make sql' in that directory we start here :

    /home/rathena/Makefile

    Then see target sql: => sql: $(SQL_DEPENDS)

    SQL_DEPENDS=common_sql login char map import

    So he will do target common_sql login char map import.

    common_sql: $(COMMON_SQL_DEPENDS)

    @$(MAKE) -C src/common sql

    @$(MAKE) -C src/common sql => this mean go in src/common directory and execute 'make sql'

    login: $(LOGIN_SQL_DEPENDS)

    @$(MAKE) -C src/login sql

    @$(MAKE) -C src/common sql => this mean go in src/login directory and execute 'make sql'

    etc...

    So yeah he leaving and entering lot of directory to build the whole binary.

    "Because my trunk is Windows, i just transferred to a linux VPS. Is that okay?" ??

    As long as you didn't transfered Windows binary and expect them to run into your linux vps it's fine. But I don't see why you didn't fetch the content into your linux host directly..

×
×
  • Create New...