sits.mac - slightly improved ts.mac

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Furiousness
a lesser mummy
a lesser mummy
Posts: 62
Joined: Tue Aug 26, 2003 3:48 pm

Post by Furiousness » Sat Sep 06, 2003 3:35 pm

All wokring good for me, although sometimes need to adjust the delays, as is occasionally putting the finished product in the combine container.

But a very nice macro, thanks.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sat Sep 06, 2003 4:10 pm

Click fixed yet again, will now work with normal EQ, or with the mouse released in EQW. I also have a version that will work whether or not the mouse is captive, but it causes some unloading problems with EQW. Wouldn't affect most users, but drives the devs crazy :)
MQ2: Think of it as Evolution in action.

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Sat Sep 06, 2003 5:13 pm

Hmmm i have compiled the cvs as of to day (no new update now). Still dont click (in normal EQ, no eqw or window mode)

Is the CVS up-2-date, or is it just me, who don't get it ?

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sun Sep 07, 2003 2:57 am

I think there is up to 24 hour delay from something is added to CVS, till you can access it with anonymous access.
DKAA is often faster with his http://macroquest2.com/downloads/IRC-latest.zip source file, than SF CVS is to update :D

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Sun Sep 07, 2003 8:52 am

Must be me who is stupid.....

I have tried the CVS and download version.

I start MQ and then EQ (no windowmode at no time)

I have modified my ts.mac like kagonis wrote.
I get an if error if i don't have a bag in all the invetory slots. So i make sure i have a bag in all of them

Head on to af force open all my bags and the forge
run /macro tsenc 0 "enviro" "#small brick" "#coldain velium" "file"

Macro runs, like i shall but don't click on anything.

The following error comes everytime it "clicks" (i dont) combine. "Couldn't find the comparision operator in 'nullo'"

I tried the default UI as well. Tried on 2 diffentent PCs, same result.......

Anyone have an idea what im doing wrong here ?

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Sun Sep 07, 2003 9:52 am

I had the same problem also, so don't feel alone. Also, I have merged the needed changes into the script at the beginning :)

Furiousness
a lesser mummy
a lesser mummy
Posts: 62
Joined: Tue Aug 26, 2003 3:48 pm

Post by Furiousness » Sun Sep 07, 2003 5:55 pm

You are running EQW right? I had similar problems when I first tried to figure it out, I searched this site, and what do you know, it said that currently there was a bug with the click unless you had released the mouse using EQW. Loaded up EQW, and yay it all works. If you mouse is moving but not picking anything up, then that will be it. The error you mention happens when the macro is running correctly also, so its a good thing cos it means that its doing what it nearly should.....

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sun Sep 07, 2003 8:40 pm

Code: Select all

Couldn't find the comparision operator in 'nullo'
Ya, I know about that one, it seems to only come up if you are doing a combine that returns one of the ingredients (the file in your case). I havent really bothered to look at it though since I have too much on my hands at the moment, and it actually works, even though it comes with that error.

I havent tested the new click thing (that should work in regular EQ) but I know that the EQW trick works.

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Couldn't find the comparision operator in 'nullo'

Post by MacroFiend » Sun Sep 07, 2003 10:12 pm

The script error

Code: Select all

Couldn't find the comparision operator in 'nullo'
Is caused by an error in one of the PMP script variable commands. Specifically, $pack was broken such that if one of your top level items was not a container, it would delete 6 extra characters from the script line. That would cause the type of error you see if it was in an /if statement.

The $pack() variable has been fixed but hasn't made it in to the live CVS yet. There may be other $ variables that are broken if it has a NULL return.

pita
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sat Sep 06, 2003 5:09 pm

Post by pita » Mon Sep 08, 2003 4:09 am

I've been using this macro for a couple of weeks. Thanks for all the enhancements that have been posted.

One thing that kept bothering me, was the destroy feature didn't seem to work, I kept getting a varset error.

I tracked it down to a problem in the ClearCursor function loop. Seems when you have the last item on your cursor, the code is trying to assign null to the the arrary $a(1,$l0).

I am pretty sure that the error is actually happening during the check to see if the item on the cursor was one of the components used during the combine, and if it was, auto equipping it, then moving to the next item (/varadd l0 1) on the cursor. But I just began looking at MQ a couple weeks ago, and I'm still not quite able to follow the logic of what is happening with this array during the course of the macro.

