Help section from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
OnyxSkyDV
- a lesser mummy

- Posts: 46
- Joined: Wed Sep 18, 2002 1:02 pm
Post
by OnyxSkyDV » Wed Jul 02, 2003 2:41 pm
So in an attempt to smarten my macros a bit I am trying to scan the events to determine pass or fail on my combines instead of just checking to see if I have an item on my cursor.
However.... it does not seem to be working for me. I'm sure I've screwed up the syntax somehow, but when I put in echo statements to copy the value of the pass/fail variable to the screen, it never changes from 0.
Although I trimmed out all the combine stuff, here is the relevent part of /doevents that is not working for me, can someone look through and help "unscrew" me? :)
Thanks guys!
#event CombineFail "You lacked the skills to fashion the items together."
#event CombineAlt "You have fashioned the items together to create an alternate product."
#event CombineWork "You have fashioned the items together to create something new!"
#event CombineEmpty "You must place items in this object in order to create something new."
#event CombineWrong "You cannot combine these items in this combiner type!"
#event MissingItem "Couldn't find a "
#event Skillup "You have become better at "
|Click the Combine button
/varset v65 0
/click left enviro combine
:WaitCombine
/delay 3
/doevents
/delay 3
/if $v65==1 { /goto :Enviro1Loop }
/if $v65==2 { /goto :Enviro2Loop }
/if $v65==0 { /goto :WaitCombine }
/goto :endit
Sub Event_CombineFail
/varset v65 1
/echo just did fail set
/return
Sub Event_CombineWork
/varset v65 2
/echo just did make set
/return
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Jul 02, 2003 4:51 pm
Try this... just a possibility:
Code: Select all
/if n $v65==1 { /goto :Enviro1Loop }
/if n $v65==2 { /goto :Enviro2Loop }
/if n $v65==0 { /goto :WaitCombine }
-
OnyxSkyDV
- a lesser mummy

- Posts: 46
- Joined: Wed Sep 18, 2002 1:02 pm
Post
by OnyxSkyDV » Wed Jul 02, 2003 5:07 pm
I had already tried that (sorry I did not put that in..) with the same result.

I will try again, but I think there is something else I am missing. As near as I can tell the /doevents is never triggering the sub_event to set the variable.
Thanks for the help though, I will go try that again.
OnyxSkyDV
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Wed Jul 02, 2003 5:35 pm
Try removing the delay after the click, might be that?
-
OnyxSkyDV
- a lesser mummy

- Posts: 46
- Joined: Wed Sep 18, 2002 1:02 pm
Post
by OnyxSkyDV » Wed Jul 02, 2003 5:39 pm
Interesting thought. Could it be that the delay after the combine was enough that the events had passed already by the time my /doevents line was parsed? I was not aware that it worked that way, but it's the best explaination yet. I'll give that a go and see how it works.
Thanks for the help guys!
OnyxSkyDV
-
dont_know_at_all
- Developer

- Posts: 5450
- Joined: Sun Dec 01, 2002 4:15 am
- Location: Florida, USA
-
Contact:
Post
by dont_know_at_all » Wed Jul 02, 2003 6:04 pm
Do any events work?
Events are queued btw, you can't miss them because you did call /doevents fast enough.
-
BlueSkies
- a ghoul

- Posts: 132
- Joined: Tue Oct 01, 2002 6:22 pm
Post
by BlueSkies » Wed Jul 02, 2003 6:10 pm
Events don't pass by -- they wait for a DoEvents command to be issued, and they sit in a Queue until they are.
I haven't tried testing your code yet, but I thought I'd go ahead and dispell this idea. The /delay does need to be in there for the /click to function properly, as those functions are still using DirectX instead of the non-detoured functions, and they need delays to function properly.
Live your dreams! Blue Skies everyone
-
somemage
- a lesser mummy

- Posts: 35
- Joined: Mon May 12, 2003 7:44 pm
Post
by somemage » Wed Jul 02, 2003 6:35 pm
This is weird. Try changing it to:
Code: Select all
/if n $v65==1 /goto :Enviro1Loop
/if n $v65==2 /goto :Enviro2Loop
/if n $v65==0 /goto :WaitCombine