Page 1 of 1
Targeting and Using Skill Until Taget is Dead
Posted: Fri Mar 11, 2011 10:35 am
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
Re: Targeting and Skill Until Taget is Dead
Posted: Fri Mar 11, 2011 10:39 am
by rock5
Try adding a "target:update()" in the loop.
Re: Targeting and Using Skill Until Taget is Dead
Posted: Fri Mar 11, 2011 11:35 am
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.
Re: Targeting and Using Skill Until Taget is Dead
Posted: Sat Mar 12, 2011 7:38 am
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.
Re: Targeting and Using Skill Until Taget is Dead
Posted: Sat Mar 12, 2011 1:35 pm
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>