Jump to content

meko

Core Developers
  • Content Count

    363
  • Joined

  • Days Won

    46

Posts posted by meko


  1. mr9he4.png

    Contribute to open source and get a free limited-edition T-shirt

     

    What's Hacktoberfest?

    6jvpkn.pngHacktoberfest — brought to you by DigitalOcean in partnership with GitHub and Twilio — is a month-long celebration of open source software. Maintainers are invited to guide would-be contributors towards issues that will help move the project forward, and contributors get the opportunity to give back to both projects they like, and ones they've just discovered. No contribution is too small—bug fixes and documentation updates are valid ways of participating.

     

    From October 1 to October 31, contribute to any open source project (Hercules included) on GitHub to get a free T-shirt!
    5 pull requests are required. (Pull requests do not have to be merged and accepted; as long as they've been opened between the very start of October 1 and the very end of October 31, they count towards a free T-shirt.)

    We will be marking easy-to-tackle issues with the Hacktoberfest tag so that first time contributors can more easily find them.

     

    >> Register on hacktoberfest.digitalocean.com


    Resources

     

     

    FAQ

    • It is free to participate?
      • Yes!

     

    • Is shipping included?
      • Yes. DigitalOcean offers free worldwide shipping.

     

    • What shirt sizes are available for Hacktoberfest 2018?
      • DigitalOcean have not yet made public the size chart for 2018, but we know they at least offer S to 4XL sizes, for both male and female.

     

    • What's included in the package?
      • A thank you letter.
      • A T-Shirt.
      • A bunch of cool stickers.

     

    • Do I need to register for Hacktoberfest before starting to open Pull Requests?
      • No. You may register at any time during the month of October and DigitalOcean will count your pull requests retroactively from October 1 onwards.

     

    • Do all of my Pull Requests have to be sent to the same repository?
      • No. You may send PRs to any number of repositories you like, and as long as they are public and have an OSI-approved license they will count towards the 5+ PRs objective.

     

    • Do I have to wait for the start of October to open Pull Requests?
      • You may contribute all year long, but only PRs that are opened during the month of October will be counted.

  2. in the second skill, lookup for nearby BL_SKILL units (with map->foreachinarea) and then you will get a struct block_list so cast it to a struct skill_unit (with BL_UCAST) and check that su->group->skill_id matches the id of the first skill and then you can get the location with su->bl.x and su->bl.y


  3. This function does not check whether or not map->list contains map m before using it which can cause out-of-bounds read; but something else is weird here: your y0 is overflowed and your x0 is very high. Could you please provide a full backtrace? just write "bt full" when you see the (gdb) prompt

    Also it would help to know your git revision commit hash or tag


  4. those are reserved for future use, but feel free to use anything that is free between 400 and 1000, or between 10001 and 10248

    currently the only free ID within this range is 10204 but you could manually change src/map/npc.h on line 147 (currently the max is 10248)


  5. Duplicate npcs do share variables but this is legacy code that we can't change without breaking backward-compatibility. What we could do however is add a config flag so you can manually choose the desired behaviour.

    The problem is that in npc_duplicate_script_sub the function does npc->script = source->script, so it creates a pointer to the parent script_code struct instead of creating its own and variables are stored in this struct. The Evol plugin fixes this by creating its own struct but since I see other people want this change I will move it to Hercules directly instead.


  6. if you only want to compare account ID then there is no need to use SQL at all

    if (!(#REG_REWARD & (1 << 0)) && getcharid(CHAR_ID_ACCOUNT) < 3000000) {
    	getitem(TIER_1_ITEM, 1);
    	#REG_REWARD |= 1 << 0;
    }
    
    if (!(#REG_REWARD & (1 << 1)) && getcharid(CHAR_ID_ACCOUNT) < 2800000) {
    	getitem(TIER_2_ITEM, 1);
    	#REG_REWARD |= 1 << 1;
    }
    
    if (!(#REG_REWARD & (1 << 2)) && getcharid(CHAR_ID_ACCOUNT) < 2500000) {
    	getitem(TIER_3_ITEM, 1);
    	#REG_REWARD |= 1 << 2;
    }
    
    if (!(#REG_REWARD & (1 << 3)) && getcharid(CHAR_ID_ACCOUNT) < 2200000) {
    	getitem(TIER_4_ITEM, 1);
    	#REG_REWARD |= 1 << 3;
    }
    
    if (!(#REG_REWARD & (1 << 4)) && getcharid(CHAR_ID_ACCOUNT) < 2050000) {
    	getitem(TIER_5_ITEM, 1);
    	#REG_REWARD |= 1 << 4;
    }
    
    if (!(#REG_REWARD & (1 << 5)) && getcharid(CHAR_ID_ACCOUNT) < 2005000) {
    	getitem(TIER_6_ITEM, 1);
    	#REG_REWARD |= 1 << 5;
    }
    
    if (!(#REG_REWARD & (1 << 6)) && getcharid(CHAR_ID_ACCOUNT) < 2001000) {
    	getitem(TIER_7_ITEM, 1);
    	#REG_REWARD |= 1 << 6;
    }
    
    if (!(#REG_REWARD & (1 << 7)) && getcharid(CHAR_ID_ACCOUNT) < 2000300) {
    	getitem(TIER_8_ITEM, 1);
    	#REG_REWARD |= 1 << 7;
    }

     

    Just change TIER_X_ITEM to whatever item you want to give. This script uses the first 8 bits (1 byte) of the #REG_REWARD integer variable so you can use the last 3 bytes to store other data if you wish.


  7. if your upstream remote is named "origin" (most likely if you didn't rename it) you can do git fetch origin, followed by git rebase origin/stable

    this should grab the latest stable revision and re-apply your commits on top

     

    you might want to check the git documentation on git-scm.com

     

     

    Keep in mind that there hasn't been any commits in stable for 24 days, so if you want the very latest revision you should use origin/master instead of origin/stable. The next release is coming to stable on July 1

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.