sits.mac - slightly improved ts.mac

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

Moderator: MacroQuest Developers

Consilium
Contributing Member
Contributing Member
Posts: 100
Joined: Wed Oct 02, 2002 10:42 pm

Post by Consilium » Tue Sep 09, 2003 7:01 am

Slice wrote:I'm using it unfocused in EQW. Consilium, when you say everything works great, are you using an environmental container?

Slice
No... I am not using an environmental container if by that you mean a forge or oven et cetera.

EDIT: wow just realized that was like 6 days ago and that their is 2 pages of posts in between that question and this answer. Looks like you already found some workarounds for your problem.
-SH
+Student
digitalsavior.com

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

Post by pita » Tue Sep 09, 2003 5:06 pm

Felt like banging my head against something solid after I had a look at the destroy code again.

Take out the changes that I implemented a couple of posts back, reverting back to the original code. It actually doesn't work quite right. There is a possiblilty that you may destroy one of the returned items if you have its full name listed in the command line.

The fix is very simple,

old code:

Code: Select all

/if n $l0<$TotalComp {
new code:

Code: Select all

/if n $l0< $calc($TotalComp-1) {
This hasn't been extensivley tested. I only ran it for 20 combines, on an combine that had one item returned, along with the result of the combine, which was properly destroyed.

Also, there is an issue with the statistics, the /if function that checks to see if you have made the desired number of components needs to be moved in front of the loop that adds components. Otherwise it was making one more combine, after meeting your required amounts, and also not counting one of the combines.
Also, and this is just cosmetic, but I tend to be a perfectionist, I put in a check to see if I actually completed any combines, before bothering to list the statistics.


Regarding Delay:

After making the change of /call ClearCursor $FinishedProduct being moved to after :Begin, I am able to run this macro with a delay of 0, in a crowded zone, at peak times, overhead view, all particles turned off, keeping results My computer is definatately on the craptacular side.
If I destroy the results, I have to set the delay to 2.

Will keep experimenting.

Regards,

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

Post by fryfrog » Tue Sep 09, 2003 8:23 pm

pita wrote:Regarding Delay:
After making the change of /call ClearCursor $FinishedProduct being moved to after :Begin, I am able to run this macro with a delay of 0, in a crowded zone, at peak times, overhead view, all particles turned off, keeping results My computer is definatately on the craptacular side.
If I destroy the results, I have to set the delay to 2.
I am not entirely sure what you mean by the above. Do you mean remove the /call line in the following:

Code: Select all

   /call ClearCursor $FinishedProduct 
   :CountComponents
since it is here:

Code: Select all

   :Begin 
      /call ClearCursor $FinishedProduct

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

Post by pita » Wed Sep 10, 2003 4:56 am

Fryfrog,

I actually meant adding the line after begin, as was suggested in an earlier post, which helped with combines being cleared from the cursor better. After making that change, I am able to run this macro with a delay of zero, 200 combines, everything works just fine.

Code: Select all

Begin 
      /call ClearCursor $FinishedProduct 

My apologies for creating confusion. In the future I'll quote code segments, and try not to make posts, when I am already late for work :?

Regards,

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

Post by fryfrog » Wed Sep 10, 2003 6:31 am

Count me stupid, but I still don't get it :)

Could you provide a bigger code snippet to go with it?

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

Post by pita » Wed Sep 10, 2003 5:51 pm

In a previous post Kagonis said:
First, fryfrog, I like your additions, they are really usefull :)
I have one thing that should be added, that will speed up the combines (you can set the delay as low as 2), without making it forget to drop the components:

In Sub Main:
Find:

Code: Select all

   :Begin 
      /doevents
Replace with:

Code: Select all

   :Begin 
      /call ClearCursor $FinishedProduct 
      /doevents
That is all I was refering to.

Regards,

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

Post by fryfrog » Wed Sep 10, 2003 10:17 pm

OHHHH, I think I get it now. Thanks. Would you mind double checking the code at the start of the thread and making sure that what you mention was merged? I'm pretty sure I have gotten all of Kagonis's additions/fixes :)

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

Post by kagonis » Thu Sep 11, 2003 1:04 am

Some day I get really bored I'm gonna clean up the code (again), allthough, I want my argument parser working first.

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

Post by pita » Sun Sep 14, 2003 9:01 am

Everything in the beginning code looks good up to what I have seen posted. However, got a couple of hours of free time
(kids, wife, and cat were all sleeping :D), and I made a couple more changes. Feel free to implement them.

Hopefully I didn't miss any code, lots of little changes.

Added keep or destroy to the command line, so I don't have to keep opening the macro.
Syntax will now be:
/macro ts <0-X> <CombinerName> <keep|destroy> <Component1> [Component2]..... [Component10]

Changed code so it doesn't abort if you get a tell, just pauses, if you have $abt set to true.

Moved check for combine successes, so that you don't end up with an extra combine.
Made some cosmetic changes, so you don't get echos that you shouldn't see.

Regards,



old code:

Code: Select all

#define EndOnTrivial v63 
new code:

Code: Select all

