SpellVendors.mac (20 Aug 2004)
Posted: Thu Aug 19, 2004 4:17 pm
This is a macro to create a SpellVendor.ini file containing vendor Name and Zone data, organized by Spell ID, to support SpellsToBuy.mac. It will also create a second SpellVendorList file containing vendor Name and Loc data, organized by Zone, for cross refrence. To use it simply target a spell vendor or open the merchant window and type /mac SpellVendors.
Please post your INI files in reply to this thread and I will try to compile them together as they grow.
Changes
8/20/2004
- Added a /mqlog feature to record when spells are added for a vendor.
- Moved the cleanup functions to their own sub
8/19/2004
- Added support for songs
- Corrected the (x,y) to (y,x)
Sample SpellVendors.ini
Sample SpellVendorList.ini
Please post your INI files in reply to this thread and I will try to compile them together as they grow.
Changes
8/20/2004
- Added a /mqlog feature to record when spells are added for a vendor.
- Moved the cleanup functions to their own sub
8/19/2004
- Added support for songs
- Corrected the (x,y) to (y,x)
Code: Select all
| SpellVendors.mac - 20 Aug 2004
| Will add Merchants and their zones to the specified INIFile.
| Will add Merchants with their locs, organized by Zone, to the Specified INIListFile
| Run with a spell vendor targeted or a Merchant Window open.
#define dly 100
#define INIFile SpellVendors.ini
#define INIListFile SpellVendorList.ini
Sub Main
/declare c int outer 0
/declare spellcount int outer 0
/if (!${Target.ID}) {
/if (!${Merchant.Open}) {
/echo You must target a spell vendor or open a merchant window before running this macro!
/end
} else {
/target id ${Merchant.ID}
/delay dly ${Target.ID}
}
}
/if (!${Merchant.Open}) {
/click right target
/delay dly ${Merchant.Open}
}
/if (!${Merchant.Item[Spell:].ID} && !${Merchant.Item[Song:].ID}) {
/echo Vendor has no spells or songs. Exiting.
/call Closewin
/end
}
/for c 1 to 80
/if (${Merchant.Item[${c}].Name.Find[Spell:]} || ${Merchant.Item[${c}].Name.Find[Song:]}) {
/echo Adding ${Merchant.Item[${c}].Spell} vendor: ${Target.CleanName} (${Zone})
/ini "INIFile" "${Merchant.Item[${c}].Spell.ID}" "${Target.CleanName}" "${Zone}"
/varcalc spellcount ${spellcount}+1
}
/next c
/if (${spellcount}) {
/ini "INIListFile" "${Zone}" "${Target.CleanName}" "(${Int[${Target.X}]},${Int[${Target.Y}]})"
/echo (${spellcount}) spells added for ${Target.CleanName} (${Zone}) on ${Time.Date}
/mqlog (${spellcount}) spells added for ${Target.CleanName} (${Zone})
}
/call Closewin
/endmacro
Sub CloseWin
/notify MerchantWnd MW_DoneButton leftmouseup
/delay 1
/cleanup
/returnCode: Select all
[67]
Halois Gueinds=The Bazaar
[35]
Halois Gueinds=The Bazaar
[48]
Halois Gueinds=The Bazaar
[36]
Halois Gueinds=The Bazaar
[66]
Halois Gueinds=The Bazaar
[305]
Halois Gueinds=The Bazaar
[42]
Halois Gueinds=The Bazaar
[246]
Halois Gueinds=The Bazaar
[65]
Halois Gueinds=The Bazaar
[288]
Halois Gueinds=The Bazaar
[230]
Halois Gueinds=The Bazaar
[80]
Halois Gueinds=The Bazaar
[205]
Halois Gueinds=The Bazaar
[309]
Halois Gueinds=The Bazaar
[63]
Halois Gueinds=The Bazaar
[393]
Halois Gueinds=The Bazaar
Code: Select all
[The Bazaar]
Halois Gueinds=(-734,19)