Greetings friends
I will be annoying again in order to enlist their help to complete a script.
Is a feoh soultaker's skill called "summon reanimated man", and I want to use when is not invoked, or, when the feoh use another skill called "sacrificial soul", which I want to use when the summon has HP below 40%
The point is that I created the script, but remains in a kind of constant loop, and the system sends me a message saying: "You can not use summon man reanimated due to Insufficient summon skill points"
I would like to invoke my own summon when the script is activated, or, during a hunt, I want use the skill "sacrificial soul" when my summon has less 40% HP to unsummon, and after, summon again.
I put the script here.........by the way, as I allways I say, I am not a programmer, I only try to make my own script using commands from others scripts/plugings. So please be patience with me, I am a noob
Thanks
(08-15-2015 21:47 PM)versutia4 Wrote: [ -> ]Greetings friends
I will be annoying again in order to enlist their help to complete a script.
Is a feoh soultaker's skill called "summon reanimated man", and I want to use when is not invoked, or, when the feoh use another skill called "sacrificial soul", which I want to use when the summon has HP below 40%
The point is that I created the script, but remains in a kind of constant loop, and the system sends me a message saying: "You can not use summon man reanimated due to Insufficient summon skill points"
I would like to invoke my own summon when the script is activated, or, during a hunt, I want use the skill "sacrificial soul" when my summon has less 40% HP to unsummon, and after, summon again.
I put the script here.........by the way, as I allways I say, I am not a programmer, I only try to make my own script using commands from others scripts/plugings. So please be patience with me, I am a noob
Thanks
i think too avoid those systemmassage u can use
LUA Programming
function GetSummonCount()
local pets = GetPetList();
local count = 0;
for pet in pets.list do
if (pet:GetNickName() == me:GetName()) then
count = count +1;
end;
end;
return count;
end;
(08-15-2015 22:17 PM)schubbel2208 Wrote: [ -> ] (08-15-2015 21:47 PM)versutia4 Wrote: [ -> ]Greetings friends
I will be annoying again in order to enlist their help to complete a script.
Is a feoh soultaker's skill called "summon reanimated man", and I want to use when is not invoked, or, when the feoh use another skill called "sacrificial soul", which I want to use when the summon has HP below 40%
The point is that I created the script, but remains in a kind of constant loop, and the system sends me a message saying: "You can not use summon man reanimated due to Insufficient summon skill points"
I would like to invoke my own summon when the script is activated, or, during a hunt, I want use the skill "sacrificial soul" when my summon has less 40% HP to unsummon, and after, summon again.
I put the script here.........by the way, as I allways I say, I am not a programmer, I only try to make my own script using commands from others scripts/plugings. So please be patience with me, I am a noob
Thanks
i think too avoid those systemmassage u can use
LUA Programming
function GetSummonCount()
local pets = GetPetList();
local count = 0;
for pet in pets.list do
if (pet:GetNickName() == me:GetName()) then
count = count +1;
end;
end;
return count;
end;
Hi schubbel2208
I try to use your script but I still got that system message......
Where do I put that lines?.....I mean, where in the script that I made
Thanks a lot
Hi man
Thanks for your reply. I used, but I got this:
1.- Skill works fine, but I still got a system message, specially when I start run, I don't know why, but every some seconds, I get a message "You can not use summon man reanimated due to Insufficient summon skill points"...maybe, I don't care about that, but the point is, when I run and get this message, my char stops his run and I need to do it again.
2.- Skill Sacrificial Soul doesn't work........my char wait until his summon is death, and after, summon again.
By the way, is a great help, and hopefully you can help me with this
if 1 pet it can do easy way...
LUA Programming
repeat
me = GetMe();
MySkills = GetSkills();
pet = GetPet();
if (me:GetClass() == 167) then
if pet == nil then
UseSkillRaw(1129,false,false);
Sleep(1000);
end;
end;
Sleep(10*1000);
until false;
Hi TheQQmaster
THank you very much, now this script runs fine talking about summon pet and I donn't get a system message error (finally stop
)
Now I will try to use the other skill, "sacrificial soul".....If I can't do, I'll run here again to get help
Thanks again, regards.
Hi man.....
Thanks for your answer......I try your new suggestion, and let me tell you what I get: My char summon, but didn't do the skill sacrificial soul when pet hp were less 40%
However, I gathered your suggestions in one script, and change some commands .......... I do not know if they are completely accurate, but at least you are running the action that I expected.
I share here, and if you have a minute please review it to see if at some point it will stop working
Thanks again
LUA Programming
-- config
SummonReanimatedManId = 1129;
SacrificialSoulID = 11152;
minHealthPercent = 40;
repeat
me = GetMe();
MySkills = GetSkills();
pet = GetPet();
if (me:GetClass() == 167) then
if pet == nil then
UseSkillRaw(1129,false,false);
Sleep(1000);
end;
end;
Sleep(1*1000);
function SkillUse(SacrificialSoul) -- skill use checker
local Skill = GetSkills():FindById(SacrificialSoulID);
if (Skill ~= nil) and (Skill:CanBeUsed()) then
UseSkillRaw(SacrificialSoulID, false, false);
Sleep(1000);
end;
end;
-- define variables
me = GetMe();
pet = GetPet();
if (me:GetClass() == 167) and not (me:IsAlikeDeath()) then -- me soultaker and not dead
if (pet == nil) then -- if i dont have oet
SkillUse(SummonReanimatedManId); -- summoning it
elseif ((pet:GetHpPercent() < minHealthPercent) and (pet ~= nil)) and not (pet:IsAlikeDeath()) then -- if i got pet and not like dead and hp conditions, using skill
SkillUse(SacrificialSoul);
end;
end;
Sleep(1000);
until false;