Page 1 of 2
How to create a function for a elite skill
Posted: Sun Nov 24, 2013 11:50 pm
by AngelDrago
Hello, i would like to create an function, for instant if i use Earth Core Barrier that last 5 sec and has an cool down of 3 minutes with flame i can fire up about 5 shots manually but if i can create an function that allows me to cast more than 5 shoots that would be great any idea on how i should go about it. thx any help is always appriciates
Re: How to create a function for a elite skill
Posted: Mon Nov 25, 2013 12:10 am
by Bill D Cat
I think your best bet to create an <onSkillCast> in your player profile that checks to see if you cast Earth Core Barrier, then tries to cast as many Flame skills as you care to put into it. You can try something like this, though it is untested.
Code: Select all
<onSkillCast>
if arg1 == "MAGE_EARTH_CORE_BARRIER" then
while player:hasBuff(######) do -- Earth Core Barrier buff ID
player:cast("MAGE_FLAME")
end
end
</onSkillCast>
Edit: Thought of a better way to do it. This will try to cast as many Flames as it can as long as you have the buff. I'm not sure if GCD will be an issue, but it should loop until the buff wears off.
Re: How to create a function for a elite skill
Posted: Mon Nov 25, 2013 3:48 pm
by AngelDrago
thx will try that let you know as well
Re: How to create a function for a elite skill
Posted: Mon Nov 25, 2013 9:59 pm
by kuripot
i have post about that .. i think in GC thread
Re: How to create a function for a elite skill
Posted: Wed Nov 27, 2013 11:21 am
by AngelDrago
so my next question how do i execute it....
Re: How to create a function for a elite skill
Posted: Wed Nov 27, 2013 3:59 pm
by kuripot
i use this in grafu
Code: Select all
if player:findNearestNameOrId(105617) then
local Cayus = player:findNearestNameOrId(105617)
bossbuff()
player:cast("MAGE_EARTH_MARKING")
player:cast("MAGE_INTENSIFICATION")
player:cast("MAGE_ELEMENTAL_CATALYSIS")
fly()
__WPL:setForcedWaypointType("NORMAL")
player:target(Cayus)
player:cast("MAGE_FLAME");
player:cast("MAGE_EARTH_CORE_BARRIER");
if arg1.Name == "MAGE_FLAME" then
if player:hasBuff(623219) then
arg1.CastTime = 0
else
arg1.CastTime = 3
end
end
player:target(Cayus)
player:cast("MAGE_FLAME")
if( arg1.Name == "MAGE_FLAME" ) then
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
end
player:update();
yrest(500)
if( arg1.Name == "MAGE_FLAME" ) then
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
end
player:update();
yrest(500)
if( arg1.Name == "MAGE_FLAME" ) then
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
end
player:update();
yrest(500)
if( arg1.Name == "MAGE_FLAME" ) then
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
end
player:update();
yrest(500)
if( arg1.Name == "MAGE_FLAME" ) then
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
end
player:update();
yrest(500)
end
Re: How to create a function for a elite skill
Posted: Wed Nov 27, 2013 7:34 pm
by Bill D Cat
I'd probably simplify that down even more. Maybe something like this would work just as well. Just too much repetition to the code for my taste. But if it works for you, then keep using it
Code: Select all
local Cayus = player:findNearestNameOrId(105617)
if Cayus and 250 > distance(Cayus, player) then
bossbuff()
player:cast("MAGE_EARTH_MARKING")
player:cast("MAGE_INTENSIFICATION")
player:cast("MAGE_ELEMENTAL_CATALYSIS")
fly()
__WPL:setForcedWaypointType("NORMAL")
player:target(Cayus)
player:cast("MAGE_FLAME");
player:cast("MAGE_EARTH_CORE_BARRIER");
if arg1.Name == "MAGE_FLAME" and player:hasBuff(623219) then
arg1.CastTime = 0
else
arg1.CastTime = 3
end
player:target(Cayus)
player:cast("MAGE_FLAME")
if( arg1.Name == "MAGE_FLAME" ) then
for flameLoop = 1, 5 do
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
player:update();
yrest(500)
end
end
end
Re: How to create a function for a elite skill
Posted: Thu Nov 28, 2013 4:58 pm
by AngelDrago
thank you both... i guess i should have asked the question a little differently...
I'm looking for a much more simpler solution like most runs i do it bu my self so the only time that i would need to use the code so if i stand in frond of cyrus in this case i will use the code if i stand in front of Boro -Boro it should work also. so more like universal for all the boss fights.
thanks again for all the help
Re: How to create a function for a elite skill
Posted: Thu Nov 28, 2013 6:10 pm
by Bill D Cat
Just substitute the ID of the boss you want to fight at the beginning of that routine. You can also change the variable name from "Cayus" to something else meaningful like "BossName" or what have you. It's just an example of how you could do it, but most likely it will have to be modified and adapted to each situation where you want to use it.
Re: How to create a function for a elite skill
Posted: Fri Nov 29, 2013 7:19 am
by kuripot
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
function elitemage()
local Boss = player:findNearestNameOrId(105617) or player:findNearestNameOrId(012345) -- replace the ID of boss you want to bully
if Boss and 250 > distance(Boss, player) then
bossbuff()
player:cast("MAGE_EARTH_MARKING")
player:cast("MAGE_INTENSIFICATION")
player:cast("MAGE_ELEMENTAL_CATALYSIS")
fly()
__WPL:setForcedWaypointType("NORMAL")
player:target(Boss)
player:cast("MAGE_FLAME");
player:cast("MAGE_EARTH_CORE_BARRIER");
if arg1.Name == "MAGE_FLAME" and player:hasBuff(623219) then
arg1.CastTime = 0
else
arg1.CastTime = 3
end
player:target(Boss)
player:cast("MAGE_FLAME")
if( arg1.Name == "MAGE_FLAME" ) then
for flameLoop = 1, 5 do
SlashCommand("s Flame...........")
player:cast("MAGE_FLAME");
player:update();
yrest(500)
end
end
end
end
</onLoad>
<!-- # 1 --><waypoint x="-12345" z="12345"> elitemage() </waypoint> -- location of boss you want to use the skill
<!-- # 2 --><waypoint x="-12345" z="12345"> elitemage() </waypoint> -- location of next boss you want to use the skill
</waypoints>
i only assuming.. im not sure if this is will work
Re: How to create a function for a elite skill
Posted: Fri Nov 29, 2013 8:00 am
by rock5
arg1 has no value in a waypoints onload. Any code using arg1 has to be in the onPreSkillCast of a profile.
Re: How to create a function for a elite skill
Posted: Fri Dec 06, 2013 8:15 am
by AngelDrago
Thanks you kuripot (going to try it) for the script and everyone of you all for the info's but i was hopping for something a little less complicated that i need to have for each boss.
So I'm now looking for an "macro" solution for simplicity. any ideas i did check out some of the macros out their and tried to make it so it works for me but i failed see below...
/script cast Earth Core Barrier if (UnitHealth("target")>0) then UseAction(8); end
this should reaped it self but for some reason it does not work
maybe you could help me figured this out. And thank you again, everyone for the help
Re: How to create a function for a elite skill
Posted: Fri Dec 06, 2013 8:23 am
by Bill D Cat
Sometime back in Chapter 4, they disabled the ability for an in-game macro to call another macro in their attempt to stop botters. So you can't set it up to loop like that anymore.
Re: How to create a function for a elite skill
Posted: Fri Dec 06, 2013 11:02 am
by AngelDrago
dang... is their another way to do this via macro?
Re: How to create a function for a elite skill
Posted: Sat Dec 07, 2013 6:45 am
by i1own0u
Using diyce for this kind of thing is much better. Just like weaving charged chop.
Re: How to create a function for a elite skill
Posted: Sat Dec 07, 2013 6:59 am
by kuripot
can you share how to edit the skill of diyce?/ and how to execute ingame??
Re: How to create a function for a elite skill
Posted: Sat Dec 07, 2013 7:22 am
by kuripot
Angeldrago.. what are you realy want to do??
you need to make waypoint then use the elite skill in boss?? did you make a waypoint from portal to the boss you want to farm>??.. show it and let check to know waht we can help to make it work
Re: How to create a function for a elite skill
Posted: Sat Dec 07, 2013 6:31 pm
by AngelDrago
no farming at all i just wanted to go up to the boss and use the flame spam so i can give more than 5 or 6 flames in 5 seconds. i was thinking about a macro but from what i understand now is that you can not call a macro in a macro for instant you have a macro that call's earth core barrier and than call's flame constantly. I'm not sure if this make sense in all this.
Re: How to create a function for a elite skill
Posted: Sat Dec 07, 2013 9:37 pm
by kuripot
i think it will help.. onpreskill of rock
http://www.solarstrike.net/phpBB3/viewt ... =21&t=5051
then use this waypoint
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
local afk = false
while (true) do
player:checkSkills(true) -- self buff and heal
if keyPressed(key.VK_U) then
if afk == true then
afk = false
print("Please don't let me die as I am weak and won't defend myself")
else
afk = true
print("I will defend our honor while you go powder your nose")
end
end
player:update()
if afk == true then
if player.Battling then
player:target(player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget));
if player:haveTarget() then
player:fight()
end
end
end
if keyPressed(key.VK_F) then
target = player:getTartget()
if target then
repeat
player:checkSkills(true) -- self buff and heal
player:cast("MAGE_FLAME")
target:update()
until 5 > target.HP/target.MaxHP*100
end
end
end
</onLoad>
</waypoints>
try it if it can help
Re: How to create a function for a elite skill
Posted: Sat Apr 05, 2014 3:19 pm
by AngelDrago
I tried every combo in here with no luck does anyone tried this with DIYCE yet please advice
Thank you