BugsBunny 16 Report post Posted April 4, 2017 Looking for someone who knows how to edit Rear pets <4th slots one > effects/gives . I just can't find where the scripts are . Not in skilleffect.lua/functions.lua Thanks Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted April 5, 2017 ############################## *****Note: remember check pet effect in your sceneeffectinfo.txt******* ############################## ----------------------- --function.lua (cha_timer)- ----------------------- local target = GetChaFirstTarget(role) local pet_bg = GetChaItem ( role , 2 , 3 ) local pet_id = GetItemID ( pet_bg ) if pet_id == #### then-- Thurder local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Telf_effect(role,target) end end AddState ( role , role , STATE_TELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_TELF = GetChaStateLv ( role , STATE_TELF ) if statelv_STATE_TELF ~=0 then RemoveState ( role , STATE_TELF ) end end if pet_id == #### then ---Light local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Lelf_effect(role,target) end end AddState ( role , role , STATE_LELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_LELF = GetChaStateLv ( role , STATE_LELF ) if statelv_STATE_LELF ~=0 then RemoveState ( role , STATE_LELF ) end end if pet_id == #### then---Dark local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Delf_effect(role,target) end end AddState ( role , role , STATE_DELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_DELF = GetChaStateLv ( role , STATE_DELF ) if statelv_STATE_DELF ~=0 then RemoveState ( role , STATE_DELF ) end end ------------ --variable-- ------------ STATE_TELF = ### -- Thunder Spirit STATE_LELF = ### -- Light Spirit STATE_DELF = ### -- Darkness Spirit ----------------------- --skill effect active-- ----------------------- function Telf_effect(role,target) -- Thunder Fairy Effect Bonus local hp = Hp(target) local pet_lv = 1 local statelv = 3 * pet_lv local time = statelv*2 local atk_rad = 7 local hpdmg = Atk_Raise ( atk_rad , role , target ) if ((hp - hpdmg) > 1) then Hp_Endure_Dmg ( target , hpdmg ) SystemNotice ( role , "Spirit Activated Thunder Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Thunder Skill") ALLExAttrSet(role) end end function Lelf_effect(role,target) -- Light Fairy Effect Bonus local pet_lv = 1 local statelv = 2 * pet_lv local time = statelv*2 PlayEffect(role,168 ) AddState( role , role , STATE_TSHD, statelv , time ) SystemNotice ( role , "Spirit Activated Light Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Light Skill") ALLExAttrSet(role) end function Delf_effect(role,target) -- Darkness Fairy Effect Bonus local pet_lv = 1 local statelv = 3 * pet_lv local time = statelv*2 PlayEffect(target,322 ) AddState ( role , target , STATE_XN , 1 , time ) AddState ( role , target , STATE_PJ , statelv , time ) Check_Ys_Rem ( role , target ) SystemNotice ( role , "Spirit Activated Darkness Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Darkness Skill") ALLExAttrSet(role) end --skilleffect.lua passive function STATE_TELF_Add ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) ALLExAttrSet(role) end function STATE_TELF_Rem ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) ALLExAttrSet(role) end function STATE_LELF_Add ( role , statelv ) local defsb_dif = 100 local defsb = DefSb(role) + defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) local pdef_dif = 3 local pdef = ResistSb(role) + pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function STATE_LELF_Rem ( role , statelv ) local defsb_dif = 100 local defsb = DefSb(role) - defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) local pdef_dif = 3 local pdef = ResistSb(role) - pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function STATE_DELF_Add ( role , statelv ) local fleesb_dif = 70 local fleesb = FleeSb(role) + fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) local hitsb_dif = 50 local hitsb = HitSb(role) + hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) ALLExAttrSet(role) end function STATE_DELF_Rem ( role , statelv ) local fleesb_dif = 70 local fleesb = FleeSb(role) - fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) local hitsb_dif = 50 local hitsb = HitSb(role) - hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) ALLExAttrSet(role) end -------skilleffect 221 Thunder effect -1 0 STATE_TELF_Add STATE_TELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4014 2 0 0 0 0 0 0 0 222 Light effect -1 0 STATE_LELF_Add STATE_LELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4015 2 0 0 0 0 0 0 0 223 Darkness effect -1 0 STATE_DELF_Add STATE_DELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4016 2 0 0 0 0 0 0 0 1 Quote Share this post Link to post Share on other sites
BugsBunny 16 Report post Posted April 6, 2017 On 4/5/2017 at 5:16 AM, Ximboliex said: ############################## *****Note: remember check pet effect in your sceneeffectinfo.txt******* ############################## ----------------------- --function.lua (cha_timer)- ----------------------- local target = GetChaFirstTarget(role) local pet_bg = GetChaItem ( role , 2 , 3 ) local pet_id = GetItemID ( pet_bg ) if pet_id == #### then-- Thurder local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Telf_effect(role,target) end end AddState ( role , role , STATE_TELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_TELF = GetChaStateLv ( role , STATE_TELF ) if statelv_STATE_TELF ~=0 then RemoveState ( role , STATE_TELF ) end end if pet_id == #### then ---Light local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Lelf_effect(role,target) end end AddState ( role , role , STATE_LELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_LELF = GetChaStateLv ( role , STATE_LELF ) if statelv_STATE_LELF ~=0 then RemoveState ( role , STATE_LELF ) end end if pet_id == #### then---Dark local Percentage = Percentage_Random ( 0.1 ) if target ~= nil then if Percentage == 1 then Delf_effect(role,target) end end AddState ( role , role , STATE_DELF , 1 , 3600 ) RefreshCha(role) else local statelv_STATE_DELF = GetChaStateLv ( role , STATE_DELF ) if statelv_STATE_DELF ~=0 then RemoveState ( role , STATE_DELF ) end end ------------ --variable-- ------------ STATE_TELF = ### -- Thunder Spirit STATE_LELF = ### -- Light Spirit STATE_DELF = ### -- Darkness Spirit ----------------------- --skill effect active-- ----------------------- function Telf_effect(role,target) -- Thunder Fairy Effect Bonus local hp = Hp(target) local pet_lv = 1 local statelv = 3 * pet_lv local time = statelv*2 local atk_rad = 7 local hpdmg = Atk_Raise ( atk_rad , role , target ) if ((hp - hpdmg) > 1) then Hp_Endure_Dmg ( target , hpdmg ) SystemNotice ( role , "Spirit Activated Thunder Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Thunder Skill") ALLExAttrSet(role) end end function Lelf_effect(role,target) -- Light Fairy Effect Bonus local pet_lv = 1 local statelv = 2 * pet_lv local time = statelv*2 PlayEffect(role,168 ) AddState( role , role , STATE_TSHD, statelv , time ) SystemNotice ( role , "Spirit Activated Light Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Light Skill") ALLExAttrSet(role) end function Delf_effect(role,target) -- Darkness Fairy Effect Bonus local pet_lv = 1 local statelv = 3 * pet_lv local time = statelv*2 PlayEffect(target,322 ) AddState ( role , target , STATE_XN , 1 , time ) AddState ( role , target , STATE_PJ , statelv , time ) Check_Ys_Rem ( role , target ) SystemNotice ( role , "Spirit Activated Darkness Skill to help you in battle!") SystemNotice ( target , "Opponents Fairy activated Darkness Skill") ALLExAttrSet(role) end --skilleffect.lua passive function STATE_TELF_Add ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) ALLExAttrSet(role) end function STATE_TELF_Rem ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) ALLExAttrSet(role) end function STATE_LELF_Add ( role , statelv ) local defsb_dif = 100 local defsb = DefSb(role) + defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) local pdef_dif = 3 local pdef = ResistSb(role) + pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function STATE_LELF_Rem ( role , statelv ) local defsb_dif = 100 local defsb = DefSb(role) - defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) local pdef_dif = 3 local pdef = ResistSb(role) - pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function STATE_DELF_Add ( role , statelv ) local fleesb_dif = 70 local fleesb = FleeSb(role) + fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) local hitsb_dif = 50 local hitsb = HitSb(role) + hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) ALLExAttrSet(role) end function STATE_DELF_Rem ( role , statelv ) local fleesb_dif = 70 local fleesb = FleeSb(role) - fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) local hitsb_dif = 50 local hitsb = HitSb(role) - hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) ALLExAttrSet(role) end -------skilleffect 221 Thunder effect -1 0 STATE_TELF_Add STATE_TELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4014 2 0 0 0 0 0 0 0 222 Light effect -1 0 STATE_LELF_Add STATE_LELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4015 2 0 0 0 0 0 0 0 223 Darkness effect -1 0 STATE_DELF_Add STATE_DELF_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4016 2 0 0 0 0 0 0 0 Thanks man, i just want to give them different functions. Just don't know how Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted April 6, 2017 Explain more.. Quote Share this post Link to post Share on other sites
BugsBunny 16 Report post Posted April 8, 2017 On 4/6/2017 at 5:02 PM, Ximboliex said: Explain more.. ok so my rear pets are very OP to be honest. And probably bad function compared to description. Ive got em from 1.36 files. Preety much i want to make them do this : -Darkness Fairy : Decrases 10 pr and 200 def by 10% chance when attacking for 3 sec , and actual poison effect (deals 300 dmg x second for 5 seconds maybe ) -Thunder Fairy : Same as BD effect. Gives 1.5x Lightning bolt/Spiritual bolt damage. And slows enemy movement speed. -Light Fairy : AutoBuffs + gives 15 PR/300 Def by chance . Ive played a server very long ago with those Functions and i just love them I badly want to have them like this . Do you know how to make this functions? id appreciate alot! Quote Share this post Link to post Share on other sites
Ximboliex 86 Report post Posted April 8, 2017 Just edit effects in skilleffect.lua Quote Share this post Link to post Share on other sites