Jump to content
  • 0

Chain lightning skill hits


Question

Posted

Hello guyz

I want to increase speed of chain lightning skill hits, it's not about delay/cooldown. 

this skill has 4 hits, and it's slow.

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Alright.

src/map/skill.cpp

Line: 4113

				case WL_CHAINLIGHTNING_ATK: {
						skill_attack(BF_MAGIC,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag); // Hit a Lightning on the current Target
						skill_toggle_magicpower(src, skl->skill_id); // Only the first hit will be amplified
						if( skl->type < (4 + skl->skill_lv - 1) && skl->x < 3  )
						{ // Remaining Chains Hit
							struct block_list *nbl = NULL; // Next Target of Chain
							nbl = battle_getenemyarea(src, target->x, target->y, (skl->type>2)?2:3, // After 2 bounces, it will bounce to other targets in 7x7 range.
									BL_CHAR|BL_SKILL, target->id); // Search for a new Target around current one...
							if( nbl == NULL )
								skl->x++;
							else
								skl->x = 0;							
							skill_addtimerskill(src, tick + 651, (nbl?nbl:target)->id, skl->x, 0, WL_CHAINLIGHTNING_ATK, skl->skill_lv, skl->type + 1, skl->flag);
						}
					}

 

This line:

skill_addtimerskill(src, tick + 651, (nbl?nbl:target)->id, skl->x, 0, WL_CHAINLIGHTNING_ATK, skl->skill_lv, skl->type + 1, skl->flag);

change: 651 to 100 or a number < 651 is the speed in miliseconds i guess?.  in 100 Chain Lighthing hits are very fast. Save and compile your svr.

Edited by Scanty
  • 0
Posted

Thanks so much, it worked but, there is another little problem, when i use the skill, sometimes casts 2hits at the same time. (the 2 first hits, 2 last hits, or both)

Is possible to make the same time always exactly ? 

Obs: i changed 651 to 300.

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...