Help - Search - Members - Calendar
Full Version: Need help w/ a macro!
AC Tools Everything Macro > AC Tool > AC Tool Discussion
Bl10
Hi guys~,
something is not working right with my macro,
anyone can help ^^?

Im looking for the Atk_Cycle to keep executing,
and meanwhile executes TriMouse_Up, TriMouse_DownRight, TriMouse_DownLeft sometimes or randomly.
Thanks if anyone can help ^^!


----------------------------------------------------------

Constants

Pledge_Of_Blood_Delay = 28800
Portion_Delay = 14400
End

DELAY 1600

Procedure Buff_Blood

Keys {R}
DELAY $Pledge_Of_Blood_Delay
End

Procedure HP_Delay

Keys {Q}
DELAY $Portion_Delay
End

Procedure TriMouse_Up

MousePos 652, 199
LeftClick
End

Procedure TriMouse_DownRight

MousePos 870, 557
LeftClick
End

Procedure TriMouse_DownLeft

MousePos 413, 540
LeftClick
End

Procedure Atk_Cycle

DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {2}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}

DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {3}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}

DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {4}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}
End



Loop 5000

Call Buff_Blood

Call Atk_Cycle

Call TriMouse_Up

Call Atk_Cycle

Call TriMouse_DownRight

Call Atk_Cycle

Call TriMouse_DownLeft

Call HP_Delay

End

Restart
Bear
QUOTE(Bl10 @ Aug 8 2009, 10:10 AM) *
Hi guys~,
something is not working right with my macro,
anyone can help ^^?

Im looking for the Atk_Cycle to keep executing,
and meanwhile executes TriMouse_Up, TriMouse_DownRight, TriMouse_DownLeft sometimes or randomly.
Thanks if anyone can help ^^!


----------------------------------------------------------


CODE

Constants
Pledge_Of_Blood_Delay = 28800
Portion_Delay = 14400
End

DELAY 1600

Procedure Buff_Blood
Keys {R}
DELAY $Pledge_Of_Blood_Delay
End

Procedure HP_Delay
Keys {Q}
DELAY $Portion_Delay
End

Procedure TriMouse_Up
MousePos 652, 199
LeftClick
End

Procedure TriMouse_DownRight
MousePos 870, 557
LeftClick
End

Procedure TriMouse_DownLeft
MousePos 413, 540
LeftClick
End

Procedure Atk_Cycle
DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {2}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}

DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {3}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}

DELAY 300
Keys {~}
DELAY 400
Keys {Space}
DELAY 300
Keys {4}
DELAY 150
Keys {~}
DELAY 200
Keys {Space}
DELAY 200
Keys {~}
Keys {~}
DELAY 200
Keys {D}
End

Loop 5000
Call Buff_Blood
Call Atk_Cycle
Call TriMouse_Up
Call Atk_Cycle
Call TriMouse_DownRight
Call Atk_Cycle
Call TriMouse_DownLeft
Call HP_Delay
End

Restart

Why are your Keys Enclosed in {}? Only Spacebar should be enclosed. It's Valid if the Text turns Blue. NEVER use the Restart command. Once you use the Restart command you can't STOP the macro without Stopping ACTools. Instead of Loop 5000, use "While 1 = 1" then you don't have to use Restart.
Edit:
Upon looking at the Code again I see your using the ~ key. ACTool uses that key as a Special Key ~ = Alt, so everytime you use ~ ACTool is gonna send a ALT key press.
Bl10
[/quote]
Why are your Keys Enclosed in {}? Only Spacebar should be enclosed. It's Valid if the Text turns Blue. NEVER use the Restart command. Once you use the Restart command you can't STOP the macro without Stopping ACTools. Instead of Loop 5000, use "While 1 = 1" then you don't have to use Restart.
Edit:
Upon looking at the Code again I see your using the ~ key. ACTool uses that key as a Special Key ~ = Alt, so everytime you use ~ ACTool is gonna send a ALT key press.
[/quote]

lol, I dont really know much about AC Tools really ><~!
kind of just learning from people's macros can putting stuffs together.
Thanks for the While 1=1, "~", and Restart tips!!

Just figure out the problems on the last part,

Call Buff_Blood

Call Atk_Cycle

Call TriMouse_Up

Call Atk_Cycle

Call TriMouse_DownRight

Call Atk_Cycle

Call TriMouse_DownLeft

Call HP_Delay

----------------------------------------

any ideas as to how do i make those call working at the same time?
when i press start the call just kind of do the Buff and then just wait there for the delay,
and didn't start the attack cycle......
Im looking for the character to buff first
and then go to the attack cycle and keep doing his thing and when the delay time is up do the buff again.

ohh... and one more problem!!
how do you make the calls exercute randomly?
lets say i want to go to attack cycle (Call Atk_Cycle) first and then jump to Mouse Up (Call TriMouse_Up)
and then attack cycle (Call Atk_Cycle) and jump to Mouse Down Left (Call TriMouse_DownLeft),
how do you code something like that?
Bear
QUOTE(Bl10 @ Aug 9 2009, 11:59 AM) *
how do you make the calls exercute randomly?


CODE
Constants
  Var1=0
End
Loop 20
  Compute Var1 = TRUNC(RND(3))
  timestamp $Var1
End


Edit:
The above code well return 0-2, you can use IF statements to use one of the three MousePos.
CODE
if var1 = (0=MousePos-Up) (1=MousePos-Right) (2=MousePos-Left)

Then you just have the MousePos inside each corsponding IF statement, then just have 1 Leftclick after the IF statements.

My Results running in Test Mode (My completed macro) ohmy.gif
TimeStamp: 08/10/2009 03:46:56:406 am - --------------------------------------Number of Atk_Cycles 10,000
TimeStamp: 08/10/2009 03:46:56:406 am - --------------------------------------Number of Heals 15
TimeStamp: 08/10/2009 03:46:56:406 am - --------------------------------------Number of Buffs 8
TimeStamp: 08/10/2009 03:46:56:406 am - --------------------------------------Elapse Time in MSec 218641
TimeStamp: 08/10/2009 03:46:56:406 am - --------------------------------------Elapse Time in Seconds 218.641
TimeStamp: 08/10/2009 03:46:56:406 am - -------------------------------------- *>* Random Turns *<*
TimeStamp: 08/10/2009 03:46:56:406 am - -------------------------------------- Down Right ( 3375 )
TimeStamp: 08/10/2009 03:46:56:421 am - -------------------------------------- Down Left ( 3332 )
TimeStamp: 08/10/2009 03:46:56:421 am - -------------------------------------- Mouse UP ( 3293 )
Triane
Code to randomly call a defined group of procedures:
CODE
Constants
  Var1=0
  ProcCount=0
End

Constructs
   ProcedureList = List
End

Procedure Procedure1Name
  // Presumably do something here...
End

Procedure Procedure2Name
  // Presumably do something here...
End

Procedure Procedure3Name
  // Presumably do something here...
End

ListAdd ProcedureList, Procedure1Name
ListAdd ProcedureList, Procedure2Name
ListAdd ProcedureList, Procedure3Name
ListCount ProcedureList, $ProcCount

// Mainline
Loop 20
  Compute Var1 = CEIL(RND(0)*$ProcCount)
  Call ProcedureList[$Var1]
End


I haven't debugged that, so there may be errors in it, but even as only a framework, it should give you the idea...

-Triane
Bl10
Ohh!!!! Greatt!!
Thanks Guys ^^!!!
Those are very helpful :3!


now im just need to figure out how to set hp bar than im all set,
the color thingy is so confusing.... dont get it at all ohmy.gif!
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.