#define EndOnTrivial v63
#define CombineKeep v64
old code:

Code: Select all

   /varset FinishedProduct "keep" 
new code:

Code: Select all

|   /varset FinishedProduct "keep" 
old code:

Code: Select all

/varset SkillUpCounter 0
new code:

Code: Select all

/varset SkillUpCounter 0 
/varset CombineKeep 0
old code:

Code: Select all

 
   /call ClearCursor $FinishedProduct 
   /if n $p0>0 /if n $p0<=5000 { 
      /echo Setting to $p0 successful attempts! 
      /varset DesiredSuccesses $p0 
   } else /if $p0==0 { 
      /echo Setting to unlimited attempts! 
      /varset DesiredSuccesses 0 
   } else { 
      /echo Invalid setting for # of attempts 
      /endmacro 
   } 
    
   /if "$p2"=="" { 
      /echo Syntax: /macro ts <0-X> <CombinerName> <Component> [Component]... 
      /endmacro 
   }
new code:

Code: Select all

/call ClearCursor $FinishedProduct 
   
   /if "$p2"=="destroy" {
   	/varset FinishedProduct "DESTROY"
   	/varset CombineKeep 1
     } else /if "$p2"=="keep" {
     	/varset FinishedProduct "KEEP"
     	/varset CombineKeep 1
     } 
     
   /if n "$CombineKeep"==0 {
   	/echo Syntax: /macro ts <0-X> <CombinerName> <keep|destroy> <Component> [Component]... 
	/endmacro 
   }
   /if "$p3"=="" { 
      /echo Syntax: /macro ts <0-X> <CombinerName> <keep|destroy> <Component> [Component]... 
      /endmacro 
   } 
/if n $p0>0 /if n $p0<=5000 { 
      /echo Setting to $p0 successful attempts! 
      /varset DesiredSuccesses $p0 
   } else /if $p0==0 { 
      /echo Setting to unlimited attempts! 
      /varset DesiredSuccesses 0 
   } else { 
      /echo Invalid setting for # of attempts 
      /endmacro 
   } 
old code:

Code: Select all

:CountComponents 
      /varset a(1,$TotalComp) "$p$int($calc($TotalComp+2))" 
      /varadd TotalComp 1 
      /if n $int($TotalComp)>10 { 
         /echo Syntax: /macro ts <0-X> <CombinerName>  <Component> [Component]... 
         /echo You can only add up to a total of 10 components. 
         /endmacro 
      } 
      /echo Component $int($TotalComp): $p$int($calc($TotalComp+1)) 
      /if "$p$int($calc($TotalComp+2))"~~"$" { 
         /goto :Begin 
      } else /if "$p$int($calc($TotalComp+2))"=="" { 
         /goto :Begin 
      } else { 
         /goto :CountComponents 
      } 
new code:

Code: Select all

:CountComponents 
      /varset a(1,$TotalComp) "$p$int($calc($TotalComp+3))" 
      /varadd TotalComp 1 
      /if n $int($TotalComp)>10 { 
         /echo Syntax: /macro ts <0-X> <CombinerName> <keep|destroy> <Component> [Component]... 
         /echo You can only add up to a total of 10 components. 
         /endmacro 
      } 
      /echo Component $int($TotalComp): $p$int($calc($TotalComp+2)) 
      /if "$p$int($calc($TotalComp+3))"~~"$" { 
         /goto :DestroyCheck 
      } else /if "$p$int($calc($TotalComp+3))"=="" { 
         /goto :DestroyCheck 
      } else { 
         /goto :CountComponents 
      } 
:DestroyCheck     
   /if $FinishedProduct=="DESTROY" {
   	/beep
   	/press F1
   	/echo This macro is currently set to destroy successful combines!!!!
 
old code:

Code: Select all

:Begin 
      /call ClearCursor $FinishedProduct 
      /doevents 
      /for l0 0 to $int($calc($TotalComp-1)) 
         /call AddComp "$a(1,$l0)" $l0 
      /next l0 

   :Combine 
      /doevents 
      /call DoCombine 

   :ClearCursor 
      /doevents 
      /call ClearCursor $FinishedProduct 
    
   /if "$target(name,clean)"=="$char(name)" { 
      /echo You have targeted yourself, pausing.  To resume, type /target clear or just target something else. 
      :HoldingPattern 
         /delay 2s 
      /if "$target(name,clean)"=="$char(name)" /goto :HoldingPattern 
   } 
    
   /if n $DesiredSuccesses!=0 /if n $DesiredSuccesses<=$SkillSuccessCounter { 
      /echo Created $int($DesiredSuccesses) items as requested! 
      /call EndCombines 
   } 
    
   /goto :Begin 
new code:

Code: Select all

:Begin
      /call ClearCursor $FinishedProduct 
      /doevents 
    
      /if "$target(name,clean)"=="$char(name)" { 
      	/echo Pausing!! To resume, type /target clear or target something else. 
      	:HoldingPattern 
     		/delay 2s 
      		/if "$target(name,clean)"=="$char(name)" /goto :HoldingPattern 
      } 
      /if n $DesiredSuccesses!=0 /if n $DesiredSuccesses<=$SkillSuccessCounter { 
           /echo Created $int($DesiredSuccesses) items as requested! 
           /call EndCombines 
      }
      /for l0 0 to $int($calc($TotalComp-1)) 
         /call AddComp "$a(1,$l0)" $l0 
      /next l0 

   :Combine 
      /doevents 
      /call DoCombine 

   :ClearCursor 
      /doevents 
      /call ClearCursor $FinishedProduct 
    
   }    
   /goto :Begin 
