How to create a function for a elite skill
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
How to create a function for a elite skill
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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: How to create a function for a elite skill
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.
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.
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>
Last edited by Bill D Cat on Mon Nov 25, 2013 8:50 pm, edited 3 times in total.
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
thx will try that let you know as well
Re: How to create a function for a elite skill
i have post about that .. i think in GC thread
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
so my next question how do i execute it....
Re: How to create a function for a elite skill
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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: How to create a function for a elite skill
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
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
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
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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: How to create a function for a elite skill
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
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
arg1 has no value in a waypoints onload. Any code using arg1 has to be in the onPreSkillCast of a profile.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
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
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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: How to create a function for a elite skill
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.
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
dang... is their another way to do this via macro?
Re: How to create a function for a elite skill
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
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
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
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
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
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
i think it will help.. onpreskill of rock
http://www.solarstrike.net/phpBB3/viewt ... =21&t=5051
then use this waypoint try it if it can help
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>
-
- Posts: 133
- Joined: Fri May 06, 2011 10:39 am
Re: How to create a function for a elite skill
I tried every combo in here with no luck does anyone tried this with DIYCE yet please advice
Thank you
Thank you
Who is online
Users browsing this forum: Bing [Bot] and 18 guests