Vasil 71 Report post Posted December 27, 2016 Hello,i know this was already answered by @Satan before but here it ain't working,tried other several methods without any success. Can anyone kindly share a working method in-here?Please? Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted December 27, 2016 (edited) Hi. Why it ain't working? Did you read your skill function before put the codes? You should read your skill function and see what it use. [Edit]: Check if your skill function dmg is not based on MAGIC_Atk_Dmg(a,b) function, if yes. You should put codes here.. Edited December 27, 2016 by Satan Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted December 28, 2016 (edited) local is_mob = GetChaTypeID(DEFER) if is_mob >4 then dmg = dmg*5 end "Xlcz" bolt -- "Bkcj" conch Edited December 28, 2016 by Ximboliex Quote Share this post Link to post Share on other sites
Shako 97 Report post Posted December 28, 2016 1 hour ago, Ximboliex said: local is_mob = GetChaTypeID(DEFER) if is_mob >4 then dmg = dmg*5 end "Xlcz" bolt -- "Bkcj" conch or you can do if isPlayer (DEFER) == 0 Quote Sunny Go! Online pko.host Share this post Link to post Share on other sites
Onioni 58 Report post Posted December 28, 2016 local ChosenMob = {} ChosenMob[679] = true ChosenMob[678] = true ChosenMob[987] = true ChosenMob[1219] = true ChosenMob[1220] = true ChosenMob[1234] = true ChosenMob[1235] = true ChosenMob[1236] = true ChosenMob[1237] = true if(ChosenMob[GetChaID(DEFER)] == true)then hpdmg = hpdmg*5 --Spiritual Bolt --dmg = dmg*5 -- Conch Ray/Lightning Bolt end I used something like this. Whit this way you can add right damage on any mobs u like to... Quote Download: Nightmare Demonic Helm Dimension Pirates Online files: get now New map Project: Flag PK Black Skin 3.1.3 for pko 1: Get now Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 28, 2016 @Satan function SkillSp_Xlcz ( sklv ) --技能"Spiritual Bolt"的sp消耗公式 local sp_reduce = 30 + sklv * 2 return sp_reduce end function SkillCooldown_Xlcz( sklv ) local Cooldown = 5000 - sklv * 250 return Cooldown end function Skill_Xlcz_Begin ( role , sklv ) local sp = Sp(role) local sp_reduce = SkillSp_Xlcz ( sklv ) if sp - sp_reduce < 0 then SkillUnable(role) return end Sp_Red (role , sp_reduce ) end function Skill_Xlcz_End ( ATKER , DEFER , sklv ) if ValidCha(ATKER) == 0 then LG ( "luascript_err" , "function Skill_Xlcz_End : ATKER as null" ) return end if ValidCha(DEFER) == 0 then LG ( "luascript_err" , "function Skill_Xlcz_End : DEFER as null" ) return end -- local atkdmg = Atk_Dmg ( ATKER , DEFER ) local lv_atker = Lv ( TurnToCha ( ATKER ) ) local lv_defer = Lv ( TurnToCha ( DEFER ) ) local sta_atker = Sta(ATKER) local sta_defer = Sta(DEFER) local lv_dif = math.max ( ( - 1 ) * 10 , math.min ( 10 , lv_atker - lv_defer ) ) local AddStateLv = 0 AddStateLv = GetChaStateLv ( ATKER , STATE_MLCH ) hpdmg = math.floor (( 10 + sta_atker * 2 ) * ( 1 + sklv * 0.25 ) * ( 1 + lv_dif * 0.075 )) local map_name_ATKER = GetChaMapName ( ATKER ) local map_name_DEFER = GetChaMapName ( DEFER ) local agi_atker = Agi(ATKER) local Can_Pk_garner2 = Is_NormalMonster (DEFER) if map_name_ATKER == "garner2" or map_name_DEFER == "garner2" then if Can_Pk_garner2 == 0 then local dmg = MAGIC_Atk_Dmg(ATKER,DEFER) hpdmg = math.floor (dmg * ( 1 + sklv * 0.50 ) ) -- Notice ( "statetime="..statetime) end end local job = GetChaAttr(a, ATTR_JOB) --不同职业采用不同的属性成长率 local dmg_fin = Cuihua_Mofa ( hpdmg ,AddStateLv ) + (sta_atker * 2) if (job == 13) then local dmg_fin = Cuihua_Mofa ( hpdmg ,AddStateLv ) * 2 end local dmg_ElfSkill = ElfSkill_MagicAtk ( hpdmg , ATKER ) dmg_fin = dmg_fin + dmg_ElfSkill Hp_Endure_Dmg ( DEFER, dmg_fin ) -- LG( "xlcz", "Spiritual Bolt Skill Level=" , sklv ,"Attacker sta=", sta ,"Normal attack damage=", atkdmg , "Skill Damage= " , dmg , "\n" ) end function MAGIC_Atk_Dmg(a,b) --[[计算普通攻击的基本正常伤害]]-- local job = GetChaAttr(a, ATTR_JOB) --不同职业采用不同的属性成长率 local sta_atker = Sta(a) local sta_defer = Sta(b) local atk_mnatk = math.floor (MnatkIb(a) + sta_atker*Magic_rate1[job] + Magic_rate2[job] * math.pow(math.floor( sta_atker*4/20), 2 )) local atk_mxatk = math.floor (MxatkIb(a) + sta_atker*Magic_rate1[job] + Magic_rate2[job] * math.pow(math.floor( sta_atker*4/20), 2 )) local defer_mgic_def = sta_defer * 2 local defer_resist = Resist(b) local atker_lv = Lv( a ) local defer_lv = Lv( b ) local lv_dis = atker_lv - defer_lv local lv_eff = 1 if math.abs (lv_dis) >= 1 then lv_eff =math.min ( math.max ( 0.5 , 1 + 0.025 * lv_dis ) , 1.5 ) end local atk = math.random( atk_mnatk , atk_mxatk ) local dmg = Magic_Dmg ( atk, defer_mgic_def , defer_resist ) --[[计算正常伤害值]]-- local mndmg = math.floor( Lv(a) * 0.25 + Mnatk(a) * 0 ) + 1 --[[计算最小伤害值]]-- dmg =math.max( lv_eff * dmg , mndmg ) return dmg end function Magic_Dmg (atk, def, resist ) --[[物理攻击计算]]-- local magic_atk = atk local magic_def = def local magic_resist = resist -- LuaPrint ( " Physical Attack= "..phy_atk.." Physical Defense= "..phy_def.."Physical Resist= "..phy_resist ) -- LuaPrint (\n) -- LG ( " Damage" , "Physical attack= ", phy_atk, "Physical Resist= " , phy_def, " Physical Resist= " , phy_resist, "\n" ) dmg = math.floor( (magic_atk - magic_def ) * (1 - math.min (0.85 , magic_resist/100 ) )) return dmg end Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted December 28, 2016 (edited) @Vasil Should be in MAGIC_Atk_Dmg(a,b) how i said, will be like it: function MAGIC_Atk_Dmg(a,b) --[[计算普通攻击的基本正常伤害]]-- local job = GetChaAttr(a, ATTR_JOB) --不同职业采用不同的属性成长率 local sta_atker = Sta(a) local sta_defer = Sta(b) local atk_mnatk = math.floor (MnatkIb(a) + sta_atker*Magic_rate1[job] + Magic_rate2[job] * math.pow(math.floor( sta_atker*4/20), 2 )) local atk_mxatk = math.floor (MxatkIb(a) + sta_atker*Magic_rate1[job] + Magic_rate2[job] * math.pow(math.floor( sta_atker*4/20), 2 )) local defer_mgic_def = sta_defer * 2 local defer_resist = Resist(b) local atker_lv = Lv( a ) local defer_lv = Lv( b ) local lv_dis = atker_lv - defer_lv local lv_eff = 1 if math.abs (lv_dis) >= 1 then lv_eff =math.min ( math.max ( 0.5 , 1 + 0.025 * lv_dis ) , 1.5 ) end local atk = math.random( atk_mnatk , atk_mxatk ) local dmg = Magic_Dmg ( atk, defer_mgic_def , defer_resist ) --[[计算正常伤害值]]-- local mndmg = math.floor( Lv(a) * 0.25 + Mnatk(a) * 0 ) + 1 --[[计算最小伤害值]]-- dmg =math.max( lv_eff * dmg , mndmg ) --5x damage on monsters if (IsPlayer(b) == 0) then dmg = dmg * 5 end return dmg end If conch ray dmg is based on this function too it will work without necessity implementation of more code. Edited December 28, 2016 by Satan Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 28, 2016 @Satan just tested it out,still no x5 DMG Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 28, 2016 If you don't mind,Give me your skype Quote Share this post Link to post Share on other sites
Maximilian 25 Report post Posted December 29, 2016 (edited) On 12/28/2016 at 4:56 AM, Ximboliex said: local is_mob = GetChaTypeID(DEFER) if is_mob >4 then dmg = dmg*5 end "Xlcz" bolt -- "Bkcj" conch On 12/28/2016 at 6:19 AM, Shako said: or you can do if isPlayer (DEFER) == 0 Note one very important thing the first function will not increase damage for mobs/bosses which are lance/carsises/phils/amis , for instance it won't increase the damage on CA mobs. So i reccomend everyone to use shako's logic. Edited December 29, 2016 by Maximilian 1 Quote Share this post Link to post Share on other sites
Shako 97 Report post Posted December 29, 2016 Remember to change (DEFER) to (b). Quote Sunny Go! Online pko.host Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted December 29, 2016 4 hours ago, Maximilian said: Note one very important thing the first function will not increase damage for mobs/bosses which are lance/carsises/phils/amis , for instance it won't increase the damage on CA mobs. So i reccomend everyone to use shako's logic. Yes. To me it works perfectly in any map and only the damage is x5 to the mobs. Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 29, 2016 Used if IsPlayer(b) == 0 then and whut,Doesn't work in whole CA,works in other map as CI,but CA no damage has been taken. Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 30, 2016 UP Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted December 30, 2016 @Vasil What you still looking for, omg? You arealdy got many samples and where functions are located in . Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted December 30, 2016 1 hour ago, Satan said: @Vasil What you still looking for, omg? You arealdy got many samples and where functions are located in . As i said,workes perfectly.It doesn't take damage in CA Mobs or Players into CA. Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted January 3, 2017 (edited) @Vasil Try this inside skill local MapA = GetChaMapName( ATKER ) local MapD = GetChaMapName( DEFER ) local mob = GetChaTypeID( DEFER ) if MapA == "garner2" or MapD == "garner2" and mob >4 then -- 0 for damage all players and 4 only mobs dmg = dmg*5 elseif mob == 985 then --If you want put diferent dmg to Boss dmg = dmg*5 end Edited January 3, 2017 by Ximboliex Quote Share this post Link to post Share on other sites