Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --select appropriate venom / curse / song
- local asc = affstrack.score
- local akv = kln.ref.aff2venom
- local a2s = kln.ref.voicecraft.aff2song
- ak.nextVenom = function(class, stack)
- if not class or not stack then
- if not ak.stacks.current then ak.getDefaultStack() end
- class = ak.stacks.current[1]
- stack = ak.stacks.current[2]
- end
- scoreup()
- if asc.asleep == 100 and vials.venoms[akv.asleep] > 0 then return akv.asleep end --keep them asleep!
- if asc.prone == 100 and asc.crippledleg >= 100 and asc.anorexia <= 66 and vials.venoms[akv.anorexia] > 0 then return akv.anorexia end --time to lock!
- if not ak.stacks.current then ak.getDefaultStack() end
- local aks = ak.stacks[ak.stacks.current[1]][ak.stacks.current[2]]
- if ak.stacks.current[2] ~= "default" and string.sub(ak.stacks.current[2],1,3) ~= "alt" then --append default table
- for k, v in pairs(ak.stacks[ak.stacks.current[1]].default) do
- table.insert(aks,#aks+1,v)
- end
- end
- for k,v in ipairs(aks) do
- if k%4 == 1 then --only take every fourth entry
- if affstrack.score[v] < aks[k+3] and aks[k+1] == 1 and
- (vials.venoms[akv[v]] or 0 > 0 or cVenom == vials.venoms[akv[v]])
- and ak.specAff ~= v then
- return akv[v] --use this venom
- end
- end
- end
- return "voyria"
- end --ak.nextVenom
- ak.nextSpecialAttack = function(arg)
- arg = arg or {}
- arg.aff = arg.aff or ak.venAff or "none"
- if not arg.class or not arg.stack then
- if not ak.stacks.current then ak.getDefaultStack() end
- arg.class = ak.stacks.current[1]
- arg.stack = ak.stacks.current[2]
- end
- scoreup()
- local atk = "none"
- local aks = mmp.deepcopy(ak.stacks[ak.stacks.current[1]][ak.stacks.current[2]])
- if ak.stacks.current[2] ~= "default" and string.sub(ak.stacks.current[2],1,3) ~= "alt" then --append default table
- for k, v in pairs(ak.stacks[ak.stacks.current[1]].default) do
- table.insert(aks,#aks+1,v)
- end
- end
- if ak.stacks.current[1] == "bard" and olc.targeted then
- if (olc.bpart[olc.targeted] or 0) >= olc.breakpoint - 1 and string.find(olc.targeted,"leg") then
- if asc.impatience <= 66 and arg.aff ~= "impatience" then
- ak.specAff = "impatience"
- return a2s["impatience"]..target
- elseif asc.anorexia or 0 <= 66 and arg.aff ~= "anorexia" then
- ak.specAff = "anorexia"
- return a2s["anorexia"]..target
- end
- elseif asc.prone == 100 and asc.crippledleg >= 100 then
- if asc.impatience <= 66 and arg.aff ~= "impatience" then
- ak.specAff = "imptience"
- return a2s["impatience"]..target
- elseif asc.paralysis <= 66 and arg.aff ~="paralysis" then
- ak.specAff = "paralysis"
- return a2s["paralysis"]..target
- end
- end
- end
- if ak.stacks.current[1] == "bard" and tonumber(gmcp.Char.Vitals.mp) <= tonumber(gmcp.Char.Vitals.maxmp)*0.6 and table.contains(ssc.enabledClasses, "priest") then
- ak.specAff = "none"
- return "sing solo at "..target
- end
- if table.contains(ssc.enabledClasses, "occultist") and affstrack.score.confusion < 66 and arg.aff ~= "confusion" then
- ak.specAff = "confusion"
- return a2s["confusion"]..target
- end
- for k, v in ipairs(aks) do
- if k%4 == 1 then
- if affstrack.score[v] < aks[k+3] and aks[k+2] == 1 and arg.aff ~= v then
- if ak.stacks.current[1] == "dragon" then
- return "dragoncurse "..target.." "..v.." 1"
- elseif ak.stacks.current[1] == "bard" then
- if (rebounding == true or shielded == true) and not table.contains(kln.affs,"impaled") == false then
- return "sing cantata at "..target
- else
- return a2s[v]..target
- end
- end
- end
- end
- end
- if atk == "none" then --use default
- if ak.stacks.current[1] == "bard" then
- ak.specAff = "defstrip"
- return "sing chant at "..target
- end
- end
- end --ak.nextSpecialAttack
- ak.getDefaultStack = function()
- local class = "unknown"
- if not gmcp.Char then
- class = "dragon"
- elseif gmcp.Char.Status.race:find("Dragon") then
- class = "dragon"
- else
- class = gmcp.Char.Status.class:lower()
- end
- if class == "bard" then
- ak.stacks.current = {class, "goldenseal"}
- else
- ak.stacks.current = {class, "default"}
- end
- scoreup()
- end --ak.getDefaultStack
- registerAnonymousEventHandler("svo got dragonform","ak.getDefaultStack")
- registerAnonymousEventHandler("svo lost dragonform","ak.getDefaultStack")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement