Last edited by HanzHanz; 02-21-2016 at 12:12 AM.
I tend to bite off a little more than I can chew, hoping I'll quickly learn how to chew it.
@HanzHanz
I am pretty much using the default ones that I put, just that I change the healing% on friend numbers depending on what I need.
One thing to consider, though, is that if you would like to heal yourself with Mas Res or Sio you should put your own name in the list.
local SioFriends = {"HanzHanz", "Eternal Oblivion"} -- People to heal with Exura Sio
local MasResFriends = {"HanzHanz", "Riku"} -- People to heal with Exura Gran Mas Res
And if you want a bit more priority in healing yourself you should have MinMasRes set to 1 (default). Then it will always use Mas Res when there is one target to heal with Mas Res (who is also in range, and it's you! boom).
MinMasRes = 1, -- Min. people below HPPCmasres to cast.
@Riku, There should be something focusing the knight.
e.g
The paladin goes low enough for mas res, or the paladin and the sorcerer. The knight has 8 powerfull monsters surrounding him and will definitly die without sio's.
If the druid and sorcerer are in range for mas res and the knight is not, the knight will die.
This could be solved by implementing priority or using navigation to check the status of the knight.
Teenage mutant ninja powers.
@Carnufex
Yes, this is true, it seems it works as intended however, seeing as you're not posting any error, more like a detail.
It can be solved by not mas ressing your other friends if the real critical thing is to sio the knight, or to move your character out of mas res range from EK.
Alternatively, try this funky version. I think it's what you want and it should work, be very careful during testing though :-)
init start
local SioFriends = {"Bubble", "Eternal Oblivion"} -- People to heal with Exura Sio
local MasResFriends = {"Astronis", "Riku"} -- People to heal with Exura Gran Mas Res
local settings = {
Sio = true,
ForceHeal = true, -- true/false to prioritize Sio.
HPPCsio = 80, -- Your FRIEND(S) Health % to cast Sio
SelfMPPCsio = 15, -- YOUR min. Mana % to cast Sio
SelfHPPCsio = 50, -- YOUR min. HP % to cast Sio
MasRes = true,
MinMasRes = 1, -- Min. people below HPPCmasres to cast.
HPPCmasres = 80, -- Your FRIEND(S) Health % to cast mas res
SelfMPPCmasres = 15, -- YOUR min. Mana % to cast Exura Gran Mas Res
SelfHPPCmasres = 20 --- YOUR min. HP % to cast Exura Gran Mas Res
}
init end
auto(350)
local amount = 0
local temp = 0
if settings.ForceHeal then
foreach creature masres "ps" do
if table.find(MasResFriends, masres.name) then
if isonspellarea(masres, "exura gran mas res", "any") and (masres.hppc <= settings.HPPCmasres) and ($mppc >= settings.SelfMPPCmasres) and ($hppc >= settings.SelfHPPCmasres) then
temp = temp + 1
end
end
end
end
if settings.Sio then
if (temp < settings.MinMasRes) or (ForceHeal) then
if cancastspell("Heal Friend") then
foreach creature sio "ps" do
if table.find(SioFriends, sio.name) and (sio.isshootable) then
if (sio.hppc <= settings.HPPCsio) and ($mppc >= settings.SelfMPPCsio) and ($hppc >= settings.SelfHPPCsio) then
cast('exura sio "'..sio.name)
end
end
end
end
end
end
if settings.MasRes then
if cancastspell("exura gran mas res") then
foreach creature masres "ps" do
if table.find(MasResFriends, masres.name) then
if isonspellarea(masres, "exura gran mas res", "any") and (masres.hppc <= settings.HPPCmasres) and ($mppc >= settings.SelfMPPCmasres) and ($hppc >= settings.SelfHPPCmasres) then
amount = amount+1
end
end
end
if (amount >= settings.MinMasRes) then
cast("exura gran mas res")
end
end
end
@Riku
im not sure you understood me, that function doesnt really help me im afraid.
Take a look at this verry detailed picture I made for your understandning.
The thing is; I only want mas res to be used when the knight is either fine (he is doing ok without sio) or he is in range for mas res. In most other cases I want it to sio the knight before using mas res with one exception, When I (the druid) myself has low hp. Then its fine to use mas res without giving a single fuck about the knight.
thanks for taking the time
Teenage mutant ninja powers.
@Carnufex
I don't know if you tested it or not, but what you've drawn on the whiteboard for me is exactly what I had in mind when I edited it for you, looking at my response and possible solutions again I have no idea what I was thinking.
The way I intended to fix the new version that I sent you, is that it will first do an iteration to check how many people are in need of a masres.
Depending on how many people needs a mas res it will then either use sio or masres, unless you ticked the option ForceHeal to true (default).
Then it will always, no matter what, if anyone needs a sio, it will sio.
Okay, that's the intention, if the knight is the only one on your sio list then it SHOULD use sio regardless of how many people needs a mas res, and it does not use sio if your health/mana is under:
SelfMPPCsio = 15, -- YOUR min. Mana % to cast Sio
SelfHPPCsio = 50, -- YOUR min. HP % to cast Sio
Be careful during your testing though, I don't know if the edit works 100%, but the idea was written down and it should do (i've looked through it several times) what I told you it does.
On the other hand, how often would this occur and how does your Paladin and Sorcerer take that much damage anyway?
If it doesn't work and you died, i'll rewrite the whole script for you and everyone else. No problem, i'm much better today anyway.
Last edited by Riku; 03-08-2016 at 01:26 PM.
@dudureno
It only counts people in mas res range yes.
I have currently no intentions of improving this. I'm just botting for now. I'm so sorry.