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

Re: How to create a function for a elite skill

#21 Post by AngelDrago » Mon Apr 07, 2014 11:27 am

kuripot wrote: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

I'm getting this error when i hit F key

The game client did not crash.
11:25am - [string "..."]:24: attempt to call method 'getTartget' (a nil value)

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

#22 Post by rock5 » Mon Apr 07, 2014 11:59 am

Tartget? Isn't it obvious? In case it isn't, it's supposed to be

Code: Select all

target = player:getTarget()
  • 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

#23 Post by AngelDrago » Thu Apr 10, 2014 3:02 pm

:roll: I fixed that problem now every time I'm using it it will start with a fireball but nothing else is working so i manually click on it and it waited till he buff where off and than resumed fire-ring

is their a better way to do this like a user function that you could use for example by pressing num 1 and than it goes and starts it sequence and maybe a check if its still on cool down....in a way like the Andor Training Ground

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: How to create a function for a elite skill

#24 Post by lisa » Thu Apr 10, 2014 5:45 pm

Code: Select all

         repeat
            player:checkSkills(true) -- self buff and heal
            player:cast("MAGE_FLAME")
            target:update()
         until 5 > target.HP/target.MaxHP*100
That code tells the bot to use heal/buff skills and flame ONLY until the mob is dead, it won't use any other damage skills because you haven't told it to.

If you want it to use flame only while you have the buff and then use normal skills then you need to tell it to do so. change the until to be that you don't have buff anymore. Then check mob is alive still and if so then do player:fight()
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: How to create a function for a elite skill

#25 Post by noobbotter » Thu Oct 16, 2014 8:19 am

I don't have a Mage/Warden but was curious about that Earth Core Barrier skill. Aside from removing all cast time of Flame, does it also allow you to ignore the global cooldown? So you could potentially cast a Flame as fast as the command can be issued? If that's the case I wonder if it would be possible to cast a flame once every 10 miliseconds. That would be 100 flames per second. Probably not. Maybe one every 100 miliseconds? That would be 10 per second, and 50 for the life of the buff. That's enough to do some major damage to a Boss. So looking at some of the previous posts, I threw this together but it's untested. Maybe this would work for encountering the boss or high level elite (in this example, anything over 1M HP:

Code: Select all

<preCodeOnElite><![CDATA[
		-- code to use before a boss or tough mob
		-- _arg1 is target pawn, _arg1.Name = target's name
		if _arg1.HP > 1000000 then -- will only do this for elites/bosses with over 1M HP.
			player:cast("MAGE_EARTH_MARKING")
			player:cast("MAGE_INTENSIFICATION")
			player:cast("MAGE_ELEMENTAL_CATALYSIS")
			player:cast("MAGE_EARTH_CORE_BARRIER");
			player:target(_arg1.Name)
			while player:hasBuff(623219) do
				--player:cast("MAGE_FLAME")
				-- Thinking to use macro vice bot's casting so you don't have to worry about the cast time setting of MAGE_FLAME
				sendMacro("/cast Flame")
				yrest(10)
			end
		end
	]]></preCodeOnElite>
That would go in the bot's profile. Like I said I haven't tested it. If anyone would want to test it and see how it works, feel free. I'm curious if it would work or not.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 13 guests