Posts: 51
Threads: 6
Joined: Jan 2005
Is it possible to have 2 functions and 1 macro run at the same time? If it is, how would this be done? I added the 2 functiosn with the
mac "name"
mac "name"
way, and it dosnt seem to work. However when i only had the function running, it worked fine. So how do i get the 2 functions adn 1 macro to run together?
Thanks
Posts: 1,769
Threads: 410
Joined: Feb 2003
you can have the two functions run independently by merely starting them. then you can start the macro (or you can start any of them in any order). This assumes you have started them from their own interface (not calling them from a macro, which will only do them one at a time in order).
Posts: 12,092
Threads: 142
Joined: Dec 2002
After you execute
mac "functionname"
mac "functionname"
, two instances of functionname must be running.
Posts: 51
Threads: 6
Joined: Jan 2005
hmmm becuase i do that, but one of the functions dosnt seem to work with the macro. If i end macro, the function will work, however when the macro is going, the function does nothing, when its spossed to.
Posts: 1,769
Threads: 410
Joined: Feb 2003
post them both so we can see them...
Posts: 51
Threads: 6
Joined: Jan 2005
ken gray Wrote:post them both so we can see them... yeah sorry was jsut testing them on other macros to see if they work there. Right now seems its only having problems with this macro:
mac "Move_up"
3
rep 99999 ;;How many times to do script over
,
,WaitPixelColor(0 0xD6565E 68 43)
,
,key+ R; 0.1; key- R; key F8 ;; Turn right for 0.1 seconds, and press F8
,
,sel pixel(87 99) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] continue ;; If colors at the location, stop
,
,key v ;; con
,
,sel pixel(53 619) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] ;;If you see any of these colors, continue
,,key e
,,rep 9
,,,key 1
,,,key 2
,,,key 3
,key e
Then the function is:
rep
,if(pixel(731 592)=0xFFFF64)
,,key+ U; 0.1; key- U
,0.5
The only time the function will ever be activated, is when it gets to this part of the macro:
,,rep 9
,,,key 1
,,,key 2
,,,key 3
So while its pressing 1,2,3 repeatidly in the macro, the function will get activated, and move up. is it possible for it to press 1 2 3 and move up at the same time?
Posts: 51
Threads: 6
Joined: Jan 2005
I actually think it would be better jsut to add that to the macro. How do i add it in that look at a location, if the color IS there, move up one second, if its not, ignore the move up, and go to the step after that?
Posts: 1,769
Threads: 410
Joined: Feb 2003
to combine:
just stick a
if(pixel(731 592)=0xFFFF64)
,key+ U; 0.1; key- U
0.5
in there.
Posts: 51
Threads: 6
Joined: Jan 2005
i added that in, and now when that pixel pops up, all it does is restart the macro, heres the code:
3
rep 99999
,
,WaitPixelColor(0 0xD6565E 68 43)
,
,key+ R; 0.1; key- R; key F8 ;; Turn right for 0.1 seconds, and press F8
,
,sel pixel(87 99) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] continue ;; If colors at the location, stop
,
,key v ;; con
,
,sel pixel(53 619) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] ;;If you see any of these colors, continue
,,key e
,,key 3
if(pixel(731 592)=0xFFFF64)
,key+ U; 0.1; key- U
0.5
,,rep 9
,,,key 1
,,,key 2
,,,key 3
,key e
now when it gets the the part u told me to add in, what happends is, the pixel is there, the macro goes back to the begining, instead of pressing the up arrow :S
Posts: 1,769
Threads: 410
Joined: Feb 2003
try this ,if(pixel(731 592)=0xFFFF64)
,,key+ U; 0.1; key- U
,0.5
Posts: 51
Threads: 6
Joined: Jan 2005
Ah thanks, that worked great!
Posts: 51
Threads: 6
Joined: Jan 2005
now im having the problem with the macro skipping this part:
,sel pixel(53 619) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] ;;If you see any of these colors, continue
this is how my code is right now, and how do i fix that?
3
rep 99999 ;;How many times to do script over
,
,WaitPixelColor(0 0xD6565E 68 43) ;;Wait until 50% power
,
,key+ R; 0.1; key- R; key F8 ;; Turn right for 0.1 seconds, and press F8
,
,sel pixel(87 99) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] continue ;; If colors at the location, stop
,
,key v ;; con
,
,sel pixel(53 619) ;;Look at this location
,,case [0xFFBE00,0xAAFFFF,0x40FF40,0x40FFFF] ;;If you see any of these colors, continue
,,key e ;;attack mob
,,key 3
,if(pixel(731 592)=0xFFFF64) ;;Look for "Too Far Away Message"
,,key+ U; 0.1; key- U ;;If there, move forward a bit
,0.3
,,rep 9 ;;cast the following spells X times
,,,key 1
,,,key 2
,,,key 3
,key e
Posts: 51
Threads: 6
Joined: Jan 2005
durrr anyone know the problem?
Posts: 51
Threads: 6
Joined: Jan 2005
,,if(pixel(731 592)=0xFFFF64) ;;Look for "Too Far Away Message"
,,,key+ U; 0.1; key- U ;;If there, move forward a bit
,,0.3
8) :wink:
|