old code:

Code: Select all

Sub Event_Chat 
   /if "$abt"=="TRUE" { 
      /echo Got a tell, stopping. 
      /call EndCombines 
   } 
/return
new code:

Code: Select all

Sub Event_Chat 
   /if "$abt"=="TRUE" { 
      /echo Got a tell, pausing.
|     /beep
      /press F1
|      /call EndCombines 
   } 
/return 
This change is just cosmetic, so it doesn't dump statistics, if you never made a successful combine.
old code:

Code: Select all

Sub DisplayStats 
   /echo Combine Statistics - Successes: $int($SkillSuccessCounter), Failures: $int($SkillFailCounter), Trivial: $int($SkillTrivialCounter) 
   /varcalc TotalAttempts $SkillFailCounter + $SkillSuccessCounter 
   /varcalc SuccessRate $SkillSuccessCounter / $TotalAttempts * 100 
   /varcalc SkillUpRate $SkillUpCounter / $TotalAttempts * 100 
   /echo Successes Rate: $int($SuccessRate) % out of $int($TotalAttempts) attempts 
   /if n $SkillUpCounter>0 /echo Skill Ups: $int($SkillUpCounter) , Skill Rate: $int($SkillUpRate) % out of $int($TotalAttempts) attempts 
   /if n $SkillTrivialCounter>0 /echo THIS ITEM IS OR HAS GONE TRIVIAL! 
/return 
new code:

Code: Select all

Sub DisplayStats 
   /echo Combine Statistics - Successes: $int($SkillSuccessCounter), Failures: $int($SkillFailCounter), Trivial: $int($SkillTrivialCounter) 
   /varcalc TotalAttempts $SkillFailCounter + $SkillSuccessCounter 
   /if $TotalAttempts>0 {
   /varcalc SuccessRate $SkillSuccessCounter / $TotalAttempts * 100 
   /varcalc SkillUpRate $SkillUpCounter / $TotalAttempts * 100 
   /echo Successes Rate: $int($SuccessRate) % out of $int($TotalAttempts) attempts 
   } else {
   	/echo Unable to complete a combine.  No Stats to report
   }
   /if n $SkillUpCounter>0 /echo Skill Ups: $int($SkillUpCounter) , Skill Rate: $int($SkillUpRate) % out of $int($TotalAttempts) attempts 
   /if n $SkillTrivialCounter>0 /echo THIS ITEM IS OR HAS GONE TRIVIAL! 
/return 

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Mon Sep 15, 2003 6:47 pm

Can you post the fully working macro plz ??

I can't get it to work sins they opdatede LDoN.

|| Napolion ||

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Mon Sep 15, 2003 7:11 pm

Use the code from the front post and make sure you follow these steps:

1) Use EQW and release the mouse before you start the macro
2) Make sure you have 8 containers
3) Open all containers and inventory screen, make sure none overlap
4) Close all containers
5) Reopen all containers
6) Start your macro (You DID release the mouse didn't you?)

If you still have a problem, post exactly what is happening.

Slice

Spectre
orc pawn
orc pawn
Posts: 21
Joined: Tue Sep 02, 2003 10:31 am

Post by Spectre » Mon Sep 15, 2003 8:43 pm

I'm not having any troubles with TS macros, but we're now at the bottom of page 5, and there've been lots of changes and fixes in this thread. Just for conciseness, can someone post the complete macros with all these fixes applied?

...always looking for better ways to do things, but finding it hard to go through five pages of "change this..."...

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Mon Sep 15, 2003 9:52 pm

Fryfog has maintained the original post on page 1. He updates it with the latest changes. The first post has the correct code in it.

Slice

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

Post by fryfrog » Tue Sep 16, 2003 12:14 am

From time to time I evaluate the code posted in this thread to make sure it works and adds something that I feel I would benifit from... and I make the changes :)

The last suggested changes do add one thing I would like to fix, but I actually have no desire to specify keep/destory on cmd line due to the fact that I've never used destory :)

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

Easy way to speed up things a little bit ...

Post by MacroFiend » Tue Sep 16, 2003 2:09 am

though I'm not sure if it would drop all items (on the cursor) in to the inventory on a single command, you could replace your /click left auto's with /autoinventory. Since it is a native EQ command, you shouldn't have to worry about it being broken in a patch ... and it doesn't require the inventory window to be open.

I've converted my mash-the-skills type scripts to use that for my forager instead of clicking auto. Haven't tried it w/ a full inventory wither ... that might be interesting if it didn't drop the item if you were full but that would be too much to ask SOE for. *g*