Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 functions, 1 macro?
#1
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
[Image: banner-grunge2.jpg]
#2
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).
#3
After you execute

mac "functionname"
mac "functionname"

, two instances of functionname must be running.
#4
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.
[Image: banner-grunge2.jpg]
#5
post them both so we can see them...
#6
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:
Code:
Copy      Help
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:

Code:
Copy      Help
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:

Code:
Copy      Help
,,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?
[Image: banner-grunge2.jpg]
#7
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?
[Image: banner-grunge2.jpg]
#8
to combine:
just stick a
Code:
Copy      Help
if(pixel(731 592)=0xFFFF64)
,key+ U; 0.1; key- U
0.5
in there.
#9
i added that in, and now when that pixel pops up, all it does is restart the macro, heres the code:
Code:
Copy      Help
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
[Image: banner-grunge2.jpg]
#10
try this
Code:
Copy      Help
,if(pixel(731 592)=0xFFFF64)
,,key+ U; 0.1; key- U
,0.5
#11
Ah thanks, that worked great!
[Image: banner-grunge2.jpg]
#12
now im having the problem with the macro skipping this part:
Code:
Copy      Help
,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?
Code:
Copy      Help
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
[Image: banner-grunge2.jpg]
#13
durrr anyone know the problem?
[Image: banner-grunge2.jpg]
#14
Code:
Copy      Help
,,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: Idea
[Image: banner-grunge2.jpg]


Forum Jump:


Users browsing this thread: 1 Guest(s)