How to create a function for a elite skill

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

How to create a function for a elite skill

#1 Post by AngelDrago » Sun Nov 24, 2013 11:50 pm

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

User avatar
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

#2 Post by Bill D Cat » Mon Nov 25, 2013 12:10 am

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.
Last edited by Bill D Cat on Mon Nov 25, 2013 8:50 pm, edited 3 times in total.

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#3 Post by AngelDrago » Mon Nov 25, 2013 3:48 pm

thx will try that let you know as well

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#4 Post by kuripot » Mon Nov 25, 2013 9:59 pm

i have post about that .. i think in GC thread

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#5 Post by AngelDrago » Wed Nov 27, 2013 11:21 am

so my next question how do i execute it.... :?: :?

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#6 Post by kuripot » Wed Nov 27, 2013 3:59 pm

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

User avatar
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

#7 Post by Bill D Cat » Wed Nov 27, 2013 7:34 pm

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

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#8 Post by AngelDrago » Thu Nov 28, 2013 4:58 pm

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

User avatar
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

#9 Post by Bill D Cat » Thu Nov 28, 2013 6:10 pm

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.

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#10 Post by kuripot » Fri Nov 29, 2013 7:19 am

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to create a function for a elite skill

#11 Post by rock5 » Fri Nov 29, 2013 8:00 am

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

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#12 Post by AngelDrago » Fri Dec 06, 2013 8:15 am

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 :oops:

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

User avatar
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

#13 Post by Bill D Cat » Fri Dec 06, 2013 8:23 am

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.

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#14 Post by AngelDrago » Fri Dec 06, 2013 11:02 am

dang... is their another way to do this via macro?

i1own0u
Posts: 32
Joined: Mon Mar 19, 2012 6:32 pm

Re: How to create a function for a elite skill

#15 Post by i1own0u » Sat Dec 07, 2013 6:45 am

Using diyce for this kind of thing is much better. Just like weaving charged chop.

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#16 Post by kuripot » Sat Dec 07, 2013 6:59 am

can you share how to edit the skill of diyce?/ and how to execute ingame??

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#17 Post by kuripot » Sat Dec 07, 2013 7:22 am

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

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#18 Post by AngelDrago » Sat Dec 07, 2013 6:31 pm

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.

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: How to create a function for a elite skill

#19 Post by kuripot » Sat Dec 07, 2013 9:37 pm

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

AngelDrago
Posts: 133
Joined: Fri May 06, 2011 10:39 am

Re: How to create a function for a elite skill

#20 Post by AngelDrago » Sat Apr 05, 2014 3:19 pm

I tried every combo in here with no luck does anyone tried this with DIYCE yet please advice

Thank you

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 32 guests