Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ^(.*?) mana stands at (\d+)\/(\d+)\.$
- function round(num)
- return tonumber(string.format("%." .. 0 .. "f", num))
- end
- local target_current = matches[3]
- local target_max = matches[4]
- local target_percent = round((target_current / target_max) * 100)
- if target_percent <= 49 and mm.stats.currentpower >= 8 then
- cecho("<red> *** Target is at " .. target_percent .. "% mana! ***")
- send("starcall absolve " .. target)
- elseif target_percent <= 49 and mm.stats.currentpower <= 8 then
- cecho("<red> *** Target is at " .. target_percent .. "% mana! ***")
- cecho("<magenta> *** WAITING FOR POWER *** WAITING FOR POWER ***")
- send("chant amissio " .. target)
- elseif target_percent <= 60 then
- cecho("<magenta> *** Target is at " .. target_percent .. "% mana! ***")
- send("chant amissio " .. target)
- elseif target_percent <= 80 then
- cecho("<yellow> *** Target is at" .. target_percent .. "% mana! ***")
- send("chant amissio " .. target)
- else
- cecho("<green> *** Target is at " .. target_percent .. "% mana! ***")
- send("chant amissio " .. target)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement