okore 1 Report post Posted October 13, 2020 I tried everything but I can't make the glows to work on this. The cape, stats and the leveling system works just fine, the only problem is the glows. The lines that I use (I know the ami glow 2 and 3 are wrong, I just couldn't find a space to them atm): Cloak.race = { [1] = 234, --Lance / Skilleff ID [2] = 235, --Carsise / Skilleff ID [3] = 236, --Phyllis / Skilleff ID [4] = 237 --Ami / Skilleff ID }; Cloak.glow1 = { --First Glow [1] = 224, --Lance / Skilleff ID [2] = 227, --Carsise / Skilleff ID [3] = 230, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Cloak.glow2 = { --Second Glow [1] = 225, --Lance / Skilleff ID [2] = 228, --Carsise / Skilleff ID [3] = 231, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Cloak.glow3 = { --Third Glow [1] = 226, --Lance / Skilleff ID [2] = 229, --Carsise / Skilleff ID [3] = 232, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID skilleff: 224 lcapeff1 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4100 1 0 0 0 0 0 0 0 225 lcapeff2 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4101 1 0 0 0 0 0 0 0 226 lcapeff3 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4102 1 0 0 0 0 0 0 0 227 ccapeff1 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4103 1 0 0 0 0 0 0 0 228 ccapeff2 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4104 1 0 0 0 0 0 0 0 229 ccapeff3 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4105 1 0 0 0 0 0 0 0 230 pcapeff1 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4106 1 0 0 0 0 0 0 0 231 pcapeff2 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4107 1 0 0 0 0 0 0 0 232 pcapeff3 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4108 1 0 0 0 0 0 0 0 233 acapeff1 -1 0 0 0 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4109 1 0 0 0 0 0 0 0 234 cap1 -1 0 State_NC_Add State_NC_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4096 24 0 0 0 0 0 0 0 235 cap2 -1 0 State_NC_Add State_NC_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4097 24 0 0 0 0 0 0 0 236 cap3 -1 0 State_NC_Add State_NC_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4098 24 0 0 0 0 0 0 0 237 cap4 -1 0 State_NC_Add State_NC_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 4099 24 0 0 0 0 0 0 0 Quote Share this post Link to post Share on other sites
Yudha 8 Report post Posted October 13, 2020 can you show here your code to call the effect of cape? Quote Share this post Link to post Share on other sites
okore 1 Report post Posted October 13, 2020 3 minutes ago, Yudha said: can you show here your code to call the effect of cape? do you mean the lines in scripts/extension/cloakscript? sorry I didn't understand Quote Share this post Link to post Share on other sites
Yudha 8 Report post Posted October 14, 2020 yes Quote Share this post Link to post Share on other sites
okore 1 Report post Posted October 14, 2020 I also didn't configure cloak gems so they're disabled Cloak = {}; Cloak.conf = { CloakID = 7340, --Admiral Cloak ID on your item info DustyID = 7341, --Dusty Cloak ID on your item info CloakSlot = 5, --Inventory slot, remeber is this number "-1" so if its "5" the slot will be "4th" MaxLv = 10, --Cloak level max / You can define you max level Stats =1 --How much of stats you will get in each level }; Cloak.race = { [1] = 234, --Lance / Skilleff ID [2] = 235, --Carsise / Skilleff ID [3] = 236, --Phyllis / Skilleff ID [4] = 237 --Ami / Skilleff ID }; Cloak.glow1 = { --First Glow [1] = 224, --Lance / Skilleff ID [2] = 227, --Carsise / Skilleff ID [3] = 230, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Cloak.glow2 = { --Second Glow [1] = 225, --Lance / Skilleff ID [2] = 228, --Carsise / Skilleff ID [3] = 231, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Cloak.glow3 = { --Third Glow [1] = 226, --Lance / Skilleff ID [2] = 229, --Carsise / Skilleff ID [3] = 232, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; --]] Cloak.Rate = {} --Upgrade Rate / 1 = 100%, .9 = 90%.. and so on... Cloak.Rate[0] = 1 Cloak.Rate[1] = 1 Cloak.Rate[2] = 1 Cloak.Rate[3] = 1 Cloak.Rate[4] = .7 Cloak.Rate[5] = .6 Cloak.Rate[6] = .5 Cloak.Rate[7] = .4 Cloak.Rate[8] = .3 Cloak.Rate[9] = .2 Cloak.Rate[10] = .1 CloakGem = {}; CloakGem[9206] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID CloakGem[9207] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID CloakGem[9208] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID CloakGem[9209] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID CloakGem[9210] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID CloakGem[9211] = 56; -- // Betwen "[]" = Gem ID, After "=" = Cloak ID --*-----------------------------------------*-- --* Cloak Functions *-- --*-----------------------------------------*-- --* Check if cloak is equiped *- function Cloak.hasCloak(role) local Slot = GetChaItem(role, 2, (Cloak.conf['CloakSlot'] -1)) --Check Cloak Slot local SlotId = GetItemID(Slot) if SlotId == Cloak.conf['CloakID'] then return 1 end return 0 end --* Function to get cloak level *- function Cloak.setLv(item) local CloakLv = GetItemAttr(item, 55) if CloakLv == nil then return 0 else return CloakLv end end --*-----------------------------------------*-- --* Item Functions *-- --*-----------------------------------------*-- --* Unseal Cloak *-- function Uns_Cloak(role, Item) --Check if you are on land local Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat ~= nil then SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end --Check if you have the dusty cloak local dusty = CheckBagItem(role, Cloak.conf['DustyID']); if dusty < 1 then BickerNotice(role,"You need ["..GetItemName(Cloak.conf['DustyID']).."] in your Inventory!"); --If you dont have this message will appear UseItemFailed(role); return else -- If you have the dusty cloak execute this TakeItem(role, 0, Cloak.conf['DustyID'], 1) --Take the dusty cloak GiveItem(role, 0, Cloak.conf['CloakID'], 1, 25); --Give you the Admiral Cloak without level Notice(GetChaDefaultName(role)..' successfully Unsealed a '..GetItemName(Cloak.conf['DustyID'])..'!'); PlayEffect(role, 345) RefreshCha(role) end end --* Upgrade Cloak *-- function Upg_Cloak(role, Item) --Check if you are on land local Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat ~= nil then SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end --Check If cloak is on the correct slot local slot = GetChaItem(role, 2, (Cloak.conf['CloakSlot'] -1)); local CloakId = GetItemID(slot); local Level = Cloak.setLv(slot); local Tool = GetItemID(Item) if CloakId ~= Cloak.conf['CloakID'] then BickerNotice(role, 'Cannot use ['..GetItemName(Tool)..'] on '..GetItemName(CloakId)..'!'); UseItemFailed(role); return end --Check if cloak is already max lvl local Level = Cloak.setLv(slot); if Level >= Cloak.conf['MaxLv'] then BickerNotice(role, '['..GetItemName(CloakId)..'] already maxed Upgrade!'); UseItemFailed(role); return end --Calcule Success Rate local successRate = Percentage_Random(Cloak.Rate[Level]); if successRate == 1 then local start,finish = ITEMATTR_VAL_STR,ITEMATTR_VAL_STA; local itemStats = {}; local increment = 1; for i = start,finish do itemStats = GetItemAttr(slot, i); SetItemAttr(slot, i, itemStats + Cloak.conf['Stats']); end SetItemAttr(slot, 55, Level + 1); PlayEffect(role, 345); else -- If fails Notice(role, "Sorry, upgrade has failed! Luckily Cloak is not damaged..."); PlayEffect(role, 346); end --System notice of who have maxed the cloak local Level = Cloak.setLv(slot); local cha_name = GetChaDefaultName ( role ) local message = "Congratulations to "..cha_name.." who successfully upgraded Admiral Cloak to Lv [10] !!!" if successRate == 1 and Level == 10 then Notice ( message ) end end --*-----------------------------------------*-- --* ADD/REM Functions *-- --*-----------------------------------------*-- --* Add Function *- function State_NC_Add ( role , statelv ) local slot = GetChaItem(role, 2, (Cloak.conf['CloakSlot'] -1)) -- Get Cloak Slot --Differences local str_dif = Cloak.conf['Stats'] * statelv -- Str Difference local agi_dif = Cloak.conf['Stats'] * statelv -- Agi Difference local dex_dif = Cloak.conf['Stats'] * statelv -- Acc Difference local con_dif = Cloak.conf['Stats'] * statelv -- Con Difference local sta_dif = Cloak.conf['Stats'] * statelv -- Spr Difference --Calculation local strsb = StrSb( role ) + str_dif -- Str Calculation local agisb = AgiSb( role ) + agi_dif -- Agi Calculation local dexsb = DexSb( role ) + dex_dif -- Acc Calculation local consb = ConSb( role ) + con_dif -- Con Calculation local stasb = StaSb( role ) + sta_dif -- Spr Calculation --Stats Add SetCharaAttr( strsb , role , ATTR_STATEV_STR ) -- Str Add SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) -- Agi Add SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) -- Acc Add SetCharaAttr( consb , role , ATTR_STATEV_CON ) -- Con Add SetCharaAttr( stasb , role , ATTR_STATEV_STA ) -- Spr Add RefreshCha(role) end --* Rem Function *- function State_NC_Rem ( role , statelv ) local slot = GetChaItem(role, 2, (Cloak.conf['CloakSlot'] -1)) -- Get Cloak Slot --Differences local str_dif = Cloak.conf['Stats'] * statelv -- Str Difference local agi_dif = Cloak.conf['Stats'] * statelv -- Agi Difference local dex_dif = Cloak.conf['Stats'] * statelv -- Acc Difference local con_dif = Cloak.conf['Stats'] * statelv -- Con Difference local sta_dif = Cloak.conf['Stats'] * statelv -- Spr Difference --Calculation local strsb = StrSb( role ) - str_dif -- Str Calculation local agisb = AgiSb( role ) - agi_dif -- Agi Calculation local dexsb = DexSb( role ) - dex_dif -- Acc Calculation local consb = ConSb( role ) - con_dif -- Con Calculation local stasb = StaSb( role ) - sta_dif -- Spr Calculation --Stats Add SetCharaAttr( strsb , role , ATTR_STATEV_STR ) -- Str Rem SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) -- Agi Rem SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) -- Acc Rem SetCharaAttr( consb , role , ATTR_STATEV_CON ) -- Con Rem SetCharaAttr( stasb , role , ATTR_STATEV_STA ) -- Spr Rem RefreshCha(role) end --[[ --*-----------------------------------------*-- //THOSE FUNCTIONS AREN'T TESTED SO IGNORE THAT --* Gems Functions *-- //THOSE FUNCTIONS AREN'T TESTED SO IGNORE THAT --*-----------------------------------------*-- //THOSE FUNCTIONS AREN'T TESTED SO IGNORE THAT --* Check Gems *-- function Cloak.getGem (item) local ChaCloak = {}; local ForgeParam = GetItemForgeParam(item, 1) ForgeParam = TransferNum(ForgeParam) ChaCloak[1] = GetNum_Part2(ForgeParam) ChaCloak[2] = GetNum_Part3(ForgeParam) ChaCloak[3] = GetNum_Part4(ForgeParam) ChaCloak[4] = GetNum_Part5(ForgeParam) ChaCloak[5] = GetNum_Part6(ForgeParam) ChaCloak[6] = GetNum_Part7(ForgeParam) return ChaCloak; end --* Check if Cloak have Gem *-- function Cloak.hasGem (item, stoneId) local Gem = Cloak.getGem(item); if Gem[1] == stoneId or Gem[3] == stoneId or Gem[5] == stoneId then return 1 end return 0 end --* Check Gem Level *-- function Cloak.GemLv (item, stoneId) local Gem = Cloak.getGem(item); if Gem[1] == stoneId then return Gem[2]; end if Gem[3] == stoneId then return Gem[4]; end if Gem[5] == stoneId then return Gem[6]; end end --* Gems Skills *-- function Cloak.Skill (ATKER, DEFER, sklv) if Cloak.hasCloak == 1 then local Slot = GetChaItem(ATKER, 2, (Cloak.conf['CloakSlot'] - 1)); --Riven Soul Rune if Cloak.hasGem(Slot, 66) == 1 then local Percentage = Percentage_Random(0.7) if Percentage == 1 then local StateLv = GetChaStateLv(DEFER, 234); if StateLv == 0 then local GemLv = Cloak.GemLv(Slot, 66); AddState(ATKER, DEFER, 234, GemLv, 3) local Eff = GemLv * 5 SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Physical Resistence reduce by "..Eff.." for 3 sec") end end end --Piercing Rune if Cloak.hasGem(Slot, 67) == 1 then local Percentage = Percentage_Random(0.7) if Percentage == 1 then local StateLv = GetChaStateLv(DEFER, 235); if StateLv == 0 then local GemLv = Cloak.GemLv(Slot, 67); AddState(ATKER, DEFER, 235, GemLv, 3) local Eff = GemLv * 50 SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Defence Resistence reduce by "..Eff.." for 3 sec") end end end --Illusory Rune if Cloak.hasGem(Slot, 68) == 1 then local Percentage = Percentage_Random(0.7) if Percentage == 1 then local StateLv = GetChaStateLv(DEFER, 236); if StateLv == 0 then local GemLv = Cloak.GemLv(Slot, 68); AddState(ATKER, DEFER, 236, GemLv, 3) local Eff = GemLv * 10 SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Dodge Resistence reduce by "..Eff.." for 3 sec") end end end --Illusory Rune if Cloak.hasGem(Slot, 69) == 1 then local Percentage = Percentage_Random(0.7) if Percentage == 1 then local StateLv = GetChaStateLv(DEFER, 237); if StateLv == 0 then local GemLv = Cloak.GemLv(Slot, 69); AddState(ATKER, DEFER, 237, GemLv, 3) local Eff = GemLv * 10 SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Hitrate Resistence reduce by "..Eff.." for 3 sec") end end end end end --*-----------------------------------------*-- --* Add/ Rem Gems Functions *-- --*-----------------------------------------*-- function STATE_Riven_Add(role, statelv) local pdef_dif = 5 * statelv local pdef = ResistSb(role) - pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) RefreshCha(role) end function STATE_Riven_Rem(role, statelv) local pdef_dif = 5 * statelv local pdef = ResistSb(role) + pdef_dif SetCharaAttr( pdef , role , ATTR_STATEV_PDEF ) RefreshCha(role) end function STATE_Pierc_Add(role, statelv) local defsb_dif = 50 * statelv local defsb = DefSb(role) - defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) RefreshCha(role) end function STATE_Pierc_Rem(role, statelv) local defsb_dif = 50 * statelv local defsb = DefSb(role) + defsb_dif SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) RefreshCha(role) end function STATE_Illus_Add(role, statelv) local fleesb_dif = 10 * statelv local fleesb = FleeSb(role) - fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) RefreshCha(role) end function STATE_Illus_Rem(role, statelv) local fleesb_dif = 10 * statelv local fleesb = FleeSb(role) + fleesb_dif SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE ) RefreshCha(role) end function STATE_Curse_Add(role, statelv) local hitsb_dif = 10 * statelv local hitsb = HitSb(role) - hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) RefreshCha(role) end function STATE_Curse_Rem(role, statelv) local hitsb_dif = 10 * statelv local hitsb = HitSb(role) + hitsb_dif SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) RefreshCha(role) end --]] Quote Share this post Link to post Share on other sites
Yudha 8 Report post Posted October 14, 2020 you need to create a function to call skilleff of glow, what you have here is this: Cloak.glow1 = { --First Glow [1] = 224, --Lance / Skilleff ID [2] = 227, --Carsise / Skilleff ID [3] = 230, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Example: function CloakGlow(role,freq,time) local cha_type = GetChaTypeID(role) local statelv = 1 local statetime = 3600 if (GetChaStateLv(role, Cloak.glow1[cha_type]) == 0) then AddState(role, role, Cloak.glow1[cha_type], statelv, statetime) end end function cha_timer(role, freq, time) CloakGlow(role,freq,time) end Quote Share this post Link to post Share on other sites
okore 1 Report post Posted October 14, 2020 23 minutes ago, Yudha said: you need to create a function to call skilleff of glow, what you have here is this: Cloak.glow1 = { --First Glow [1] = 224, --Lance / Skilleff ID [2] = 227, --Carsise / Skilleff ID [3] = 230, --Phyllis / Skilleff ID [4] = 233 --Ami / Skilleff ID }; Example: function CloakGlow(role,freq,time) local cha_type = GetChaTypeID(role) local statelv = 1 local statetime = 3600 if (GetChaStateLv(role, Cloak.glow1[cha_type]) == 0) then AddState(role, role, Cloak.glow1[cha_type], statelv, statetime) end end function cha_timer(role, freq, time) CloakGlow(role,freq,time) end so i add this function on skilleffect.lua or in the extension script? Quote Share this post Link to post Share on other sites
Yudha 8 Report post Posted October 14, 2020 (edited) anywhere, would be more organized if you put into the extension. if you have already hooking library its more better, you can do something like this function CloakGlow(ignore, role) local cha_type = GetChaTypeID(role) local statelv = 1 local statetime = 3600 if (GetChaStateLv(role, Cloak.glow1[cha_type]) == 0) then AddState(role, role, Cloak.glow1[cha_type], statelv, statetime) end end Hook:AddPostHook("cha_timer", CloakGlow) Edited October 14, 2020 by Yudha Quote Share this post Link to post Share on other sites
okore 1 Report post Posted October 14, 2020 14 minutes ago, Yudha said: anywhere, would be more organized if you put into the extension. if you have already hooking library its more better, you can do something like this function CloakGlow(ignore, role) local cha_type = GetChaTypeID(role) local statelv = 1 local statetime = 3600 if (GetChaStateLv(role, Cloak.glow1[cha_type]) == 0) then AddState(role, role, Cloak.glow1[cha_type], statelv, statetime) end end Hook:AddPostHook("cha_timer", CloakGlow) just added this into the extension lines, still it doesn't work Quote Share this post Link to post Share on other sites
Yudha 8 Report post Posted October 14, 2020 (edited) hmm, i think your files is fucked up. contact me here for advise ^^ Discord: Ragnar#0919 Facebook: FB Chat Only WA: +62 821 4157 8668 Chat/Call (English Only) Edited October 14, 2020 by Yudha Quote Share this post Link to post Share on other sites
okore 1 Report post Posted October 14, 2020 29 minutes ago, Yudha said: hmm, i think your files is fucked up. contact me here for advise ^^ Discord: Ragnar#0919 Facebook: FB Chat Only WA: +62 821 4157 8668 Chat/Call (English Only) Ok, sent you friend request on discord Quote Share this post Link to post Share on other sites