Code: Select all

            /if n $l2==0 /if "$cursor(name)"~~"$l1" { 
                     /click left auto 
                     /click left auto 
                     /delay $dly 
               } else /if n $l2==1 /if "$cursor(name)"=="$l1" { 
                     /click left auto 
                     /click left auto 
                     /delay $dly 
               } 
               /if "$cursor()"!="NULL" { 
                  /if n $l0<$TotalComp { 
                     /varadd l0 1 
                     /goto :SubLoop 
                  } else { 
                     /click left destroy 
                     /delay $dly 
                  } 

Anyway, implemented a quick dirty fix.

oldcode:

Code: Select all

Sub ClearCursor 
   :Loop 
      /delay $dly 
      /if $cursor()!=NULL { 
         /if "$p0"=="DESTROY" { 
            /varset l0 0 
            :SubLoop 
               /if "$a(1,$l0)"~~"#" { 
                  /varset l1 "$right($calc($strlen("$a(1,$l0)")-1),"$a(1,$l0)")" 
                  /varset l2 0 
               } else { 
                  /varset l1 "$a(1,$l0)" 
                  /varset l2 1 
               } 
new code:

Code: Select all

sub ClearCursor 
   :Loop 
      /delay $dly 
      /if $cursor()!=NULL { 
         /if "$p0"=="DESTROY" { 
            /varset l0 0 
            :SubLoop 
		/if "$a(1,$l0)"~~"#" { 
			/varset l1 "$right($calc($strlen("$a(1,$l0)")-1),"$a(1,$l0)")" 
			/varset l2 0 
		} else /if $a(1,$l0)!= NULL {
			/varset l1 "$a(1,$l0)"
			/varset l2 1 
		} else {
			/varset l1 0
			/varset l2 1
		} 
Seems to work fine for me over a couple hundred combines. However I can't seem to run it with a delay of less than 2, even after making the changes listed previously in this topic, to improve speed. If I try to run it with a smaller delay, the macro keeps dumping the result of the combine back into the container. This doesn't happen when I have the macro set to keep. I am assuming that there is a bit more lag involved when using /click left destroy, possibly while EQ checks to see if you have fast destroy turned on. </shrug>
Also, users might want to implement a warning at the beginning of the macro, that lets you cancel out, if you have left it set to destroy.

I've been considering having the macro check for the destroy keyword at the end of the command line. Will save me from opening the macro to change it from keep to destroy, and back again.

Regards

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Mon Sep 08, 2003 5:12 am

Nope dont use EQW, cant get the damm thing to work :)
Just freezes.

So i waited to everyone said that it worked in regulary EQ, but just wanted to know if i was stupid, since it didn't for me :)

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Post by Shin Noir » Mon Sep 08, 2003 5:17 am

It's pretty common for EQW not to work on your system. Just be sure you use the latest version of EQW, and regardless hope the devs fix the latest problem with MQ mouse control.

Tammera
orc pawn
orc pawn
Posts: 12
Joined: Wed Aug 27, 2003 6:13 pm

Post by Tammera » Mon Sep 08, 2003 11:20 am

I get the same problem with it putting the final combine back in the container, and its set to keep to. Ive tried playing with the delays but its not helping so am a little unsure whether im changing the right things.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Mon Sep 08, 2003 8:22 pm

Pita..
Well, first of all I dont understand why Fryfrog altered the code and put in double /click's, I have those double clicks removed in my own macro.

No, the lowest you can go in delay with my changes is 2, before my changes it could barely run at 3 (on my system at least).

The piece of code you are referring to, is where I do a check on the items that are returned from a combine.
$l2 is a boolean (a true or false) value, that simply tells the macro wether it is looking for "similar" match or "exact" match.

The "~~" comparison operator is not an exact match, the "==" are.

As for the fix on the destroy setting, thanks a ton, I never really use the destroy setting since I merely use the macro to produce large quantities of sub combines, so I really never got around to fixing it.

About the "set to destroy" in the macro, that was something I was trying to work around, by making it possible to set -all- arguments on the commandline, rather than in the macro, or just use the macro defaults.
Again, I heve never really gotten around to making that part work, that is why I posted the code I was working on here on this thred:
http://macroquest2.com/phpBB2/viewtopic ... 0200#20200

Feel free to look at it, I'm gonna post a new thred under help about it, since the idea is reuseable for all macros that take arguments at runtime.

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Tue Sep 09, 2003 5:49 am

I think I put in the multiple clicks when I was having trouble setting things down, but I think someone (kag probably) posted a great fix to that. I'll go through and pull out my multiple /clicks and repost the code, sorry :)