Jump to content

kyenard

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by kyenard

  1. Just checked, bonus is being applied (by default It should not be shown on the Status Window) but the damage formula is a bit funky. Numbers sometimes are very low, despite having it multiple RandomBonus: 9900 stacked on top of each other over refinement. It feels like it increases both Min and Max Damage and the higher the Random Bonus accumulated, the wider the damage window is.


    Topic can be closed.

  2. Hi everyone,

    This might be a easy fix, but I can't really say where to go for the fix.

    I'm running a server Pre-RE, changed the status.hpp (To be able to Refine up to +20) and I'm working on the Refine.yml numbers.

    Everything I change seems to work just fine, but the "RandomBonus" never apply to refinement.

    Is there anything I should change to allow this feature to Work when I'm refining items?

     

      - Group: Weapon
        Levels:
          - Level: 1
            RefineLevels:
              - Level: 1
                Bonus: 400
                RandomBonus: 9900
                Chances:
                  - Type: Normal
                    Rate: 10000
                    Price: 50
                    Material: Phracon
                  - Type: Enriched
                    Rate: 10000
                    Price: 2000
                    Material: Enriched_Oridecon

    It only adds +4 Bonus Damage over the Refinement.

  3. Around 2019 I was working In a project where different arrows would get damage bonus from different Stats Point.

    I had It running perfectly on my old rAthena (Build 2018), but recently I decided to Update my rAthena to the 2022 Version and since then, It's not working as intended.

    I benefit getting damage from the Equipped Arrow, but the Damage is not Applied to Ranged Attacks.

    Is there a way to bypass Damage Attacks only raising based on HIT and DEX?

    Thanks for the help.

    image.png.6098622f74e0ed79064f77c9c8f1b750.png

  4. Changed this:

    		case SP_ATK2:
    			if(!sd->state.lr_flag) {
    				bonus = status->rhw.atk2 + val;
    				status->rhw.atk2 = cap_value(bonus, 0, USHRT_MAX);
    			}
    			else if (sd->state.lr_flag == 1) {
    				bonus = status->lhw.atk2 + val;
    				status->lhw.atk2 =  cap_value(bonus, 0, USHRT_MAX);
    			}

    I just removed the "== 1"

    I think this is responsible to make all Bonus2 only appliable from Hand Sources. Maybe I'm wrong, but that fixed my problem.

    Thanks!

    • Upvote 1
  5. Hello guys.

    Context first:

    Late 2018 I had a on going project on rAthena and one of my mods are on Arrows.

    Each arrow reads different Stat Points to give you Attack (Instead of DEX = HIT = More Damage)

    So this project was done with 2018 rAthena, and recently I updated my rAthena and had to migrate all the code I've changed to the new rAthena 2022.

     

    Now for the problem:

    bonus bAtkEle,Ele_Fire;
    bonus bAtk2,readparam(bInt)*6;
    bonus bDex,readparam(bDex)*-90/100;
    if(readparam(bInt)>=99){
    	bonus bInt,5;
    }

    This is what my Fire Arrow's Script looks like in my old project, client "2018-06-21aRagexeRE" and works just fine. The more INT I have, It give's me some Atk2 (Bonus Damage) and only counts for 10% Damage as long the source is DEX.

    But after having it tested on my new rAthena Build (2022) it's not working as intended. (No bonus damage added).

    I wonder if the way we write scripts on items are different or Am I missing something very obvious.

     

    I can provide more files information if needed, and despite not having coding experience, I'll take any comments that might enlighten me.

    Thanks

  6. On 6/9/2022 at 10:10 AM, Mael said:

    I don't think I read anything from iRO in your question...

    First download the one recommended by Akky and then, download the new Ai4rei updater and use it, it's just that.

    I've been looking for a way to get a decent way to update any of those Recent kRO Data folders I see people uploading online. Thanks for the Ai4Rei Updater tip.

  7. Hi everyone,

    I know that you can change your skill_db to set #hits and cooldown based on skill level, but I'm trying to find a way to use the skill.c (or perhaps battle.c) to create a better scaling/balanced environment.

    I'll explain. I'm going first to show you how Is my skill for Coldbolt.

    Battle.c

    					case MG_COLDBOLT:
    						skillratio += -100 + skill_lv * 20 + status_get_dex(src) * 5; //Skill Level x 20% Damage + DEX x 5% Damage

    Skill.c

    	case MG_COLDBOLT:
    		sc_start(src,bl,SC_SLOWDOWN,skill_lv * 3 + status_get_luk(src)/2,skill_lv,skill_get_time2(skill_id,skill_lv)); //Skill Level x 3% Slow Chance + LUK x 0.5% Slow Chance
    		break;

    As you can see, mechanically Cold Bolt is not working as the Original format. First off, the skill scales with Skill Level and secondarily with DEX points. The second point is the Slowdown Effect on use. After struck by the skill, the target has chances of losing Move Speed and this chance is Increased by LUK points. If I wanted to modify the duration of the Slow Effect, I could've changed skill_get_time2(skill_id,skill_lv) + status_get_lv(src)*100, this way I would increase the Slow Duration by 0.1s every Base Level. 

    So, back to my question:

    How can I add lines to change Cooldown and Number of Striking Hits on the skill? 

    Note: I see KN_Pierce has a multi-hit system but it's quite different from what I'm looking for.

  8. 6 hours ago, tribal0306 said:

    so what did you do? would you like to post an example so others can see.

    You have to create a condition on skill.c

    If your skill currently don't have any conditions bounded to it, you have to create the lines:

    case XX_YOURSKILL:
    sc_start(src,bl,SC_EFFECT,EFFECTCHANCE%,1,skill_get_time(skill_id, skill_lv));
    clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
    break;
    
    
    //Change this for the Skill you modifying, just like TF_BACKSLIDING
    //This is just a sample. Change SC_EFFECT to whatever you want, like SC_SLOWDOWN, SC_BLIND, etc. On EFFECTCHANGE% a number between 1 and 100.
    //The third line is what makes a Non-Offensive or Status Skill to activate SC Effects after use.
    //Close your condition with a final line, "break;"

    As for my code, this is how I'm using:

    	case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex]
    		sc_start(src,bl,SC_INCREASEAGI,100,1,skill_get_time(skill_id, skill_lv)); //Cast Agi UP Level 1
    		skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),(enum e_skill_blown)(BLOWN_IGNORE_NO_KNOCKBACK|BLOWN_DONT_SEND_PACKET));
    		clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
    		clif_blown(src); // Always blow, otherwise it shows a casting animation. [Lemongrass]
    		break;

    If you need some other reference, try to read the lines for SM_ENDURE (Endure Skill) for example. All self-buffing / status skills need to be marked as clif_skill_nodamage before they can generate a effect.

  9. Hunter's Steel Crow is getting awkward. All I could find about the skill while checking the Battle, Status, Skills.c files was the following code line:

    		case HT_BLITZBEAT:
    		case SN_FALCONASSAULT:
    			{
    				uint16 skill;
    
    				//Blitz-beat Damage
    				if(!sd || !(skill = pc_checkskill(sd,HT_STEELCROW)))
    					skill = 0;
    				md.damage = (sstatus->dex / 10 + sstatus->int_ / 2 + skill * 3 + 40) * 2;
    				if(mflag > 1) //Autocasted Blitz
    					nk |= NK_SPLASHSPLIT;
    				if (skill_id == SN_FALCONASSAULT) {
    					//Div fix of Blitzbeat
    					DAMAGE_DIV_FIX2(md.damage, skill_get_num(HT_BLITZBEAT, 5));
    					//Falcon Assault Modifier
    					md.damage = md.damage * (150 + 70 * skill_lv) / 100;

    What I understand is, this code only says whats is going to happen IF Steel Crow is not being considered on the calculations. Where exactly I can change to affect only the Steel Crow passive?

    Thanks in advance to anybody reading this.

  10. Hello,

    I'm currently working on many changes in my server and I would like to have some help on this one particular change I'm working on. I want to make the player get a Move Speed bonus right after using the skill Back Slide (Thief Quest Skill), It may or not include stats bonus (AGI, Flee, etc) but I'm focused on adding the "AGI UP" effect (May or not add visual effect). If anybody could help me to understand how can one effect to happen on self after casting a skill I would be very happy. I know so far how to do it, but only when I have to apply effects to Target skills (like Fire Bolts leaving target on burn, Frost Bolt leaving target slow, etc). Also, If you can't give the code lines or say exactly how I should edit my code, all I need is a few directions to understand what I need to do.

    Thank you for you time, I very much appreciate your help.

  11. 52 minutes ago, kyenard said:

    Title.

    I understand that eAthena has some kind of setting that won't read the script line attached to any Arrow/Ammunition Item. I found this line on Status.c but can't really find a way to make it work.

    
    if(sd->equip_index[EQI_AMMO] >= 0) {
    		index = sd->equip_index[EQI_AMMO];
    		if(sd->inventory_data[index]) { // Arrows
    			sd->bonus.arrow_atk += sd->inventory_data[index]->atk;
    			sd->param_equip,sd->param_bonus,sizeof(sd->param_equip);
    			sd->param_bonus, 0, sizeof(sd->param_bonus);
    			sd->state.lr_flag = 2;
    			if( !itemdb_group_item_exists(IG_THROWABLE, sd->inventory_data[index]->nameid) ) // Don't run scripts on throwable items
    				run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
    			sd->state.lr_flag = 0;
    			if (!calculating) // Abort, run_script retriggered status_calc_pc. [Skotlex]
    				return 1;
    		}
    	}

    Maybe is not a simples change 0 to 1, I understand, but If you can read better than I do, I would like to hear from you where could I change to make it happen. Thank you guys in advance for the help.

    Okay, before posting here I spent 4 straight hours trying a bunch of different things and couldn't find a right way to do it. Moments after posting here I found this post: Arrow Don't Work

    The solution presented is to delete the Flag on the script, although Is a different script, the structure is similar and made me think about my script one more time. So I deleted my Flag : "sd-> state.lr_flag = 2;" and that was the solution.

    I might leave this post here for future references.

    Thanks to rAthena community I was able to solve this one. Thanks guys.

  12. Title.

    I understand that eAthena has some kind of setting that won't read the script line attached to any Arrow/Ammunition Item. I found this line on Status.c but can't really find a way to make it work.

    if(sd->equip_index[EQI_AMMO] >= 0) {
    		index = sd->equip_index[EQI_AMMO];
    		if(sd->inventory_data[index]) { // Arrows
    			sd->bonus.arrow_atk += sd->inventory_data[index]->atk;
    			sd->param_equip,sd->param_bonus,sizeof(sd->param_equip);
    			sd->param_bonus, 0, sizeof(sd->param_bonus);
    			sd->state.lr_flag = 2;
    			if( !itemdb_group_item_exists(IG_THROWABLE, sd->inventory_data[index]->nameid) ) // Don't run scripts on throwable items
    				run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
    			sd->state.lr_flag = 0;
    			if (!calculating) // Abort, run_script retriggered status_calc_pc. [Skotlex]
    				return 1;
    		}
    	}

    Maybe is not a simples change 0 to 1, I understand, but If you can read better than I do, I would like to hear from you where could I change to make it happen. Thank you guys in advance for the help.

  13. I tried changing the same way you suggested and nothing happened.

    I found out my mistake. Thanks to your help, I opened my eyes to see closer. I investigated my Renewal.h

    My #ifndef RENEWAL was activated, which means, I should work on the ifndef code lines

    Final result is:

    #ifndef RENEWAL
    unsigned short status_base_matk_min(const struct status_data* status) { return status->int_ + ((status->int_ / 6) * (status->int_ / 5)) + (status->dex * 3/5); }
    unsigned short status_base_matk_max(const struct status_data* status) { return status->int_ + ((status->int_ / 5) * (status->int_ / 5)) + (status->luk * 3/5); }
    #else

    Thanks for the help. Case closed. ❤️

  14. I'm trying to change the original formula that gives you Magic Attack based on INT.

    So far I'm having trouble on this one and would like to use my formula:

    Quote

     

    Min Magic Attack = INT + ((INT/6) * (INT/6)) + (DEX*3/5)

    Max Magic Attack = INT + ((INT/5) * (INT/5)) + (LUK*3/5)

     

    Reading Status.c, I found the following original code line:

    * Calculates minimum magic attack
    */
    unsigned short status_base_matk_min(struct block_list *bl, const struct status_data* status, int level)
    {
    	switch (bl->type) {
    		case BL_PET:
    		case BL_MOB:
    		case BL_MER:
    		case BL_ELEM:
    			return status->int_ + level + status->rhw.matk * 70 / 100;
    		case BL_HOM:
    			return status_get_homint(bl) + level + (status_get_homint(bl) + status_get_homdex(bl)) / 5;
    		case BL_PC:
    		default:
    			return status->int_ + (status->int_ / 2) + (status->dex / 5) + (status->luk / 3) + (level / 4);
    	}
    }
    
    /*
    * Calculates maximum magic attack
    */
    unsigned short status_base_matk_max(struct block_list *bl, const struct status_data* status, int level)
    {
    	switch (bl->type) {
    		case BL_PET:
    		case BL_MOB:
    		case BL_MER:
    		case BL_ELEM:
    			return status->int_ + level + status->rhw.matk * 130 / 100;
    		case BL_HOM:
    			return status_get_homint(bl) + level + (status_get_homluk(bl) + status_get_homint(bl) + status_get_homdex(bl)) / 3;
    		case BL_PC:
    		default:
    			return status->int_ + (status->int_ / 2) + (status->dex / 5) + (status->luk / 3) + (level / 4);
    	}
    }
    #endif

    I tried many different ways to tweak the code, but so far I got no lucky understanding how Am I suppose to modify it to get Magic Attack from 3 different sources.

    My final attempt was to give up using the Pre-RE structure and replacing for the Renewal. Then I modified like this:

    #ifndef RENEWAL
    unsigned short status_base_matk_min(const struct status_data* status) { return status->int_ + (status->int_ / 7) * (status->int_ / 7); }
    unsigned short status_base_matk_max(const struct status_data* status) { return status->int_ + (status->int_ / 5) * (status->int_ / 5); }
    #else
    unsigned short status_base_matk_min(const struct status_data* status) { return (status->int_) + ((status->int_ / 6) * (status->int_ / 6)) + (status->dex*6/5); }
    unsigned short status_base_matk_max(const struct status_data* status) { return (status->int_) + ((status->int_ / 6) * (status->int_ * 25/96)) + (status->luk*6/5); }

    By doing so, the game reads as If I haven't changed anything. When I copy/paste the RENEWAL formula right after the #else, the game loads using RENWAL formulas, and they work.

    I need some light and I really appreciate any help ❤️

  15. Just wondering. Everyone says you suppose to Download the Official KRO, update both patches, add the opensetup to the folder, Drop the ~translations~ and make your diff using this 20180620 + nemo 4144.

    Question is: How do I fix my client not going past the login screen?

    Where can I download the right version that matches the 20180620? Do I need anything else?

    I can see on server logs I'm connecting but on the client it says failed to connect. Also I can see the account on my mySQL database.

    Problema rAthena.jpg

×
×
  • Create New...