Lineage 2 Tower Forum

Full Version: Need help with Self Buff conditions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys.

I'm trying to add REBIRTH on my healer in self buff with a condition to use it only when my MP is below let say, 10%...

And also to use it if my ISS's mp is below 10%...

Tried to figure it out, looked at the HELP in the self buff but I just can't have it to work...

Anyone would be kind enough to tell me how i should write the condition?

Thx in advance,
Cheers!
Might need to make a script for this. Shouldn't be too hard.[/align]

(07-15-2014 20:06 PM)tophersoccer Wrote: [ -> ]Might need to make a script for this. Shouldn't be too hard.[/align]

This will get you started, its a rough type up, no promise if it will work...


Code:
MpPercent = 10; --mp percentage
skillID = 11768 -- rebirth skill id

function isPartyMpLow()
    for member in MyParty.list do
            if member:GetMpPercent < MpPercent then
            return true;
            end;
    end        
end

function Cast(id)
if id then
     skill = GetSkills():FindById(id)
     if skill and skill:CanBeUsed() then
         UseSkillRaw(id,false,false)
         return true
     end
end
return false
end


repeat
    if not isPaused() and
        if  GetMe():GetMpPercent() < MpPercent then
        Cast(skillID);
        elseif isPartyMpLow() then
        Cast(skillID);
        end
    end
until false
Thx for the answer...

So i put all this in conditions or its a script?

(07-15-2014 20:06 PM)tophersoccer Wrote: [ -> ]Might need to make a script for this. Shouldn't be too hard.[/align]

(07-15-2014 20:06 PM)tophersoccer Wrote: [ -> ]Might need to make a script for this. Shouldn't be too hard.[/align]

This will get you started, its a rough type up, no promise if it will work...


Code:
MpPercent = 10; --mp percentage
skillID = 11768 -- rebirth skill id

function isPartyMpLow()
    for member in MyParty.list do
if member:GetMpPercent < MpPercent then
return true;
end;
    end
end

function Cast(id)
if id then
skill = GetSkills():FindById(id)
if skill and skill:CanBeUsed() then
UseSkillRaw(id,false,false)
return true
end
end
return false
end


repeat
    if not isPaused() and
if GetMe():GetMpPercent() < MpPercent then
Cast(skillID);
elseif isPartyMpLow() then
Cast(skillID);
end
    end
until false
Its a script. Here ill post so you dont have to make it
Thx a lot mate! Will try it tomorrow after maintenance !

+2 for u!
Here is updated script.
(07-17-2014 23:28 PM)tophersoccer Wrote: [ -> ]Here is updated script.

Thx, ill try this new one cuz the 1st was giving an error...

thx again! +2
I've been testing it and it pops rebirth whenever the skill finishes its cooldown so i'm not sure why its not detecting my own mp and party member mp correctly before it casts the skill :/. I did do another update to check that its a party member before it does rebirth but it still pops rebirth whenever it can be casted....so yeah lol

Alright i fixed it! here is final script. I have also have made another script that extends the rebirth script that will pop celestial party protection when my self or any party member is below 30% HP. So if you want that then private message me
Reference URL's