Moderator: MacroQuest Developers
any ideas?[Wed Sep 03 13:48:57 2003] [MacroQuest] Setting to unlimited attempts!
[Wed Sep 03 13:48:57 2003] Ending macro: Failed to parse /if command
[Wed Sep 03 13:48:57 2003] ts.mac@333 (CombFind): /if n $l2==1 /if "$pack($l3,name)"=="$l1" /varset v2 $l3
[Wed Sep 03 13:48:57 2003] ts.mac@122 (Main): /call CombFind "$p1"
[Wed Sep 03 13:48:57 2003] Cleared the following: Timers Vars Arrays
[Wed Sep 03 13:48:57 2003] The current macro has ended.
[Wed Sep 03 13:48:57 2003] Usage:
[Wed Sep 03 13:48:57 2003] /if <condition> <command>
[Wed Sep 03 13:48:57 2003] <condition> : (<condition> && <condition>) or [n] <a>==<b>
Code: Select all
Sub OpenEnv
/varset CombInt e
/varset CombStr enviro
/face itemCode: Select all
Sub OpenEnv
/varset CombInt e
/varset CombStr enviro
|/face itemCode: Select all
/if n $CombInt==99 {
/itemtarget $p0
/if n $ground(id)==0 /varset CombInt 99
/if n $distance(item)>20 /varset CombInt 98
/if n $ground(id)>0 /if n $distance(item)<=20 /varset CombInt 8
}Code: Select all
/if n $CombInt==99 {
/if "$l1"=="enviro" /varset CombInt 8
/if n $CombInt!=8 /itemtarget $p0
/if n $CombInt!=8 /if n $ground(id)==0 /varset CombInt 99
/if n $CombInt!=8 /if n $distance(item)>20 /varset CombInt 98
/if n $CombInt!=8 /if n $ground(id)>0 /if n $distance(item)<=20 /varset CombInt 8
}


kagonis wrote:Having less than 8 containers has no effect on this macro.
I know that envormental combiners are having issues at the moment, it can be solved rather simple with the following:
Find:Replace:Code: Select all
Sub OpenEnv /varset CombInt e /varset CombStr enviro /face itemCode: Select all
Sub OpenEnv /varset CombInt e /varset CombStr enviro |/face item
Find:Replace:Code: Select all
/if n $CombInt==99 { /itemtarget $p0 /if n $ground(id)==0 /varset CombInt 99 /if n $distance(item)>20 /varset CombInt 98 /if n $ground(id)>0 /if n $distance(item)<=20 /varset CombInt 8 }Now you simply just use "enviro" as combiner name when using forge, brew barrel etc.Code: Select all
/if n $CombInt==99 { /if "$l1"=="enviro" /varset CombInt 8 /if n $CombInt!=8 /itemtarget $p0 /if n $CombInt!=8 /if n $ground(id)==0 /varset CombInt 99 /if n $CombInt!=8 /if n $distance(item)>20 /varset CombInt 98 /if n $CombInt!=8 /if n $ground(id)>0 /if n $distance(item)<=20 /varset CombInt 8 }
Code: Select all
#define dly v0
#define abt v1
#define ShowStats v2
#define DesiredSuccesses v3
#define EndOnTrivial v4
#define FinishedProduct v5
Sub Main
|** DEFAULTS **|
/varset ShowStats 1
/varset EndOnTrivial 0
/varset dly 2
/varset abt 0
/varset FinishedProduct "keep"
/varset DesiredSuccesses 0
|** DEFAULTS **|
/if "$p0"=="" /call ExecError
/if "$p0"=="help" /call ShowHelp
/call ParseArgs "$p0"
/return
Sub ParseArgs
/if "$p0"=="" {
/echo Syntax: /call ParseArgs "space seperated string of arguments"
/endmacro
}
/call CountArgs "$p0"
/for l0 1 to $return
/varset l1 $left($instr("=","$arg($l0,"$p0")"),"$arg($l0,"$p0")")
/varset l2 $right($calc($strlen("$arg($l0,"$p0")")-$instr("=","$arg($l0,"$p0")")-1),$arg($l0,"$p0"))
/if "$l1"=="default" /goto :EndOptions
/if "$l1"=="combines" /varset DesiredSuccesses $int($l2)
/if "$l1"=="delay" /varset dly $int($l2)
/if "$l1"=="end-on-trivial" /varset EndOnTrivial $int($l2)
/if "$l1"=="abort-on-tell" /varset abt $int($l2)
/if "$l1"=="destroy" /if n $l2==1 /varset FinishedProduct "destroy"
/if "$l1"=="show-stats" /varset ShowStats $int($l2)
/varadd l0 1
/if n $l0>7 /goto :EndOptions
/next l0
:EndOptions
/return
Sub CountArgs
/if "$p0"=="" {
/echo Syntax: /call CountArgs "space seperated string of arguments"
/endmacro
}
/varset l0 1
/varset l1 1
:Loop
/if "$mid($int($l1),1,"$p0")"==" " /varadd l0 1
/varadd l1 1
/if n $l1<$strLen("$p0") /goto :Loop
/return $l0
Sub ExecError
/echo Syntax error.
/echo Type the following for more help:
/echo /macro ts "help"
/endmacro
/return
Sub ShowHelp
/echo Syntax: /macro ts <options> <CombinerName> <Component> [Component]...
/echo Example: /macro ts "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0" "Sewing Kit" "Spider Silk" "Spider Silk"
/echo -
/echo Options:
/echo --------
/echo * show-stats
/echo -- Syntax: show-stats=1|0
/echo -- Example: show-stats=0
/echo -- Shows combine statistics.
/echo -- Set to 1 for show showing stats, 0 to leave out the stats.
/echo -- Default set to 1 (show stats).
/echo -
/echo * destroy
/echo -- Syntax: destroy=1|0
/echo -- Example: destroy=1
/echo -- Tells the macro wether end-result is destroyed or kept.
/echo -- Set to 1 for destroying end-result, 1 to keep end-result.
/echo -- Default set to 0 (keep end-result).
/echo -
/echo * abort-on-tell
/echo -- Syntax: abort-on-tell=1|0
/echo -- Example: abort-on-tell=1
/echo -- Tell the macro wether it should /endmacro when recieving a tell.
/echo -- Set to 1 for ending macro on tells, 0 to ignore tells.
/echo -- Default set to 0 (ignore tells).
/echo -
/echo * end-on-trivial
/echo -- Syntax: end-on-trivial=1|0
/echo -- Example: end-on-trivial=1
/echo -- Tell the macro wether it should stop combines when recieving a trivial message.
/echo -- Set to 1 for ending macro on trivial, 0 to ignore trivial.
/echo -- Default set to 0 (ignore trivial).
/echo -
/echo * delay
/echo -- Syntax: delay=#
/echo -- Example: delay=4
/echo -- The delay between mouse commands in the macro.
/echo -- Increase this number to make the macro combine slower, but more safely. Decrease the number to combine faster, but more prone to errors.
/echo -- Default set to 2 (this is as fast as it has been tested to be able to go)
/echo -
/echo * combines
/echo -- Syntax: combine=#
/echo -- Example: combine=100
/echo -- The number of successfull combines you want made (or till no more components are available).
/echo -- Set to 0 for unlimited combines (or till no more components are available), or to the wanted amount.
/echo -- Default set to 0 (unlimited).
/echo -
/echo * default
/echo -- Syntax: default
/echo -- Tell the macro to use all default settings, any other options set will be ignored and defaults will be used.
/endmacro
/return