Jump to content
Studweiser21

Damage Script help!

Recommended Posts

Hi all!

 

I'm trying to edit the rebirth skills base damage. Ideally, I'm thinking of having skill level increases similar to how normal skills work. I've tried different calulations, but I can't seem to get the damage to increase beyond the default. 

 function SkillArea_Circle_WuYin( sklv )							
	local side = 1000 
	SetSkillRange ( 4 , side  )  
end 

function SkillCooldown_WuYin( sklv )
	local Cooldown = 30000
	return Cooldown
end

function SkillSp_WuYin ( sklv )										
	local sp_reduce = 125 
	return sp_reduce 
end 

function Skill_WuYin_Begin ( role , sklv ) 

	local sp = Sp(role) 
	local sp_reduce = SkillSp_WuYin ( sklv ) 
	if sp - sp_reduce < 0 then 
		SkillUnable(role)   
		return 
	end 
	Sp_Red (role , sp_reduce ) 
end 

function Skill_WuYin_End ( ATKER , DEFER , sklv ) 		--Ethereal Slash

	local sklv = sklv
    	local dmg = math.random ( 999 , 1000 ) * sklv
	Hp_Endure_Dmg ( DEFER , dmg ) 

end 

This is the latest one, which you can see I've tried assigning math.random to it, and then just tightening up my damage levels to be within the 1 point of 1,000 that I wanted. 

 

And here's the original code: 

 function SkillArea_Circle_WuYin( sklv )							
	local side = 800 
	SetSkillRange ( 4 , side  )  
end 

function SkillCooldown_WuYin( sklv )
	local Cooldown = 30000
	return Cooldown
end

function SkillSp_WuYin ( sklv )										
	local sp_reduce = 125  
	return sp_reduce 
end 

function Skill_WuYin_Begin ( role , sklv ) 

	local sp = Sp(role) 
	local sp_reduce = SkillSp_WuYin ( sklv ) 
	if sp - sp_reduce < 0 then 
		SkillUnable(role)   
		return 
	end 
	Sp_Red (role , sp_reduce ) 
end 

function Skill_WuYin_End ( ATKER , DEFER , sklv ) 

    local dmg = math.random ( 350 , 650 )
	Hp_Endure_Dmg ( DEFER , dmg ) 

end 

Ideally, I'm looking for the correct part to add where the damage would be 1,000 base + an additional 1,000 per skill level. And admittedly, if anyone has a solid understanding of Headshot (where PR is not calculated), I'd like that to be configured in as well. 

 

Thanks so much! 

Share this post


Link to post
Share on other sites

Hello! To be honest, I didn't really understand properly, but this might be what you're looking for:

local dmg = 1000*sklv

Basically, level 1 would deal 1000 damage (1000*1), level 2 would deal 2000 (1000*2) and so on... Although what you've done is pretty much the same, so Idk...

If that's not what you're trying to achieve, you could try to better explain me and I could try to help.

Edited by Faller
  • Like 1

Share this post


Link to post
Share on other sites

You understood my question perfectly. I did try what you mentioned and was unable to get it to work. 

 

Cant help but wonder if the coding is somewhere else too and maybe you have to change both? I don't know. 

 

Ill try yours once in home just to make sure I didn't mess something up the first time. 

Share this post


Link to post
Share on other sites
4 hours ago, Studweiser21 said:

You understood my question perfectly. I did try what you mentioned and was unable to get it to work. 

 

Cant help but wonder if the coding is somewhere else too and maybe you have to change both? I don't know. 

 

Ill try yours once in home just to make sure I didn't mess something up the first time. 

Hey! It's possible that you have got multiplied skills. What does that mean? You're editing one, but your server is loading another one (that comes after this one). I'd recommend looking "function Skill_WuYin_En" through your server files with Notepad++

If no matter what changes you make the damage doesn't change, that's surely the issue here. :P

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.


×
×
  • Create New...