Targeting and Using Skill Until Taget is Dead

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
BaksikPL
Posts: 4
Joined: Tue Feb 15, 2011 6:57 am

Targeting and Using Skill Until Taget is Dead

#1 Post by BaksikPL »

Hi i need Function like this

Code: Select all

      keyboardPress(key.VK_TAB);
yrest(500);

local target = player:getTarget();
if(target.HP > 1) then
   
   while(target.HP == 0) do
     
      player:cast("SCOUT_SHOT");
      yrest(500);
   end
end
This function work but SCOUT_SHOT is still spamming , even if the target is no longer alive
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Targeting and Skill Until Taget is Dead

#2 Post by rock5 »

Try adding a "target:update()" in the loop.
  • 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
BaksikPL
Posts: 4
Joined: Tue Feb 15, 2011 6:57 am

Re: Targeting and Using Skill Until Taget is Dead

#3 Post by BaksikPL »

This function is probably good, but not what I wanted, now I have this error

Fight Finished but boss is still alive. Aggro wait time out.
Attachments
Screen.JPG
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Targeting and Using Skill Until Taget is Dead

#4 Post by Administrator »

while(target.HP == 0) do

player:cast("SCOUT_SHOT");
yrest(500);
end
Why are you telling to use SCOUT_SHOT only when the target has exactly 0 HP? With how RoM is programmed, enemies rarely ever have exactly 0 HP even when dead.
BaksikPL
Posts: 4
Joined: Tue Feb 15, 2011 6:57 am

Re: Targeting and Using Skill Until Taget is Dead

#5 Post by BaksikPL »

Okay, I'll try to expand what I mean.
My two characters to easily do the first boss in the normal DoD

Waypoint for tank is good and work perfectly but dps cant shot becose dont have aggro.


TANK

Code: Select all

<waypoint x="2193" z="2367" y="401">	

      yrest(250);
      changeProfileOption("MAX_TARGET_DIST", 120)   
      sendMacro('TargetUnit("party1")');
      local target = player:getTarget();
      target:updateBuffs()
             if player:hasBuff("Play Lute") == false then
            repeat
            yrest(500);
            

            keyboardPress(key.VK_SPACE);
            player:updateBuffs()
            until player:hasBuff("Play Lute") == true
            end

           
            

            keyboardPress(key.VK_SPACE);

   sendMacro("UseAction(21)");
   yrest(6000);
   sendMacro("UseAction(22)");
   yrest(1000);
   sendMacro("UseAction(23)");
   yrest(1000);
   sendMacro("UseAction(24)");
   yrest(1000);
   sendMacro("UseAction(25)");
   yrest(1000);
   sendMacro("UseAction(26)");
   yrest(1000);

player:cast("ROGUE_SIGIL");



                        </waypoint>
DPS

Code: Select all

   <waypoint x="2193" z="2367">	

changeProfileOption("MAX_TARGET_DIST", 150)

if player:hasBuff("Play Lute") == false then
            repeat
            yrest(1500);
           
player:cast("SCOUT_GRANIE");

            keyboardPress(key.VK_SPACE);
            player:updateBuffs()
            until player:hasBuff("Play Lute") == true
            end
 if player:hasBuff("Shake Tambourine") == false then
            repeat
            yrest(1500);
            

            keyboardPress(key.VK_SPACE);
            player:updateBuffs()
            until player:hasBuff("Shake Tambourine") == true
            end
            keyboardPress(key.VK_SPACE);


   yrest(2000);        
   
   sendMacro("UseAction(25)");
   yrest(1000);

   sendMacro("UseAction(24)");
   yrest(1000);


player:cast("SCOUT_SIGIL");
yrest(1000);
   sendMacro("UseAction(26)");
   yrest(100);
   sendMacro("UseAction(27)");
   yrest(1000);



      keyboardPress(key.VK_TAB);     <<----  hare i need function 
yrest(500);                                  <<----   for target and shoting Until boss Die

player:fight();

 



   
                        </waypoint>
Post Reply