Lineage 2 Tower Forum

Full Version: Help Feoh Skills!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!
'm Feoh Wizard, and tava behind a script to power farm! But all scripts only worked 1 skill!
I tested several and the only script that I could work up was this:

Quote:function checkUltimateDefense(Objid)
if (Objid ~= nil) then -- this cant be really 0, just a safety check
if (Objid:GotBuff(5044)) then -- checking if our target has buff id=5044 [s_npc_ultimate_defense]
CancelTarget(true); -- cancelling the target if theres a mob near us the bot will pick next
end;
end;
end;

function getSkillByName(Cname)
skillList = GetSkills(); -- lets get a list of our skills
for skill in skillList.list do -- lets loop thru the list
if skill.name == Cname then -- if skill name matches ours we return its struct
return skill
end;
end;
return nil
end;

SkillName = "Elemental Spike"; -- proper skill name must match the skill name ingame (case sensitive)
MyID = GetMe():GetId(); -- our objid
MySkill = getSkillByName(SkillName); -- our skill struct gets stored here

SkillName = "Elemental Crush"; -- proper skill name must match the skill name ingame (case sensitive)
MyID = GetMe():GetId(); -- our objid
MySkill = getSkillByName(SkillName); -- our skill struct gets stored here

SkillName = "Elemental Destruction"; -- proper skill name must match the skill name ingame (case sensitive)
MyID = GetMe():GetId(); -- our objid
MySkill = getSkillByName(SkillName); -- our skill struct gets stored here

if (MySkill ~= nil) then -- if we mistyped the skill or the bot cant find it the script ends here
repeat
MyTargetID = GetMe():GetTarget(); -- checking if we have a target
if (MyTargetID ~= nil) then -- if we do THEN...
MyTargetData = GetUserById(MyTargetID); -- getting our targets data
checkUltimateDefense(MyTargetData); -- checking for ultimate defense on our target
if ((MyTargetData ~= nil) and (MyTargetData:GetTarget() == MyID) and (MyTargetData:IsMonster())) then -- checking if our target is targeting us and its a monster
if (GetMe():GetMp() >= MySkill.mpConsume) then -- getting our mp and checking if its more or equal to skills mp usage
UseSkillRaw(MySkill.skillId,false,false); -- using the skill we specified
Sleep(200);
end;
end;
end;
Sleep(100);
until false;
end;

This escript works great!
The problem is that only leaves the first 2 skills, can put 3, 4, 5 skills that only leaves the first 2! How do I fix this?
This script got him ready and I was just duplicating this part:

Quote:SkillName = "Elemental Spike"; - proper skill name must match the skill ingame name (case sensitive)
GetMe MyID = (): GetId (); - our objid
MySkill = getSkillByName (SkillName); - our skill struct gets stored here

Just changed the name of the skill!

Really wanted to solve this! Someone who really understands can help me?
Reference URL's