Ok, anyways, I'm trying to get Zeus's Tradeskill macro ( http://macroquest2.com/phpBB2/viewtopic.php?t=2556 ) to be used to make Celestial Essence. The problem appears (to this noob at least) to be that it isn't finding the collapsbile mortar and pestle to combine 'em in. It always grabs the Scent to start off, but never drops it into the container....
Anyways, here's what I have as the modified code...
Code: Select all
|Tradeskill.mac
| by Zeus
|
#event Fail "You lacked the skills"
#event Hands "Your hands"
#event Full "There was no place to put that"
|Statistics variables
#define StartValue v21
#define EndValue v22
#define AttemptsCount v23
#define SuccessCount v24
#define FailureCount v25
#define SuccessRate v26
#define SkillUps v27
#define CombinesPerSkill v28
|Program Variables
#define DelayValue v30
#define Components v40
#define DestroyedItemsCount v41
#define SkillCap v70
#define SkillName v71
#define ContainerSlot v80
#define CombineBag v91
Sub Main
|Initialize Program variables
/varset Components 2
/varset DelayValue 5
/varset SkillName "No Skill"
/varset SkillCap 212
/varset CombineBag "Collapsible Mortar and Pestle"
|Initialize Statistical variables
/varset StartValue $char(skill,"$SkillName")
/varset AttemptsCount 0
/varset SuccessCount 0
/varset FailureCount 0
/varset SuccessRate 0
/varset SkillUps 0
/varset CombinesPerSkill 0
|Set Item Names
/varset a(1,1) "The Scent of Marr"
/varset a(1,2) "Celestial Solvent"
/varset a(1,3) " "
/varset a(1,4) " "
/varset a(1,5) " "
/varset a(1,6) " "
/varset a(1,7) " "
/varset a(1,8) " "
/varset a(1,9) " "
/varset a(1,10) " "
|Set Item Quantities
/varset a(2,1) 1
/varset a(2,2) 1
/varset a(2,3) 0
/varset a(2,4) 0
/varset a(2,5) 0
/varset a(2,6) 0
/varset a(2,7) 0
/varset a(2,8) 0
/varset a(2,9) 0
/varset a(2,10) 0
|Set Items to Destroy
/varset a(3,1) " "
/varset DestroyedItemsCount 1
/sendkey down ctrl
|Turn fast item destroy on
|Clean container before starting
/call CleanContainer
:CombineLoop
|check if at skill cap
/if n $char(skill,$Skill)==$SkillCap {
/echo "Skill Maxed"
/return
}
|Set Slot to first
/varset ContainerSlot 0
|Put Components in container
/for v5 1 to $Components-1
/call GetItem "$a(1,$v5)" "$a(2,$v5)" "$CombineBag"
/doevents Hands
/if n $return==0 /call End
/next v5
|Click the Combine button
/click left $CombineBag combine
/delay 10
/varadd AttemptsCount 1
/doevents Fail
/call ClearCursor
/goto :CombineLoop
/return
|Clear enviromental container routine
Sub CleanContainer
/sendkey down shift
/for v1 0 to 9
/click left $CombineBag $v1
/delay $DelayValue
/click left auto
/next v1
/sendkey up shift
/return
Sub GetItem
/for v1 1 to $p1
/finditem "$p0"
/delay $DelayValue
/if $cursor()!=True {
/echo Out of $p0
/return 0
}
:ReClick
/click left $p2 $ContainerSlot
/delay $DelayValue
/if "$cursor(name)"=="p0" /goto :ReClick
/varadd ContainerSlot 1
/next v1
/return 10
Sub ClearCursor
|Drop everything in auto equip
:AutoDrop
/if $cursor()==True {
/for v3 1 to $DestroyedItemsCount
/if "$a(3,$v3)"=="$cursor(name)" {
/click left destroy
/goto :AutoDrop
}
/next v3
/click left auto
/delay $DelayValue
/goto :AutoDrop
}
/return
Sub End
/sendkey up ctrl
|Turn fast item destroy off
/call CleanContainer
/call Stats |Comment this line if you dont want statistics
/cleanup
/zapvars
/endmacro
/return
Sub Stats
/if n $AttemptsCount>0 {
/varset EndValue $char(skill,"$SkillName")
/varcalc SuccessCount $AttemptsCount - $FailureCount
/varcalc SuccessRate $SuccessCount/$AttemptsCount * 100
/varcalc SkillUps $EndValue - $StartValue
/if n $SkillUps>0 /varcalc CombinesPerSkill $AttemptsCount/$SkillUps
/echo $SkillName Report
/echo Skill Range: $StartValue - $EndValue, $SkillUps skill increases
/echo $AttemptsCount Attempts: $SuccessCount Success, $FailureCount Failures
/echo Sucess Rate of $SuccessRate%
/if n $SkillUps>0 /echo Average of $CombinesPerSkill Combines per skill increase
} /else {
/echo No attempts made
}
/return
Sub Event_Fail
/varadd FailureCount 1
/delay $DelayValue
/doevents flush
/return
Sub Event_Hands
/call ClearCursor
/call CleanContainer
/doevents flush
/return
Sub Event_Full
/call End
/return EDIT: Yeah yeah I'm a stupid noob who forgot to turn smilies off when posting code. Stop laughing! I caught it!
