Random Disappearance of Forge

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

python023
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Mar 27, 2004 12:26 pm

Random Disappearance of Forge

Post by python023 » Mon Apr 26, 2004 9:32 pm

When im in the middle of combining items in the forge, sometimes the forge randomly closes, and i get a set of errors:

Could not send Notification to enviro1 leftmouseup
-or-
Window 'enviro' not open
-or-
Invalid Item slot 'null'

Now i kind of understand what they mean, mostly, but i dont understand why they come up nor why the forge dissappears at random times. This is in the Experiment mode of the forge, by the way.

Here is the portion of the code that it messes up in:

Code: Select all

:MakeSBOO  


	/if (!${FindItem[Small Piece of Ore].ID}) /goto :MakeLBOO
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro2 leftmouseup

        
         /if (!${FindItem[Small Piece of Ore].ID}) {

		/itemnotify enviro2 leftmouseup
		/autoinv
		/cleanup
		/goto :MakeLBOO
	}
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro3 leftmouseup


        

         /if (!${FindItem[Small Piece of Ore].ID}) {

		/itemnotify enviro2 leftmouseup
		/autoinv
		/itemnotify enviro3 leftmouseup
		/autoinv
		/cleanup
		/goto :MakeLBOO
	}
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro4 leftmouseup

                 /if (!${FindItem[Water Flask].ID}) {

		/itemnotify enviro2 leftmouseup
		/autoinv
		/itemnotify enviro3 leftmouseup
		/autoinv
		/itemnotify enviro4 leftmouseup
		/autoinv
		/cleanup
		/goto :MainLoop
	}
	/ctrl /itemnotify ${FindItem[Water Flask].InvSlot} leftmouseup

	
        /itemnotify enviro1 leftmouseup
        /delay 8
 
        /combine enviro
        /delay 8

    | Empty cursor 
    /autoinv
	/delay 8
/goto :MakeSBOO
This creates 'Small Bricks of Ore' from 'Small Pieces of Ore.' It checks to see if there are any SPOO, and if so combines. If it runs out, it clears the forge and goes on to the next part.
Anyone have answers?
than kyou
ptyhon

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Mon Apr 26, 2004 10:31 pm

let's see what a search finds......oh.. what do you know?

http://macroquest2.com/phpBB2/viewtopic.php?t=4445

python023
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Mar 27, 2004 12:26 pm

Post by python023 » Tue Apr 27, 2004 8:08 am

Well i did use a search, but i didnt think to look 5 months back, considering the code worked fine before the April 21st patches for MQ2Data. But, i found no /click commands in that whole segment. There are /autoinv commands that run regardless of success or failure, which i wil change when i get home, but would that be the only reason its disappearing? Also, how would you convert /click left target and /click left item into the /notify commands?
thank you
python

python023
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Mar 27, 2004 12:26 pm

Post by python023 » Tue Apr 27, 2004 6:41 pm

Ok, i have it isolated to the /autoinv i believe, from the link to the other post. Is there a variable in MQ2Data that will tell me if i have something on my mouse?
Like if i have an object, or brick, or hammer on my mouse, is there a way to check for that?
thank you!

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Tue Apr 27, 2004 6:53 pm

Code: Select all

${Cursor.ID}
If there is something on your cursor you'll get it's ID. If there isn't you'll get NULL.

python023
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Mar 27, 2004 12:26 pm

Post by python023 » Tue Apr 27, 2004 7:43 pm

So i could do it like this:

Code: Select all

/if (${Cursor.ID}=='null') /goto :NextLoop

/autoinv
/goto :NextLoop
If there were nothing on the cursor, it would go to nextloop, but if there were, it would /autoinv and then goto nextloop, correct? Or am i not getting the return right with =='null'?
thank you
python

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Apr 27, 2004 7:53 pm

No. /if (${Cursor.ID}==0) /goto :NextLoop

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Tue Apr 27, 2004 8:12 pm

Code: Select all

/if (!${Cursor.ID}) {
  /echo Cursor Empty
} else {
  /echo Cursor Full
}

python023
a lesser mummy
a lesser mummy
Posts: 30
Joined: Sat Mar 27, 2004 12:26 pm

Post by python023 » Tue Apr 27, 2004 10:12 pm

hmm...I put in the new code:

Code: Select all

:MakeSBOO  


	/if (!${FindItem[Small Piece of Ore].ID}) /goto :MakeLBOO
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro2 leftmouseup

        
         /if (!${FindItem[Small Piece of Ore].ID}) {

		/itemnotify enviro2 leftmouseup
		
		/if (${Cursor.ID}) /autoinv
		/cleanup
		/goto :MakeLBOO
	}
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro3 leftmouseup


        

         /if (!${FindItem[Small Piece of Ore].ID}) {

		/itemnotify enviro2 leftmouseup
		/if (${Cursor.ID}) /autoinv
		/itemnotify enviro3 leftmouseup
		/if (${Cursor.ID}) /autoinv
		/cleanup
		/goto :MakeLBOO
	}
	/ctrl /itemnotify ${FindItem[Small Piece of Ore].InvSlot} leftmouseup

	
        /itemnotify enviro4 leftmouseup

                 /if (!${FindItem[Water Flask].ID}) {

		/itemnotify enviro2 leftmouseup
		/if (${Cursor.ID}) /autoinv
		/itemnotify enviro3 leftmouseup
		/if (${Cursor.ID}) /autoinv
		/itemnotify enviro4 leftmouseup
		/if (${Cursor.ID}) /autoinv
		/cleanup
		/goto :MainLoop
	}
	/ctrl /itemnotify ${FindItem[Water Flask].InvSlot} leftmouseup

	
        /itemnotify enviro1 leftmouseup
        /delay 8
 
        /combine enviro
        /delay 8

    | Empty cursor 
    /if (${Cursor.ID}) /autoinv
	/delay 8
/goto :MakeSBOO
But even with the new code - the /autoinv calls are adjusted, the forge still disappears after the code is complete. After I run out of Small Pieces of Ore, and it goes to the next part, the forge disppears and I have a problem. What is causing this??!!
Before the Apr 21 patch and the implementation of MQ2Data, everything worked fine, but now it is disappearing!!
pls help!
thank you
python

s16z
a ghoul
a ghoul
Posts: 97
Joined: Thu Apr 01, 2004 12:03 pm

Post by s16z » Wed Apr 28, 2004 1:04 am

Code: Select all

      /if (${Cursor.ID}) /autoinv
      [color=red]/cleanup[/color]
      /goto :MakeLBOO
From the nice documentation:

/cleanup
Closes all open windows and then opens inventory window