Moderator: MacroQuest Developers




Code: Select all
|
| jc.mac
| Takes you from 1 to 250 in Jewelry Crafting
| Version 2.5
| Date: September 14, 2004
|
| 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 250 in Jewelry Crafting.
| SkillMaxWanted can be change to what skill you want to stop at.
| MerchantName is which merchant you are at.
| 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 next to the merchant in order for this to work.
| Also, be sure you have a lot of money on you to go from 1 to 250.
|
| Requirements:
| You will need a Jewelry Kit (in the last slot).
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
|
#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#*#"
#include common/sell.inc
#include common/buy.inc
#include common/packs.inc
#include common/cleanpacks.inc
Sub Main
/declare OldSkill int outer
/declare SkillMaxWanted int outer
/declare PackCode string outer
/declare Component[10] string outer
/declare i int outer
/declare MerchantName string Outer
/declare BarItem item outer
/declare GemItem item outer
/declare CombItemName string outer
/declare ItemTo string outer
/declare EndingVar int outer
/declare Levelname int outer
/declare DelayMult int outer
/varset OldSkill ${Me.Skill[Jewelry Making]}
| ************************************************
| * Change these settings to what you want. *
| ************************************************
/varset SkillMaxWanted 279
/varset MerchantName "Rilwind Sitnai"
/varset DelayMult 2
| ************************************************
| ************************************************
:start
/echo Jewelry Crafting is at ${Me.Skill[Jewelry Making]}
/if (${Me.Skill[Jewelry Making]}>=${SkillMaxWanted}) {
/echo Jewelry Making is at ${SkillMaxWanted}. Quitting!
/endmacro
}
/if (${Me.Skill[Jewelry Making]}>=276 && ${Me.Skill[Jewelry Making]}<279) {
/varset BarItem "platinum bar"
/varset GemItem "ruby"
/varset CombItemName "PRV"
/varset ItemTo "Platinum Ruby Veil"
}
/if (${Me.Skill[Jewelry Making]}>=250 && ${Me.Skill[Jewelry Making]}<276) {
/varset BarItem "platinum bar"
/varset GemItem "sapphire"
/varset CombItemName "SPN"
/varset ItemTo "Sapphire Platinum Necklace"
}
/if (${Me.Skill[Jewelry Making]}>=220 && ${Me.Skill[Jewelry Making]}<250) {
/varset BarItem "platinum bar"
/varset GemItem "jade"
/varset CombItemName "PJ"
/varset ItemTo "Jaded Platinum Ring"
}
/if (${Me.Skill[Jewelry Making]}>=202 && ${Me.Skill[Jewelry Making]}<220) {
/varset BarItem "platinum bar"
/varset GemItem "lapis lazuli"
/varset CombItemName "PLL"
/varset ItemTo "Platinum Lapis Lazuli Necklace"
}
/if (${Me.Skill[Jewelry Making]}>=191 && ${Me.Skill[Jewelry Making]}<202) {
/varset BarItem "gold bar"
/varset GemItem "fire emerald"
/varset CombItemName "GFE"
/varset ItemTo "Fire Emerald Golden Bracelet"
}
/if (${Me.Skill[Jewelry Making]}>=183 && ${Me.Skill[Jewelry Making]}<191) {
/varset BarItem "gold bar"
/varset GemItem "star ruby"
/varset CombItemName "GSA"
/varset ItemTo "Golden Star Ruby Ring"
}
/if (${Me.Skill[Jewelry Making]}>=183 && ${Me.Skill[Jewelry Making]}<191) {
/varset BarItem "gold bar"
/varset GemItem "opal"
/varset CombItemName "GO"
/varset ItemTo "Golden Opal Amulet"
}
/if (${Me.Skill[Jewelry Making]}>=172 && ${Me.Skill[Jewelry Making]}<183) {
/varset BarItem "gold bar"
/varset GemItem "topaz"
/varset CombItemName "GT"
/varset ItemTo "Golden Topaz Earring"
}
/if (${Me.Skill[Jewelry Making]}>=146 && ${Me.Skill[Jewelry Making]}<172) {
/varset BarItem "gold bar"
/varset GemItem "amber"
/varset CombItemName "GA"
/varset ItemTo "Golden Amber Earring"
}
/if (${Me.Skill[Jewelry Making]}>=100 && ${Me.Skill[Jewelry Making]}<146) {
/varset BarItem "gold bar"
/varset GemItem "malachite"
/varset CombItemName "GM"
/varset ItemTo "Gold Malachite Bracelet"
}
/if (${Me.Skill[Jewelry Making]}>=76 && ${Me.Skill[Jewelry Making]}<100) {
/varset BarItem "electrum bar"
/varset GemItem "amber"
/varset CombItemName "EA"
/varset ItemTo "Electrum Amber Earring"
}
/if (${Me.Skill[Jewelry Making]}<76) {
/varset BarItem "electrum bar"
/varset GemItem "lapis lazuli"
/varset CombItemName "EL"
/varset ItemTo "Electrum Lapis Lazuli Earring"
}
/varset EndingVar 1
/target ${MerchantName}
/face
/nomodkey /click right target
/call OpenPacks
/delay ${Math.Calc[${DelayMult}*2]}
/call Sell ${BarItem}
/delay ${Math.Calc[${DelayMult}*1]}
/call Sell ${GemItem}
/delay ${Math.Calc[${DelayMult}*1]}
/call Buy ${BarItem} 20
/delay ${Math.Calc[${DelayMult}*1]}
/call Buy ${GemItem} 20
/delay ${Math.Calc[${DelayMult}*1]}
/nomodkey /notify MerchantWnd DoneButton leftmouseup
/call ClosePacks
/call OpenPacks
/delay ${Math.Calc[${DelayMult}*2]}
/call readIni "${CombItemName}"
:Begin
/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
/if (${EndingVar}==1) /goto :Begin
/delay ${Math.Calc[${DelayMult}*1]}
/call ClosePacks
/delay ${Math.Calc[${DelayMult}*1]}
/target ${MerchantName}
/face
/nomodkey /click right target
/delay ${Math.Calc[${DelayMult}*1]}
/call OpenPacks
/delay ${Math.Calc[${DelayMult}*2]}
/call Sell ${ItemTo}
/delay ${Math.Calc[${DelayMult}*1]}
/nomodkey /notify MerchantWnd DoneButton leftmouseup
/call ClosePacks
/goto :start
/return
Sub readIni(RecipeName)
/declare Container string
/echo Running ${RecipeName} recipe, which makes ${ItemTo}.
/if (${Ini["jc.ini","${RecipeName}",-1,"NOTFOUND"].Equal["NOTFOUND"]}) {
/echo Recipe ${RecipeName} not found
/endmacro
}
/varset Container ${Ini[jc.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[jc.ini,${RecipeName},Comp${Math.Calc[${i}-1].Int},NOTFOUND]}
/next i
/return
sub ClearCursor
:CursorLoop
/autoinv
| /destroy
/delay ${Math.Calc[${DelayMult}*5]}
/doevents
/if (${Cursor.ID}) /goto :CursorLoop
/return
sub DoCombine
:CombineLoop
/combine ${PackCode}
/delay ${Math.Calc[${DelayMult}*1]}
/if (${PackCode.Equal[Enviro]}) /delay 1s
/doevents
/if (${InvSlot[${PackCode}].Item.Items}) /goto :CombineLoop
/delay ${Math.Calc[${DelayMult}*2]}
/if (${Me.Skill[Jewelry Making]}>${OldSkill}) {
/echo Your Jewelry Crafting Went Up!! It's now ${Me.Skill[Jewelry Making]}!
/varset OldSkill ${Me.Skill[Jewelry Making]}
}
/return
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
}
:AddCompLoop
/nomodkey /ctrl /itemnotify ${FindItem[=${CompName}].InvSlot} leftmouseup
/if (!${Cursor.ID}) {
/delay ${Math.Calc[${DelayMult}*1]}
/goto :AddCompLoop
}
/if (${PackCode.Equal[Enviro]}) {
/nomodkey /itemnotify ${InvSlot[enviro${PackSlot}]} leftmouseup
} else {
/nomodkey /itemnotify in ${PackCode} ${PackSlot} leftmouseup
}
/return
Sub Event_CombineError
/varset EndingVar 2
/returnCode: Select all
[EL]
Cont=Jeweler's Kit
Comp0=electrum bar
Comp1=lapis lazuli
[EA]
Cont=Jeweler's Kit
Comp0=electrum bar
Comp1=amber
[GM]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=malachite
[GA]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=amber
[GT]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=topaz
[GO]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=opal
[GSR]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=star ruby
[GFE]
Cont=Jeweler's Kit
Comp0=gold bar
Comp1=fire emerald
[PLL]
Cont=Jeweler's Kit
Comp0=platinum bar
Comp1=lapis lazuli
[PJ]
Cont=Jeweler's Kit
Comp0=platinum bar
Comp1=jade
[SPN]
Cont=Jeweler's Kit
Comp0=platinum bar
Comp1=sapphire
[PRV]
Cont=Jeweler's Kit
Comp0=platinum bar
Comp1=ruby


Read the whole thread. The part that seems to have stumped you is on the first page... actually its the first post on the first page....hot_love_bot wrote:i get couldnt not open sell.inc unable to add macro line.....
Any clues?
