Hey all, I have the all purpose combine script posted on this board, and it works perfectly on my fast uber computer, but on the slower one I get a lot of lag spikes which I believe are to due the cpu / ram. Anyways these spikes seem to cause the script to act weird, like it will be pressing the combine button like 8 times, and if it doesnt combine by then it will fail, I was wondering if you could help me figure out how to edit this soo it will keep trying, OR if you can help me find a more simple combine script, I dont need all that information on how many successes, trivials, and everything, also I only plan to combine 2 different items, not more like this script claims to support. I will paste the code below.
| All Purpose Combine Macro
| /macro combine KEEP/DESTROY "Combiner" "Item 1" "Item 2" "Item 3" "Item 4" "Item 5" "Item 6" "Item 7" "Item 8" "Item 9" "Item 10"
| Example: /macro combine KEEP "Pottery Wheel" "water flask" "ceramic lining sketch" "small brick of clay"
| KEEP will put all items produced into your inventory, DESTROY will destroy the first item produced on a successful combine.
| By default the combine mac works with exact item names, you can use similar item names by prefixing the name with a #
| Example: /macro combine KEEP "Pottery Wheel" #water #ceramic #clay
|
| Using #turbo with this macro seems to break it.
| This macro will open all your bags, inventory window and an enviromental combiner if necessary, it's important they don't overlap.
#event COMBINE_AlternateProduct "You have fashioned the items together to create an alternate product."
#event COMBINE_LackedSkills "You lacked the skills to fashion the items together."
#event COMBINE_Success "You have fashioned the items together to create something new!"
#event COMBINE_Skillup "You have become better at"
#event COMBINE_Trivial "You can no longer advance your skill from making this item."
#event COMBINE_DNC "You cannot combine these items in this container type!"
#define COMBINE_InventoryButton i
#define COMBINE_FREEINVSPACE 1
Sub Main
/if "@Param0"!="DESTROY" /if "@Param0"!="KEEP" /call COMBINE_Syntax
/cleanup
/declare COMBINE_CombinerLoc global
/declare COMBINE_CombinerInvEnv global
/declare COMBINE_Combined global
/declare COMBINE_AlternateProductTotal global
/declare COMBINE_LackedSkillsTotal global
/declare COMBINE_SuccessTotal global
/declare COMBINE_CombinesTotal global
/declare COMBINE_TrivialTotal global
/declare COMBINE_SkillupTotal global
/declare COMBINE_Destroy global
/varset COMBINE_AlternateProductTotal 0
/varset COMBINE_LackedSkillsTotal 0
/varset COMBINE_SuccessTotal 0
/varset COMBINE_TrivialTotal 0
/varset COMBINE_SkillupTotal 0
/varset COMBINE_CombinesTotal 0
/varset COMBINE_Combined 0
/call COMBINE_FindCombiner "@Param1"
/if n @COMBINE_CombinerLoc<=7 /call COMBINE_OpenInv
/if n @COMBINE_CombinerLoc==8 /call COMBINE_OpenEnv
/if n @COMBINE_CombinerLoc==99 {
/echo "Cannot find container-aborting"
/endmacro
}
/call COMBINE_OpenPacks
/if "@Param0"=="DESTROY" {
/echo DESTROYING FIRST ITEM FROM A SUCCESSFUL COMBINE!!!
/varset COMBINE_Destroy 1
}
/if "@Param0"=="KEEP" /varset COMBINE_Destroy 0
:COMBINE_MakeItem
/sendkey down ctrl
/if "$cursor()"=="TRUE" /goto :COMBINE_ClearCursor
/if "@Param2"~~# {
/finditem similar "$right($calc($strlen("@Param2")-1),"@Param2")"
/goto :COMBINE_Continue
}
/finditem "@Param2"
:COMBINE_Continue
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 0
/if "@Param3"~~"Param3" /goto :COMBINE_Combine
/if "@Param3"~~# {
/finditem similar "$right($calc($strlen("@Param3")-1),"@Param3")"
/goto :COMBINE_Continue2
}
/finditem "@Param3"
:COMBINE_Continue2
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 1
/if "@Param4"~~"Param4" /goto :COMBINE_Combine
/if "@Param4"~~# {
/finditem similar "$right($calc($strlen("@Param4")-1),"@Param4")"
/goto :COMBINE_Continue3
}
/finditem "@Param4"
:COMBINE_Continue3
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 2
/if "@Param5"~~"Param5" /goto :COMBINE_Combine
/if "@Param5"~~# {
/finditem similar "$right($calc($strlen("@Param5")-1),"@Param5")"
/goto :COMBINE_Continue4
}
/finditem "@Param5"
:COMBINE_Continue4
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 3
/if "@Param6"~~"Param6" /goto :COMBINE_Combine
/if "@Param6"~~# {
/finditem similar "$right($calc($strlen("@Param6")-1),"@Param6")"
/goto :COMBINE_Continue5
}
/finditem "@Param6"
:COMBINE_Continue5
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 4
/if "@Param7"~~"Param7" /goto :COMBINE_Combine
/if "@Param7"~~# {
/finditem similar "$right($calc($strlen("@Param7")-1),"@Param7")"
/goto :COMBINE_Continue6
}
/finditem "@Param7"
:COMBINE_Continue6
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 5
/if "@Param8"~~"Param8" /goto :COMBINE_Combine
/if "@Param8"~~# {
/finditem similar "$right($calc($strlen("@Param8")-1),"@Param8")"
/goto :COMBINE_Continue7
}
/finditem "@Param8"
:COMBINE_Continue7
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 6
/if "@Param9"~~"Param9" /goto :COMBINE_Combine
/if "@Param9"~~# {
/finditem similar "$right($calc($strlen("@Param9")-1),"@Param9")"
/goto :COMBINE_Continue8
}
/finditem "@Param9"
:COMBINE_Continue8
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 7
/if "@Param10"~~"Param10" /goto :COMBINE_Combine
/if "@Param10"~~# {
/finditem similar "$right($calc($strlen("@Param10")-1),"@Param10")"
/goto :COMBINE_Continue9
}
/finditem "@Param10"
:COMBINE_Continue9
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 8
/if "@Param11"~~"Param11" /goto :COMBINE_Combine
/if "@Param11"~~# {
/finditem similar "$right($calc($strlen("@Param11")-1),"@Param11")"
/goto :COMBINE_Continue10
}
/finditem "@Param11"
:COMBINE_Continue10
/if "$find()"=="FALSE" /goto :COMBINE_Done
/click left @COMBINE_CombinerInvEnv 9
:COMBINE_Combine
/sendkey up ctrl
:COMBINE_WaitCombine
/click left @COMBINE_CombinerInvEnv combine
/doevents
/if n @COMBINE_Combined==1 /goto :COMBINE_ClearCursor
/goto :COMBINE_WaitCombine
:COMBINE_ClearCursor
/if n $freeinv(space)<COMBINE_FREEINVSPACE /if n $freeinv(space)<=0 /call COMBINE_OutofSpace
/varset COMBINE_Combined 0
/click left auto
/if "$cursor()"=="TRUE" /goto :COMBINE_ClearCursor
/goto :COMBINE_MakeItem
:COMBINE_Done
/call COMBINE_Finish
/return
Sub COMBINE_OpenInv
/varset COMBINE_CombinerInvEnv "pack @COMBINE_CombinerLoc"
/cleanup
/if "$invpanel"=="FALSE" /press COMBINE_InventoryButton
/click right inv @COMBINE_CombinerLoc
/if $pack(@COMBINE_CombinerLoc,empty)==FALSE /call COMBINE_CleanPack
/return
Sub COMBINE_OpenEnv
/cleanup
/varset COMBINE_CombinerLoc e
/varset COMBINE_CombinerInvEnv enviro
/face item
:COMBINE_WaitOpen
/click left item
/if $pack(@COMBINE_CombinerLoc,open)==NULL /goto :COMBINE_WaitOpen
/if $pack(@COMBINE_CombinerLoc,empty)==FALSE /call COMBINE_CleanPack
/return
Sub COMBINE_OpenPacks
/declare COMBINE_OpenPacksLoop local
/if "$invpanel"=="FALSE" /press COMBINE_InventoryButton
/for COMBINE_OpenPacksLoop 0 to 7
/if "$pack(@COMBINE_OpenPacksLoop,open)"=="FALSE" /click right inv @COMBINE_OpenPacksLoop
/next COMBINE_OpenPacksLoop
/return
Sub COMBINE_CleanPack
/declare COMBINE_CleanPackCombinerSlots local
/declare COMBINE_CleanPackLoop local
/varcalc COMBINE_CleanPackCombinerSlots $pack(@COMBINE_CombinerLoc,slots)-1
/sendkey down shift
/for COMBINE_CleanPackLoop 0 to @COMBINE_CleanPackCombinerSlots
/click left @COMBINE_CombinerInvEnv @COMBINE_CleanPackLoop
/click left auto
/next COMBINE_CleanPackLoop
/sendkey up shift
/if "$pack(@COMBINE_CombinerLoc,empty)"=="TRUE" /goto :COMBINE_PackClean
/echo Cannot empty combiner, free up some inventory space. Ending Macro.
/call COMBINE_Finish
/return
:COMBINE_PackClean
/return
Sub COMBINE_OutOfSpace
/echo Out of inventory space, please make space. Macro Ending
/call COMBINE_Finish
/return
Sub COMBINE_FindCombiner
/declare COMBINE_FindCombinerSearchLoop local
/varset COMBINE_CombinerLoc 99
/for COMBINE_FindCombinerSearchLoop 0 to 7
/if "$pack(@COMBINE_FindCombinerSearchLoop,combine)"=="@Param0" /varset COMBINE_CombinerLoc @COMBINE_FindCombinerSearchLoop
/next COMBINE_FindCombinerSearchLoop
/if n @COMBINE_CombinerLoc==99 {
/itemtarget @Param0
/if "$GETLASTERROR"=="ITEM_NOTFOUND" {
/echo Enviromental combiner not found. Ending macro.
/cleanup
/endmacro
}
/if n $distance(item)<=15 /varset COMBINE_CombinerLoc 8
}
/return @FIND_CombinerSlot
Sub COMBINE_Finish
/sendkey up ctrl
/call COMBINE_CleanPack
/cleanup
/echo Alternate Products: $int(@COMBINE_AlternateProductTotal) $int($calc(@COMBINE_AlternateProductTotal/@COMBINE_CombinesTotal*100))%
/echo Failures: $int(@COMBINE_LackedSkillsTotal) $int($calc(@COMBINE_LackedSkillsTotal/@COMBINE_CombinesTotal*100))%
/echo Success: $int(@COMBINE_SuccessTotal) $int($calc(@COMBINE_SuccessTotal/@COMBINE_CombinesTotal*100))%
/echo Trivial: $int(@COMBINE_TrivialTotal) $int($calc(@COMBINE_TrivialTotal/@COMBINE_CombinesTotal*100))%
/echo Skillup: $int(@COMBINE_SkillupTotal) $int($calc(@COMBINE_SkillupTotal/@COMBINE_CombinesTotal*100))%
/echo Non-Trivial: $int($calc(@COMBINE_CombinesTotal-@COMBINE_TrivialTotal-@COMBINE_LackedSkillsTotal)) $int($calc($calc(@COMBINE_CombinesTotal-@COMBINE_TrivialTotal)/@COMBINE_CombinesTotal*100))%
/echo Total Combines: $int(@COMBINE_CombinesTotal)
/endmacro
Sub Event_COMBINE_AlternateProduct
/varset COMBINE_Combined 1
/varcalc COMBINE_AlternateProductTotal @COMBINE_AlternateProductTotal+1
/varcalc COMBINE_CombinesTotal @COMBINE_CombinesTotal+1
/return
Sub Event_COMBINE_LackedSkills
/varset COMBINE_Combined 1
/varcalc COMBINE_LackedSkillsTotal @COMBINE_LackedSkillsTotal+1
/varcalc COMBINE_CombinesTotal @COMBINE_CombinesTotal+1
/return
Sub Event_COMBINE_Success
:COMBINE_SuccessCursorWait
/if $cursor()==NULL /goto :COMBINE_SuccessCursorWait
/varset COMBINE_Combined 1
/varcalc COMBINE_SuccessTotal @COMBINE_SuccessTotal+1
/varcalc COMBINE_CombinesTotal @COMBINE_CombinesTotal+1
/if n "@COMBINE_Destroy"=="1" /click left destroy
/return
Sub Event_COMBINE_Trivial
/varcalc COMBINE_TrivialTotal @COMBINE_TrivialTotal+1
/return
Sub Event_COMBINE_Skillup
/varcalc COMBINE_SkillupTotal @COMBINE_SkillupTotal+1
/return
Sub COMBINE_Syntax
/echo Error in macro parameters. Ending macro.
/echo /macro combine KEEP/DESTROY "Combiner" "Item 1" "Item 2" "Item 3" "Item 4" "Item 5" "Item 6" "Item 7" "Item 8" "Item 9" "Item 10"
/echo Example: /macro combine KEEP "Pottery Wheel" "water flask" "ceramic lining sketch" "small brick of clay"
/echo KEEP will put all items produced into your inventory, DESTROY will destroy the first item produced on a successful combine.
/echo By default the combine mac works with exact item names, you can use similar item names by prefixing the name with a #
/echo Example: /macro combine KEEP "Pottery Wheel" #water #ceramic #clay
/endmacro
Sub Event_COMBINE_DNC
/echo That recipe appears to be invalid, please check and try again.
/call COMBINE_Finish
/return


donations for this month's patches.