Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ksys.hooks.functions.sipper =
- function()
- local to_heal = ksys.stats.max_health * (ksys.settings.sipping.health / 100)
- local to_mana = ksys.stats.max_mana * (ksys.settings.sipping.mana / 100)
- --This works for moss as well
- local to_kidney_hp = ksys.stats.max_health * (ksys.settings.sipping.kidney_health / 100)
- local to_kidney_mana = ksys.stats.max_mana * (ksys.settings.sipping.kidney_mana / 100)
- if not canSip() then return false end
- if (ksys.afflictions.blackout or ksys.afflictions.recklessness) and ksys.balances.heal and not ksys.limiters.heal then
- if ksys.systems.bashing then
- if ksys.living then
- send("sip health")
- else
- send("stick analeptic")
- end
- activateLimiter("heal")
- else
- if ksys.settings.sipping.priority == "health" then
- if ksys.living then
- send("sip health")
- else
- send("stick analeptic")
- end
- activateLimiter("heal")
- else
- if ksys.living then
- send("sip mana")
- else
- send("stick stimulant")
- end
- activateLimiter("heal")
- end
- end
- end
- if ksys.stats.health <= to_heal then
- if ksys.stats.mana <= to_mana then
- if ksys.balances.heal and not ksys.limiters.heal then
- if ksys.settings.sipping.priority == "health" then
- if ksys.living then
- send("sip health")
- else
- send("stick analeptic")
- end
- activateLimiter("heal")
- else
- if ksys.living then
- send("sip mana")
- else
- send("stick stimulant")
- end
- activateLimiter("heal")
- end
- end
- else
- if ksys.balances.heal and not ksys.limiters.heal then
- if ksys.living then
- send("sip health")
- else
- send("stick analeptic")
- end
- activateLimiter("heal")
- end
- end
- else
- if ksys.stats.mana <= to_mana and ksys.balances.heal and not ksys.limiters.heal then
- if ksys.living then
- send("sip mana")
- else
- send("stick stimulant")
- end
- activateLimiter("heal")
- end
- end
- if (( ksys.stats.mana <= to_kidney_mana )
- or ( ksys.stats.health <= to_kidney_hp ))
- then
- if ksys.living
- and ksys.balances.moss
- and not ksys.limiters.moss
- then
- send("outc moss")
- send("eat moss")
- activateLimiter("moss")
- elseif not ksys.living
- and ksys.balances.kidney
- and not ksys.limiters.kidney
- then
- send("outc kidney slice;eat kidney")
- activateLimiter("kidney")
- end
- end
- if (ksys.class == "monk") and not ksys.limiters.transmute and (ksys.stats.mana > ksys.stats.max_mana * .5) and (ksys.stats.health < ksys.stats.max_health * .4) and ksys.skills.transmute and ksys.balances.bal then
- send("transmute mana 1000") ---this section will send health. Tweak if need be
- activateLimiter("transmute")
- end
- if (ksys.class == "Praenomen" or ksys.class == "Bloodborn") and (ksys.stats.health < ksys.stats.max_health * .5) and ksys.balances.mend and ksys.skills.mend and not ksys.limiters.mend and ksys.balances.bal then
- send("mend")
- activateLimiter("mend")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement