Tailoring
Posted: Sun Aug 22, 2004 12:22 am
This is a Tailoring macro converted from OVERRIDES awesome macros. It Buys the mask,leg, ...etc patterns and combines them with the rest of the stuff you have in your inventory. It also sells what you made when it runs out of patterns. its only from <82 to 158 atm but can easily be modified.
tailoring.ini
Code: Select all
|
| tailoring.mac
| SkillMaxWanted can be change to what skill you want to stop at.
|Based off of overrides original tradeskill macros
#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.#*#"
#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 CompA item outer
/declare CompB item outer
/declare CompC item outer
/declare CombItemName string outer
/declare ItemTo string outer
/declare EndingVar int outer
/declare Levelname int outer
/varset OldSkill ${Me.Skill[Tailoring]}
| ************************************************
| * Change these settings to what you want. *
| ************************************************
/varset SkillMaxWanted 200
/varset MerchantName "Tonlyei Lyhin"
| ************************************************
| ************************************************
:start
/echo Tailoring is at ${Me.Skill[Tailoring]}
/if (${Me.Skill[Tailoring]}>=${SkillMaxWanted}) {
/echo Tailoring is at ${SkillMaxWanted}. Quiting!
/endmacro
}
/if (${Me.Skill[Tailoring]}<82) {
/varset CompA "mask pattern"
/varset CompB "heady paeala"
/varset CompC "shade silk swatch"
/varset CombItemName "SSM"
/varset ItemTo "cured shade silk mask"
}
/if (${Me.Skill[Tailoring]}>=82 && ${Me.Skill[Tailoring]}<102) {
/varset CompA "gorget pattern"
/varset CompB "silver thread"
/varset CompC "crystalline silk swatch"
/varset CombItemName "CSM"
/varset ItemTo "Crystalline silk mantle"
}
/if (${Me.Skill[Tailoring]}>=102 && ${Me.Skill[Tailoring]}<108) {
/varset CompA "mask pattern"
/varset CompB "silver thread"
/varset CompC "crystalline silk swatch"
/varset CombItemName "CSMK"
/varset ItemTo "crystalline silk mask"
}
/if (${Me.Skill[Tailoring]}>=108 && ${Me.Skill[Tailoring]}<115) {
/varset CompA "cap pattern"
/varset CompB "silver thread"
/varset CompC "crystalline silk swatch"
/varset CombItemName "CSC"
/varset ItemTo "crystalline silk cap"
}
/if (${Me.Skill[Tailoring]}>=115 && ${Me.Skill[Tailoring]}<124) {
/varset CompA "sleeve pattern"
/varset CompB "silver thread"
/varset CompC "crystalline silk swatch"
/varset CombItemName "CSS"
/varset ItemTo "crystalline silk sleeves"
}
/if (${Me.Skill[Tailoring]}>=124 && ${Me.Skill[Tailoring]}<131) {
/varset CompA "tunic pattern"
/varset CompB "silver thread"
/varset CompC "crystalline silk swatch"
/varset CombItemName "CST"
/varset ItemTo "crystalline silk shirt"
}
/if (${Me.Skill[Tailoring]}>=131 && ${Me.Skill[Tailoring]}<135) {
/varset CompA "mask pattern"
/varset CompB "heady kiola"
/varset CompC "silk swatch"
/varset CompD "vial of viscous mana"
/varset CombItemName "WM"
/varset ItemTo "Wu's fighting mask"
}
/if (${Me.Skill[Tailoring]}>=135 && ${Me.Skill[Tailoring]}<142) {
/varset CompA "cap pattern"
/varset CompB "heady kiola"
/varset CompC "silk swatch"
/varset CompD "vial of viscous mana"
/varset CombItemName "WC"
/varset ItemTo "Wu's fighting cap"
}
/if (${Me.Skill[Tailoring]}>=142 && ${Me.Skill[Tailoring]}<144) {
/varset CompA "shoulder pattern"
/varset CompB "heady kiola"
/varset CompC "silk swatch"
/varset CompD "vial of viscous mana"
/varset CombItemName "WS"
/varset ItemTo "Wu's fighting mantle"
}
/if (${Me.Skill[Tailoring]}>=144 && ${Me.Skill[Tailoring]}<158) {
/varset CompA "tunic pattern"
/varset CompB "heady kiola"
/varset CompC "silk swatch"
/varset CompD "vial of viscous mana"
/varset CombItemName "WT"
/varset ItemTo "Wu's fighting shirt"
}
/varset EndingVar 1
/target ${MerchantName}
/face
/nomodkey /click right target
/call OpenPacks
/delay 2s
/call Buy ${CompA} 20
/delay 1s
/nomodkey /notify MerchantWnd DoneButton leftmouseup
/call ClosePacks
/call OpenPacks
/delay 2s
/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 1s
/call ClosePacks
/delay 1s
/target ${MerchantName}
/face
/nomodkey /click right target
/delay 1s
/call OpenPacks
/delay 2s
/call Sell ${ItemTo}
/delay 1s
/nomodkey /notify MerchantWnd DoneButton leftmouseup
/call ClosePacks
/goto :start
/return
Sub readIni(RecipeName)
/declare Container string
/echo Running ${RecipeName} recipe
/if (${Ini["tailoring.ini","${RecipeName}",-1,"NOTFOUND"].Equal["NOTFOUND"]}) {
/echo Recipe ${RecipeName} not found
/endmacro
}
/varset Container ${Ini[tailoring.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[tailoring.ini,${RecipeName},Comp${Math.Calc[${i}-1].Int},NOTFOUND]}
/next i
/return
sub ClearCursor
:Loop
/if (!${Cursor.ID}) /return
/autoinv
| /destroy
/delay 5
/doevents
/goto :Loop
/return
sub DoCombine
:Loop
/combine ${PackCode}
/delay 1s
/if (${PackCode.Equal[Enviro]}) /delay 1s
/doevents
/if (${InvSlot[${PackCode}].Item.Items}) /goto :Loop
/delay 5
/if (${Me.Skill[Tailoring]}>${OldSkill}) {
/echo Your Tailoring Went Up!! It's now ${Me.Skill[Tailoring]}!
/varset OldSkill ${Me.Skill[Tailoring]}
}
/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
}
:Loop
/nomodkey /ctrl /itemnotify ${FindItem[=${CompName}].InvSlot} leftmouseup
/if (!${Cursor.ID}) {
/delay 1
/goto :Loop
}
/if (${PackCode.Equal[Enviro]}) {
/nomodkey /itemnotify ${InvSlot[enviro${PackSlot}]} leftmouseup
} else {
/nomodkey /itemnotify in ${PackCode} ${PackSlot} leftmouseup
}
/return
Sub Event_CombineError
/varset EndingVar 2
/return tailoring.ini
Code: Select all
[SSM]
Cont=Planar sewing kit
Comp0=Mask pattern
Comp1=heady paeala
Comp2=shade silk swatch
[CSM]
Cont=Planar Sewing Kit
Comp0=crystalline silk swatch
Comp1=silver thread
Comp2=gorget pattern
[BC]
Cont=Enviro
Comp0=cloak sectional mold
Comp1=sheet metal
Comp2=sheet metal
Comp3=water flask
[EV]
Cont=Enviro
Comp0=coldain velium temper
Comp1=small piece of velium
Comp2=small piece of velium
Comp3=spell: enchant velium
[CSMK]
cont=Planar sewing kit
comp0=mask pattern
comp1=silver thread
comp2=crystalline silk swatch
[CSC]
cont=Planar sewing kit
comp0=cap pattern
comp1=silver thread
comp2=crystalline silk swatch
[CSS]
cont=Planar sewing kit
comp0=sleeve pattern
comp1=silver thread
comp2=crystalline silk swatch
comp3=crystalline silk swatch
[CST]
cont=Planar sewing kit
comp0=tunic pattern
comp1=silver thread
comp2=crystalline silk swatch
comp3=crystalline silk swatch
comp4=crystalline silk swatch
[WM]
cont=Planar sewing kit
comp0=mask pattern
comp1=heady kiola
comp2= silk swatch
comp3=vial of viscous mana
comp4=heady kiola
comp5=heady kiola
comp6=heady kiola
[WS]
cont=Planar sewing kit
comp0=shoulder pattern
comp1=heady kiola
comp2= silk swatch
comp3=vial of viscous mana
comp4=heady kiola
comp5=heady kiola
comp6=heady kiola
[WT]
cont=Planar sewing kit
comp0=tunic pattern
comp1=heady kiola
comp2= silk swatch
comp3=vial of viscous mana
comp4=heady kiola
comp5=heady kiola
comp6=heady kiola
comp7=silk swatch
comp8=silk swatch