Help - Search - Members - Calendar
Full Version: Help with this mini macro!
AC Tools Everything Macro > AC Tool > AC Tool Discussion
Gregory Derner
Okay guys, I need a little help here.

I simply do not want do something for me, I understand and learn from who knows how.
Excuse the English, I am using translator. = ss sad.gif

this is my macro:

// start of macro
SetActiveWindow Archlord
While 1=1
Call cheq //Run procedure cheq, look for a target
End

Constants
HPCheio = 100 // hp full
s1 = 4 // skill atack
s2 = 3 // skill atack
bf1Delay = 468 sec //buff delay, I am not using it anywhere, because when you put run, he was expecting 468 secs to move to next key

hpiniX = 415 // X coordinate of the beginning of the hp of the monster
hpfimX = 696 // X coordinate of the end of the monster hp
HPY = 27 // Y corrdinate of the hp of the monster
Temp = 0
End

Procedure cheq // look for target
KEYS {DEL} // this statement is select any target near the char
Compute Temp = $hpiniX + $HPcheio
Isred $Temp, $HPY
CALL ATQ // call procedure atack for kill target
ELSE
CALL PEGA // call pega for pikup the drop
END
END

PROCEDURE ATQ
KEYS $S1
DELAY 2 SEC
KEYS $S2
DELAY 2 SEC
CALL CHEQ
END

PROCEDURE PEGA
KEYDOWN {SPACE} 5 SEC
DELAY 5 SEC
END
// end of macro

Sure! what I do:

I want the macro look for a target.
When you find a target it uses the buff, then he belongs to the attack.
the buffs have a cooldown of 468 secs and I used it every time I could. (if that is too complicated, can be without the same buf)

Kill the target (if he died there) if he dies he takes a drop of the monster, if it is not dead he comes back to attack the monster.
and then get the drop.
Ipa
Recursion bug.

CHEQ calls ATQ calls CHEQ calls ATQ ... repeat until macro goes boom.
Gregory Derner
QUOTE(Ipa @ Aug 15 2009, 01:38 PM) *
Recursion bug.

CHEQ calls ATQ calls CHEQ calls ATQ ... repeat until macro goes boom.




Yes the game he is even changing the target, now that I realized the error said, but, to me he is not checking if the hp of the monster is or is not empty.
help?

This macro should function as it created?

or would another form of it check the hp of the monster, see if it is full or not?

Things to know about the game:

The bar hp monster always appears in the same place.
it is red what can help me.

the macro, I just want you to identify if the hp is empty or not.
is empty, the show died, so he takes a drop. if not, he continues attacking.

has to understand?

thanks
Gregory Derner
Sure. So, someone can just explain me how works exactly the functions GetRed, IsRed?

I want my macro to determine if the monster is alive or not. If I can show to the HP Macro (Red) disappeared, I mean it is dead, and then call the next function.

Someone could help me, explaining and giving some examples?

One way that here and tried, but failed, is:

/ / example
While 0 = 0
Call Find
end

Constants
Xin = 100 / X position of the mouse. beginning of the monster hp
Xfim = 600 / X position of the mouse. end of the monster hp
Y = 10 / / Y position of mouse on hp monster
Atq = 3 / / shortcut to attack the monster
Ras = 4 / / shortcut to get pieces of the monster
red = Isred
INHP = 100, 10
end

Procedure Find / / see if it is alive or dead
Compute INHP = $red
if $INHP = $red
Call Atq
Else
Call Ras
end
end
/ / If the start of the monster hp is red (live) then call ataq. if not, go to Ras (take pieces of the monster)


Procedure Atq
loop 5
Keys $atq
delay 1 sec
end
Call Find
end
/ / Attack the monster, then make sure it is dead (call find) in PROCEDURE FIND own he goes into the RAS PROCEDURE, if dead.

Procedure Ras
loop 10
Keys $ras
Delay 0.1 sec
end
Call Find
end

/ / End of example

What seems to happen here in the game (ARCHLORD) is that the macro does not identify the color, I think it is, but it may be nonsense in my time to make the same macro, or will know. ^ ^

Now thanks to all who help.
Bear
QUOTE(Gregory Derner @ Aug 17 2009, 11:56 AM) *
Sure. So, someone can just explain me how works exactly the functions GetRed, IsRed?

I want my macro to determine if the monster is alive or not. If I can show to the HP Macro (Red) disappeared, I mean it is dead, and then call the next function.

Someone could help me, explaining and giving some examples?

One way that here and tried, but failed, is:

CODE
// example
While 0 = 0
Call Find
end

Constants
Xin = 100 // X position of the mouse. beginning of the monster hp
Xfim = 600 // X position of the mouse. end of the monster hp
Y = 10 // Y position of mouse on hp monster
Atq = 3 // shortcut to attack the monster
Ras = 4 // shortcut to get pieces of the monster
red = Isred
INHP = 100, 10
end

Procedure Find // see if it is alive or dead
Compute INHP = $red
if $INHP = $red
Call Atq
Else
Call Ras
end
end
// If the start of the monster hp is red (live) then call ataq. if not, go to Ras (take pieces of the monster)


Procedure Atq
loop 5
Keys $atq
delay 1 sec
end
Call Find
end
// Attack the monster, then make sure it is dead (call find) in PROCEDURE FIND own he goes into the RAS PROCEDURE, if dead.

Procedure Ras
loop 10
Keys $ras
Delay 0.1 sec
end
Call Find
end

// End of example

What seems to happen here in the game (ARCHLORD) is that the macro does not identify the color, I think it is, but it may be nonsense in my time to make the same macro, or will know. ^ ^

Now thanks to all who help.


All I did was Double click the IsRed in the Command drop-down box..

CODE
Procedure Find // see if it is alive or dead
  IsRed  600, 100
    // Do these commands if true
    Call Atq
  Else
    // Do these commands if false
    Call Ras
  End
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.