Two ways to activate white damage

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
parramet
Posts: 15
Joined: Wed Feb 13, 2013 7:49 pm

Two ways to activate white damage

#1 Post by parramet » Wed Nov 13, 2013 12:54 pm

Hi all,

Oh boy , those sw are turning me crazy. Ok this is the new thing that comes to my mind to sqeeze that damage.
I noticed that im missing white damage on pvp due to the white damage doesn't activate untill you use a skill but all skills have global cooldown so once i atack someone and kill , even if I target the next player fast I cant do shit damage until that gcd is clear time the enemy kills me one hit. Well thats usually pvp in rom unless your tank nowadays.

I know I know , I could add a macro /attack in my specially designed macro for autotargetting and shit but that has a big disadvantage since always tries to go forward breaking my movement.
There is another way to activate that white damage and doesnt interrupt my movement which is to use the right mouse button on the enemy and that is the function I´d like to use with micromacro to be in combat with that target without telling /attack.

Is this thing possible I already have the rest of the waypoint just need that line to add.Here i copy the waypoint I made but doesn't make the effect I want.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while (true) do
  
   
   if keyPressed(key.VK_F) then
      target = player:getTarget()
      if target then
         repeat
           player:fight()
            target:update()
	  until 0 > target.HP/target.MaxHP*100         
      end
   end
end

</onLoad>
</waypoints>
Thanks for the time , people.

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

Re: Two ways to activate white damage

#2 Post by lisa » Wed Nov 13, 2013 6:52 pm

Code: Select all

         repeat
           player:fight()
            target:update()
     until 0 > target.HP/target.MaxHP*100  
player:fight() has it's own repeating loop and also has it's own reasons for leaving the loop, like taking to long to do damage or target is to far away, also I'm not sure if PVP is covered in the player fight function.

I think for something this specific you may need to do your own fight coding and you can probably make it much more efficient as you only have 1 target to worry about and not mulitple targets, the bot will be spending alot of resources doing calculations that aren't needed for what you want.

If you are purely after that white damage then you can simply make it do the attack timer.

Code: Select all

	function timedAttack2()
		player:updateTargetPtr();

		-- Prevents looting when looting is turned off
		-- (target is dead, or about to be dead)
		if player.TargetPtr == 0 then
			unregisterTimer("timedAttack2")
		else
			target:updateHP()
			if (target.HP/target.MaxHP) <= 0.1 then
				return;
			end

			Attack()
		end;
	end
   if keyPressed(key.VK_F) then
      target = player:getTarget()
      if target then
registerTimer("timedAttack2", secondsToTimer(2), timedAttack2);
end
end
Something along those lines anyway.
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

parramet
Posts: 15
Joined: Wed Feb 13, 2013 7:49 pm

Re: Two ways to activate white damage

#3 Post by parramet » Thu Nov 14, 2013 6:20 am

Hi,

Nice thanks for the tips Lisa , so fast to response. This is what I did now , even more simple . I added a new skill to the skills.xml database

Code: Select all

<skill name="WARRIOR_ATTACK" id="540000" range="50" type="damage" target="enemy" />
Also add this to the profile skills

Code: Select all

<skill name="WARRIOR_ATTACK"		 hotkey="MACRO"    />
and this is how it looks the waypoint

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
  while (true) do 
   if keyPressed(key.VK_F) then
           player:cast("WARRIOR_ATTACK")
   end
end
</onLoad>
</waypoints>
This way now , attack only activates when its on white dmg range so its perfect now. But , yes always there is a but , now I see a new problem . The bot tries to take control of the situation changing me constantly the camera view angle . I´m so close to have it perfect , please help.

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

Re: Two ways to activate white damage

#4 Post by lisa » Thu Nov 14, 2013 6:32 pm

That still uses a lot of code that isn't needed.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
skillName = GetIdName(540000)
  while (true) do 
   if keyPressed(key.VK_F) then
           RoMScript("CastSpellByName(\""..skillName.."\");");
           yrest(500)
   end
yrest(500)
end
</onLoad>
</waypoints>
It seems to me though you may aswell just set attack to a hotkey of "F" in game because that code is simply just doing the attack skill when you press "F"
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

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: Two ways to activate white damage

#5 Post by Bill D Cat » Fri Nov 15, 2013 1:44 am

lisa wrote: It seems to me though you may aswell just set attack to a hotkey of "F" in game because that code is simply just doing the attack skill when you press "F"
Which in and of itself is overkill since you can just press the main keyboard 1 key for the same effect (unless you've moved the Attack icon of course).

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

Re: Two ways to activate white damage

#6 Post by rock5 » Fri Nov 15, 2013 3:48 am

I though along the same lines but he says
parramet wrote:This way now , attack only activates when its on white dmg range so its perfect now.
I think he is taking advantage of the fact that the bot checks the range and doesn't cast the skill if the mob is not in range. If you just cast the skill with the API command or press an Attack key it will move to the target which is what I think he is trying to avoid.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests