|
| pottery.mac
| Takes you from 1 to 188 in pottery
| Version 2.4
| Date: September 14, 2004
|
|
| 12/28/05: ADDED Salvage event
|
| 12/23/05: Put Delays back in .. some folks having issues with out them
|
| 12/18/05: by Army Soldier
| Removed Delay variable and made it hard #'s
| Fixed pottery wheel targeting/ opening issue
| Removed selling of reusable components
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2/
|
| Before are the settings you need to change for you.
| This Macro can take you up to 188 in pottery.
| SkillMaxWanted can be change to what skill you want to stop at.
| MerchantNameA is which merchant has the water flask.
| MerchantNameB is which merchant has the firing sheets, sketchs, clay and brew.
| The DoKiln can be set to 1 or 0, if it is in 1 it will actually make the final
| item in the Kiln. This will save you on money, but take more time to skill up.
| Setting it to 0 will skip the Kiln.
| You will need to change the DelayMult to higher if you are laggy, this
| number will be multiplied to the default delay.
|
| This Macro works best in the Abysmal Sea since all the components are there.
| You WILL need to be in front of Yoen Ormard (near the alchemy guys) for this macro to work.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| This macro may not work any other place then the Abysmal Sea.
|
#event CombineError "#*#There was no place to put that#*#"
#event CombineError "#*#You cannot combine these items in this container type!#*#"
#event CombineError "#*#did not accept these items#*#"
#event ContUsed "#*#Someone else is using that. Try again later.#*#"
#Event Salvage "You failed the combine, but you managed to recover #*#"
#include common/sell.inc
#include common/buy.inc
#include common/packs.inc
#include common/cleanpacks.inc
Sub Main
/declare OldSkill int outer
/declare UsingCont int outer
/declare DoKiln int outer
/declare SkillMaxWanted int outer
/declare PackCode string outer
/declare Component[10] string outer
/declare i int outer
/declare MerchantNameA string Outer
/declare MerchantNameB string Outer
/declare WFlask item outer
/declare CBrew item outer
/declare BClay item outer
/declare VialT item outer
/declare QSheet item outer
/declare SubComp item outer
/declare CombItemA string outer
/declare CombItemB string outer
/declare ItemTo string outer
/declare EndingVar int outer
/declare Levelname int outer
/declare DelayMult int outer
/varset OldSkill ${Me.Skill[Pottery]}
/declare Location int inner
/call ReadINIA pottery.ini "Abysmal Sea"
/if (!${Defined[LocArray]}) {
/echo No Loc Array Created...
/endmacro
}
| ************************************************
| * Change these settings to what you want. *
| ************************************************
/varset MerchantNameA "Yoen Ormard"
/varset MerchantNameB "Malkidiv"
/varset SkillMaxWanted 188
/varset DoKiln 1
/varset DelayMult 1
/echo CENTER your MOUSE ... now pls
/delay ${Math.Calc[${DelayMult}*2]}s
/beep
/delay ${Math.Calc[${DelayMult}*2]}s
/beep
/delay ${Math.Calc[${DelayMult}*2]}s
| ************************************************
| ************************************************
:start
/varset UsingCont 0
/echo Pottery is at ${Me.Skill[Pottery]}
/if (${Me.Skill[Pottery]}>=${SkillMaxWanted}) {
/echo Pottery is at ${SkillMaxWanted}. Quiting!
/endmacro
}
/if (${Me.Skill[Pottery]}<148) {
/varset WFlask "water flask"
/varset CBrew "crows special brew"
/varset BClay "small block of clay"
/varset VialT "vial sketch"
/varset QSheet "high quality firing sheet"
/varset CombItemA "PVA"
/varset CombItemB "PVB"
/varset SubComp "Unfired Poison Vial"
/varset ItemTo "Poison Vial"
}
/if (${Me.Skill[Pottery]}>=148 && ${Me.Skill[Pottery]}<168) {
/varset WFlask "water flask"
/varset CBrew "crows special brew"
/varset BClay "small block of clay"
/varset VialT "lined vial sketch"
/varset QSheet "high quality firing sheet"
/varset CombItemA "LPVA"
/varset CombItemB "LPVB"
/varset SubComp "Unfired Lined Poison Vial"
/varset ItemTo "Lined Poison Vial"
}
/if (${Me.Skill[Pottery]}>=168 && ${Me.Skill[Pottery]}<=188) {
/varset WFlask "water flask"
/varset CBrew "crows special brew"
/varset BClay "small block of clay"
/varset VialT "sealed vial sketch"
/varset QSheet "high quality firing sheet"
/varset CombItemA "SPVA"
/varset CombItemB "SPVB"
/varset SubComp "Unfired Sealed Poison Vial"
/varset ItemTo "Sealed Poison Vial"
}
/varset EndingVar 1
/delay ${Math.Calc[${DelayMult}*1]}s
/target ${MerchantNameA}
/face
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click right target
/delay ${Math.Calc[${DelayMult}*1]}s
/call OpenPacks
/call Sell ${ItemTo}
/delay ${Math.Calc[${DelayMult}*1]}s
/call Sell ${CBrew}
/delay ${Math.Calc[${DelayMult}*1]}s
/call Sell ${VialT}
/delay ${Math.Calc[${DelayMult}*1]}s
/call Buy ${WFlask} 30
/delay ${Math.Calc[${DelayMult}*1]}s
/call ClosePacks
/delay ${Math.Calc[${DelayMult}*2]}s
/keypress esc
/keypress esc
/look
/call GoToMerchantB
/delay ${Math.Calc[${DelayMult}*2]}s
/target ${MerchantNameB}
/face
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click right target
/delay ${Math.Calc[${DelayMult}*1]}s
/call Buy ${CBrew} 20
/delay ${Math.Calc[${DelayMult}*1]}s
/call Buy ${BClay} 20
/delay ${Math.Calc[${DelayMult}*1]}s
/call Buy ${VialT} 20
/delay ${Math.Calc[${DelayMult}*1]}s
/if (${DoKiln}==1) /call Buy ${QSheet} 20
/delay ${Math.Calc[${DelayMult}*1]}s
/keypress esc
/delay ${Math.Calc[${DelayMult}*2]}s
/itemtarget "Pottery Wheel"
:PullMoveLoopa
/if (${Me.State.Equal[SIT]}) /stand
/face loc -259.18, 193.50
/if (${Math.Distance[-259.18, 193.50]}>2) /nomodkey /keypress forward hold
/if (${Math.Distance[-259.18, 193.50]}<=2) {
/nomodkey /keypress forward
/goto :Wheel
}
/goto :PullMoveLoopa
:Wheel
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click left item
/click left item
/delay ${Math.Calc[${DelayMult}*2]}s
/doevents
/delay ${Math.Calc[${DelayMult}*1]}s
/call OpenPacks
/delay ${Math.Calc[${DelayMult}*1]}s
/call readIni "${CombItemA}"
:BeginA
/if (${EndingVar}==1) /call ClearCursor
/for i 1 to 10
/if (${EndingVar}==1) /call AddComp "${Component[${i}]}" ${i}
/next i
/if (${EndingVar}==1) /call DoCombine
/doevents
/if (${EndingVar}==1) /goto :BeginA
/delay ${Math.Calc[${DelayMult}*1]}s
/call ClosePacks
/nomodkey /keypress esc
/if (${DoKiln}==1) {
/varset UsingCont 1
/call GoToKiln
/delay ${Math.Calc[${DelayMult}*1]}s
/look
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click left item
/delay ${Math.Calc[${DelayMult}*2]}s
/doevents
/delay ${Math.Calc[${DelayMult}*1]}s
/call OpenPacks
/delay ${Math.Calc[${DelayMult}*2]}s
/varset EndingVar 1
/call readIni "${CombItemB}"
:BeginB
/if (${EndingVar}==1) /call ClearCursor
/for i 1 to 10
/if (${EndingVar}==1) /call AddComp "${Component[${i}]}" ${i}
/next i
/if (${EndingVar}==1) /call DoCombine
/doevents
/if (${EndingVar}==1) /goto :BeginB
/delay ${Math.Calc[${DelayMult}*1]}s
/call ClosePacks
/nomodkey /keypress esc
}
/call GoToMerchantA
/delay ${Math.Calc[${DelayMult}*1]}s
/target ${MerchantNameA}
/face
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click right target
/delay ${Math.Calc[${DelayMult}*1]}s
/call OpenPacks
/call Sell ${ItemTo}
/delay ${Math.Calc[${DelayMult}*1]}s
/call Sell ${CBrew}
/delay ${Math.Calc[${DelayMult}*1]}s
/call Sell ${VialT}
/delay ${Math.Calc[${DelayMult}*1]}s
/call ClosePacks
/keypress esc
/keypress esc
/delay ${Math.Calc[${DelayMult}*2]}s
/goto :start
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Read InI
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub readIni(RecipeName)
/declare Container string
/echo Running ${RecipeName} recipe
/if (${Ini["pottery.ini","${RecipeName}",-1,"NOTFOUND"].Equal["NOTFOUND"]}) {
/echo Recipe ${RecipeName} not found
/endmacro
}
/varset Container ${Ini[pottery.ini,${RecipeName},Cont,Enviro]}
/if (${Container.Equal[Enviro]}) {
/varset PackCode Enviro
} else {
/varset PackCode ${FindItem[=${Container}].InvSlot}
/if (${PackCode.Equal[NULL]}) {
/echo Could not find container ${Container}
/varset EndingVar 2
/return
}
| pack1 = 22, ... , pack8 = 29
/varset PackCode pack${Math.Calc[${PackCode}-21].Int}
}
/call cleanPack "${Container}"
/for i 1 to 10
/varset Component[${i}] ${Ini[pottery.ini,${RecipeName},Comp${Math.Calc[${i}-1].Int},NOTFOUND]}
/next i
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Clear Cursor
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub ClearCursor
:Loop
/if (!${Cursor.ID}) /return
/if (${DoKiln}==1) {
/autoinv
} else {
/destroy
}
/delay ${Math.Calc[${DelayMult}*2]}s
/doevents
/goto :Loop
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub DO the Combine
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub DoCombine
:Loop
/combine ${PackCode}
/delay ${Math.Calc[${DelayMult}*1]}s
/if (${PackCode.Equal[Enviro]}) /delay ${Math.Calc[${DelayMult}*1]}s
/doevents
/if (${InvSlot[${PackCode}].Item.Items}) /goto :Loop
/delay ${Math.Calc[${DelayMult}*5]}s
/if (${Me.Skill[Pottery]}>${OldSkill}) {
/echo Your Pottery Went Up!! It's now ${Me.Skill[Pottery]}!
/varset OldSkill ${Me.Skill[Pottery]}
}
/doevents
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Add Components
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub AddComp(CompName, PackSlot)
/if (${CompName.Equal[NOTFOUND]}) /return
/if (!${FindItem[=${CompName}].ID}) {
/echo Could not find ${CompName} in inventory
/beep
/varset EndingVar 2
/return
}
:Loop
/nomodkey /ctrl /itemnotify ${FindItem[=${CompName}].InvSlot} leftmouseup
/if (!${Cursor.ID}) {
/delay ${Math.Calc[${DelayMult}*1]}s
/goto :Loop
}
/if (${PackCode.Equal[Enviro]}) {
/nomodkey /itemnotify ${InvSlot[enviro${PackSlot}]} leftmouseup
} else {
/nomodkey /itemnotify in ${PackCode} ${PackSlot} leftmouseup
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Combine Error
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_CombineError
/varset EndingVar 2
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Container is being Used
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_ContUsed
/echo Container in use. Waiting 30 seconds and trying again.
/delay 30s
/if (${UsingCont}==0) /itemtarget "Pottery Wheel"
/if (${UsingCont}==1) /itemtarget "Kiln"
/delay ${Math.Calc[${DelayMult}*1]}s
/nomodkey /click left item
/delay ${Math.Calc[${DelayMult}*2]}s
/doevents
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Salvage
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_Salvage
/call cleanPack "${Container}"
/return
Sub GoToMerchantA
/declare Location int inner
/echo Going to ${MerchantNameA}.
/if (${DoKiln}==1) {
/varset Location ${LocArray.Size}
:starta
/if (${Location}>0) {
:MoveLoopa
/if (${Location}==9) /goto :Donea
/face nolook loc ${LocArray[${Location}]}
/if (${Math.Distance[${LocArray[${Location}]}]}>4) {
/nomodkey /keypress forward hold
/face nolook loc ${LocArray[${Location}]}
/look
/if (${Location}==11) /keypress USE
}
/if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
/nomodkey /keypress forward
/goto :nexta
}
/goto :MoveLoopa
:nexta
/delay ${Math.Calc[${DelayMult}*1]}s
/varset Location ${Math.Calc[${Location}-1]}
/goto :starta
}
:Donea
/varset Location 5
:startb
/if (${Location}>0) {
:MoveLoopb
/if (${Location}==0) /goto :Doneb
/face nolook loc ${LocArray[${Location}]}
/if (${Math.Distance[${LocArray[${Location}]}]}>4) {
/nomodkey /keypress forward hold
/face nolook loc ${LocArray[${Location}]}
/look
/if (${Location}==2) /keypress USE
}
/if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
/nomodkey /keypress forward
/goto :nextb
}
/goto :MoveLoopb
:nextb
/delay ${Math.Calc[${DelayMult}*1]}s
/varset Location ${Math.Calc[${Location}-1]}
/goto :startb
}
:Doneb
} else {
/varset Location 8
:startc
/if (${Location}>0) {
:MoveLoopb
/if (${Location}==0) /goto :Donec
/face nolook loc ${LocArray[${Location}]}
/if (${Math.Distance[${LocArray[${Location}]}]}>4) {
/nomodkey /keypress forward hold
/face nolook loc ${LocArray[${Location}]}
/look
/if (${Location}==2) /keypress USE
}
/if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
/nomodkey /keypress forward
/goto :nextc
}
/goto :MoveLoopb
:nextc
/delay ${Math.Calc[${DelayMult}*1]}s
/varset Location ${Math.Calc[${Location}-1]}
/goto :startc
}
:Donec
}
/return
Sub GoToMerchantB
/declare Location int inner
/echo Going to ${MerchantNameB}.
/for Location 1 to 8
:MoveLoop
/face nolook loc ${LocArray[${Location}]}
/if (${Math.Distance[${SHArray[${Location}]}]}>4) {
/nomodkey /keypress forward hold
/face nolook loc ${LocArray[${Location}]}
/look
/if (${Location}==3) /keypress USE
}
/if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
/nomodkey /keypress forward
/goto :next
}
/goto :MoveLoop
:next
/delay ${Math.Calc[${DelayMult}*1]}s
/next Location
/return
Sub GoToKiln
/declare Location int inner
/echo Going to Kiln.
/for Location 8 to 14
:MoveLoop
/face nolook loc ${LocArray[${Location}]}
/if (${Math.Distance[${SHArray[${Location}]}]}>4) {
/nomodkey /keypress forward hold
/face nolook loc ${LocArray[${Location}]}
/look
/if (${Location}==12) /keypress USE
}
/if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
/nomodkey /keypress forward
/goto :next
}
/goto :MoveLoop
:next
/delay ${Math.Calc[${DelayMult}*1]}s
/next Location
/return
Sub ReadINIA(FileName,SectionName)
/echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
/delay ${Math.Calc[${DelayMult}*1]}s
/if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
/echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
/delay ${Math.Calc[${DelayMult}*1]}s
/return
}
/declare nValues int local 1
/declare nArray int local 0
/declare KeySet string local ${Ini[${FileName},${SectionName}]}
| ****************** Locs ****************************
:CounterLooplo
/if (${String[${Ini[${FileName},${SectionName},Loc${nValues}]}].Equal[null]}) {
/varcalc nValues ${nValues}-1
/goto :MakeArraylo
}
/varcalc nValues ${nValues}+1
/goto :CounterLooplo
:MakeArraylo
/if (!${nValues}) /return
/if (${nValues}>0) {
/echo Declaring Loc Array...
/declare LocArray[${nValues}] string outer
}
/for nArray 1 to ${nValues}
/varset LocArray[${nArray}] ${Ini[${FileName},${SectionName},Loc${nArray}]}
/next nArray
/echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
/delay ${Math.Calc[${DelayMult}*1]}s
/return