|---------------------------------------------------------------------------------------------------| |- AutoVendor created by Ionis ver. 3.6 |- If you have any questions or concerns please contact me on discord @ Zerxes#0809 |- For initialization use: /mac autovendor buildini |- Total items is no longer required! :) |- After initialization and ini setup, restart the macro with: /mac autovendor |---------------------------------------------------------------------------------------------------| #warning #turbo 80 Sub Main /echo Starting up \atAutoVendor \ax\agver. 3.6 \axby \arIonis |-MAIN DECLARES DO NOT TOUCH THESE-| /declare alphabet string outer A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z /declare firstLetter string outer /declare itemName string outer /declare vendorName string outer /declare specifiedVen string outer /declare totalSlots string outer 0 /declare vendorType string outer /declare char string outer /declare parcelMules string outer /declare targetMule string outer /declare itemCost float outer /declare counter int outer /declare vendorsVisited int outer 0 /declare tributeTime int outer 0 /declare guildTrib int outer 0 /declare personalTrib int outer 0 /declare whichMule int outer /declare iniChanged int outer 0 /declare itemValue int outer /declare itemQuantity int outer /declare tribValue int outer /declare totalTrib int outer /declare totalTributed int outer /declare saleTotal int outer /declare totalMoney int outer /declare totalCost int outer /declare totalBought int outer /declare totalItems int outer /declare totalSold int outer /declare totalParcel int outer /declare totalDest int outer /declare timesDest int outer 0 /declare timesBought int outer 0 /declare parcels int outer /declare fieldCleared int outer /declare looper int outer -1 /declare looperTwo int outer -1 /declare looperThree int outer -1 /declare looperFour int outer -1 |-END MAIN DECLARES-| /if (${Defined[Param1]}) { /echo \arTotal # of items is no longer required! :) /delay 10 } /call GetTotalSlots |-Call BuildINI /if (${Defined[Param0]}) { /if (${Param0.Equal[buildini]}) { /echo Building our INI... /call BuildINI /echo Finished creating INI, please edit the INI file accordingly then restart your macro without any parameters. /echo ex. /mac AutoVendor /endmac } else { /echo You have declared your parameters incorrectly. /echo Try again but do it like this: /mac autovendor buildini /endmac } } |-End Call BuildINI |-Start Main Functionality /call CheckINI /varset totalSlots ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",TotalItems]} /varset parcels ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",ParcelOn]} /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",DestroyItems]} == 1) { /echo Destroying is about to begin... /delay 20 /for looper 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for looperTwo 0 to ${totalSlots} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},2]} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /varset firstLetter ${itemName.Left[1]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Destroy]}) { /delay 10 /nomodkey /notify FindItemWnd FIW_GrabButton leftmouseup /delay 10 /nomodkey /notify FindItemWnd FIW_DestroyItem leftmouseup /delay 10 /if (${Window[ConfirmationDialogBox].Open} && ${Window[ConfirmationDialogBox].Child[CD_TextOutput].Text.Equal[Are you absolutely sure you want to destroy your ${itemName}?]}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup } else { /echo \arConfirmationDialogBox is returning a bad value! /echo Someone may be trying to do one of the following: /echo Taskadd you, invite you to raid, kick you from game, etc. /echo Figure it out and restart the macro! :) /endmac } /delay 10 /echo We destroyed\ar ${itemQuantity}\ax \at${itemName}(s)\ax! /varcalc totalDest ${itemQuantity}+${totalDest} /varcalc timesDest ${timesDest}+1 /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } else { /break } /next looperTwo } /next looper /varcalc totalSlots ${totalSlots}-${timesDest} } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",SellStuff]} == 1) { /echo Selling is about to begin... /call FindVendor /delay 20 /varset looper -1 /varset looperTwo -1 /for looper 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for looperTwo 0 to ${totalSlots} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},2]} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /varset itemValue ${Int[${Math.Calc[${FindItem[=${itemName}].Value}/1000]}]} /varset firstLetter ${itemName.Left[1]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Sell]} && ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /delay 10 /nomodkey /notify MerchantWnd MW_Sell_Button leftmouseup /delay 20 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /delay 20 } /varcalc saleTotal ${itemQuantity}*${itemValue} /echo We sold \at ${itemQuantity} ${itemName} \ax for a total of \ag ${saleTotal}pp\ax! /varcalc totalMoney ${saleTotal}+${totalMoney} /varcalc totalSold ${itemQuantity}+${totalSold} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } else { /break } /next looperTwo } /next looper } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 1) { /if (${Window[FindItemWnd].Open}) { /windowstate FindItemWnd close } /call BuyingStuff } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 2) { /if (${Window[FindItemWnd].Open}) { /windowstate FindItemWnd close } /while (${vendorsVisited} != 5) { /call BuyingStuff } /if (${Window[MerchantWnd].Open}) { /windowstate MerchantWnd close } } /if (${parcels} == 1) { /echo Pareceling is about to begin... /if (!${Window[MerchantWnd].Open}) { /call FindVendor } /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /delay 10 /varset looper -1 /varset looperTwo -1 /varset fieldCleared 0 /varset parcelMules ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",ParcelMules]} /nomodkey /notify MerchantWnd MW_MerchantSubwindows tabselect 3 /for looper 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /if (${fieldCleared} == 0) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /delay 10 /for looperFour 0 to 30 /nomodkey /keypress backspace chat /next looperFour /varset looperFour -1 /varset fieldCleared 1 } /for looperTwo 0 to ${totalSlots} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},2]} /varset firstLetter ${itemName.Left[1]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel1]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel1]}) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /if (${targetMule.Length}) { /for looperFour 0 to ${targetMule.Length} /nomodkey /keypress backspace chat /next looperFour /varset targetMule ${parcelMules.Arg[1,|]} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 } else { /varset targetMule ${parcelMules.Arg[1,|]} } /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /for looperThree 1 to ${targetMule.Length} /varset char ${targetMule.Mid[${looperThree},1]} /if (${looperThree} == ${targetMule.Length}) { /nomodkey /keypress ${char} chat /varset looperThree -1 /varset whichMule 1 /break } else { /nomodkey /keypress ${char} chat } /next looperThree /delay 10 /nomodkey /notify MerchantWnd MW_Send_Button leftmouseup /delay 10 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /varcalc totalParcel ${totalParcel}+${itemQuantity} /delay 30 /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } else { /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /delay 30 /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel2]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel2]}) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /if (${targetMule.Length}) { /for looperFour 0 to ${targetMule.Length} /nomodkey /keypress backspace chat /next looperFour /varset targetMule ${parcelMules.Arg[2,|]} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 } else { /varset targetMule ${parcelMules.Arg[2,|]} } /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /for looperThree 1 to ${targetMule.Length} /varset char ${targetMule.Mid[${looperThree},1]} /if (${looperThree} == ${targetMule.Length}) { /nomodkey /keypress ${char} chat /varset looperThree -1 /varset whichMule 2 /break } else { /nomodkey /keypress ${char} chat } /next looperThree /delay 10 /nomodkey /notify MerchantWnd MW_Send_Button leftmouseup /delay 10 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /varcalc totalParcel ${totalParcel}+${itemQuantity} /delay 30 } else { /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /delay 30 } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel3]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel3]}) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /if (${targetMule.Length}) { /for looperFour 0 to ${targetMule.Length} /nomodkey /keypress backspace chat /next looperFour /varset targetMule ${parcelMules.Arg[3,|]} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 } else { /varset targetMule ${parcelMules.Arg[3,|]} } /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /for looperThree 1 to ${targetMule.Length} /varset char ${targetMule.Mid[${looperThree},1]} /if (${looperThree} == ${targetMule.Length}) { /nomodkey /keypress ${char} chat /varset looperThree -1 /varset whichMule 3 /break } else { /nomodkey /keypress ${char} chat } /next looperThree /delay 10 /nomodkey /notify MerchantWnd MW_Send_Button leftmouseup /delay 10 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /varcalc totalParcel ${totalParcel}+${itemQuantity} /delay 30 } else { /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /delay 30 } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel4]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel4]}) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /if (${targetMule.Length}) { /for looperFour 0 to ${targetMule.Length} /nomodkey /keypress backspace chat /next looperFour /varset targetMule ${parcelMules.Arg[4,|]} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 } else { /varset targetMule ${parcelMules.Arg[4,|]} } /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /for looperThree 1 to ${targetMule.Length} /varset char ${targetMule.Mid[${looperThree},1]} /if (${looperThree} == ${targetMule.Length}) { /nomodkey /keypress ${char} chat /varset looperThree -1 /varset whichMule 4 /break } else { /nomodkey /keypress ${char} chat } /next looperThree /delay 10 /nomodkey /notify MerchantWnd MW_Send_Button leftmouseup /delay 10 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /varcalc totalParcel ${totalParcel}+${itemQuantity} /delay 30 } else { /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /delay 30 } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel5]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel5]}) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemQuantity ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},3]} /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /if (${targetMule.Length}) { /for looperFour 0 to ${targetMule.Length} /nomodkey /keypress backspace chat /next looperFour /varset targetMule ${parcelMules.Arg[5,|]} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /delay 10 } else { /varset targetMule ${parcelMules.Arg[5,|]} } /nomodkey /notify MerchantWnd MW_Send_To_Edit leftmouseup /for looperThree 1 to ${targetMule.Length} /varset char ${targetMule.Mid[${looperThree},1]} /if (${looperThree} == ${targetMule.Length}) { /nomodkey /keypress ${char} chat /varset looperThree -1 /varset whichMule 5 /break } else { /nomodkey /keypress ${char} chat } /next looperThree /delay 10 /nomodkey /notify MerchantWnd MW_Send_Button leftmouseup /delay 10 /if (${Window[QuantityWnd].Open}) { /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /varcalc totalParcel ${totalParcel}+${itemQuantity} /delay 30 } else { /echo You sent \at ${itemQuantity} ${itemName} \ax to \ar ${targetMule}\ax! /delay 30 } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel1]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel2]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel3]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel4]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Parcel5]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel1]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel2]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel3]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel4]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[BuyParcel5]}) { } else { /break } /next looperTwo } /next looper } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",Tribute]} == 1) { /echo Tributing is about to begin... /declare Bag int local -1 /declare Slots int local -1 /declare BagSlots int local -1 /declare tribItemName string local -1 /varset tributeTime 1 /if (${Window[MerchantWnd].Open}) { /windowstate MerchantWnd close } /delay 10 /call FindVendor /delay 20 /varset looper -1 /varset looperTwo -1 /for Bag 23 to 34 /nomodkey /itemnotify pack${Math.Calc[${Bag}-22].Int} rightmouseup /next Bag /if (${guildTrib} == 1) { /for looper 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for looperTwo 0 to ${totalSlots} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},2]} /varset tribValue ${FindItem[=${itemName}].Tribute} /varset firstLetter ${itemName.Left[1]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[GuildTribute]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Tribute]}) { /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for Bag 23 to 34 /varset Slots ${Me.Inventory[${Bag}].Container} /for BagSlots 1 to ${Slots} /varset tribItemName ${Me.Inventory[${Bag}].Item[${BagSlots}].Name} /if (${tribItemName.Equal[${itemName}]}) { /nomodkey /itemnotify in pack${Math.Calc[${Bag}-22].Int} ${BagSlots} leftmouseup /delay 10 /nomodkey /notify TributeMasterWnd TMW_DonateButton leftmouseup /if (${Window[FindItemWnd].Open}) { /windowstate FindItemWnd close } /delay 10 /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /delay 20 /varcalc totalTrib ${totalTrib}+${tribValue} /varcalc totalTributed ${totalTributed}+1 /echo We tributed \at${itemName}\ax for \ag${tribValue}\ax points! /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } /next BagSlots /next Bag } } else { /break } /next looperTwo } /next looper } else { /for looper 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for looperTwo 0 to ${totalSlots} /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},2]} /varset tribValue ${FindItem[=${itemName}].Tribute} /varset firstLetter ${itemName.Left[1]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[PersonalTribute]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"- ${firstLetter} -",${itemName}].Equal[Tribute]}) { /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Compare[General]} == 32) { /for Bag 23 to 34 /varset Slots ${Me.Inventory[${Bag}].Container} /for BagSlots 1 to ${Slots} /varset tribItemName ${Me.Inventory[${Bag}].Item[${BagSlots}].Name} /if (${tribItemName.Equal[${itemName}]}) { /nomodkey /itemnotify in pack${Math.Calc[${Bag}-22].Int} ${BagSlots} leftmouseup /delay 10 /nomodkey /notify TributeMasterWnd TMW_DonateButton leftmouseup /if (${Window[FindItemWnd].Open}) { /windowstate FindItemWnd close } /delay 10 /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /delay 20 /varcalc totalTrib ${totalTrib}+${tribValue} /varcalc totalTributed ${totalTributed}+1 /echo We tributed \at${itemName}\ax for \ag${tribValue}\ax points! /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} } /next BagSlots /next Bag } } else { /break } /next looperTwo } /next looper } /for Bag 23 to 34 /nomodkey /itemnotify pack${Math.Calc[${Bag}-22].Int} rightmouseup /next Bag } /if (${Window[FindItemWnd].Open}) { /windowstate FindItemWnd close } /if (${Window[MerchantWnd].Open}) { /windowstate MerchantWnd close } /if (${Window[InventoryWindow].Open}) { /windowstate InventoryWindow close } /if (${Window[TributeMasterWnd].Open}) { /windowstate TributeMasterWnd close } /echo \agWe are finished! /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",DestroyItems]} == 1) { /if (${totalDest} == 0) { /echo We had nothing to destroy, whoopee! } else { /echo We destroyed a total of \ar${totalDest}\ax item(s), how exciting! } } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",SellStuff]} == 1) { /echo We vendored \at${totalSold} \axitem(s) for a rough estimate of \ag${totalMoney}pp\ax! } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 1 || ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 2) { /echo We bought \at${totalBought} \axitem(s) for a cost of \ag${totalCost}pp\ax! } /if (${parcels} == 1) { /echo We parceled \at${totalParcel} \axitem(s)! } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",Tribute]} == 1) { /echo We tributed \at${totalTributed} \axitem(s) for a total of \ag${totalTrib} points! } |-End Main Functionality /return |-------------------------------------------------------------| | Sub BuildINI |-------------------------------------------------------------| Sub BuildINI /declare slot int local -1 /declare containers[34] string outer /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions" "Set items on the list you want to sell to Sell, not sell to Ignore. Make sure SellStuff is set to 1 (is by default) if you plan on selling stuff!" /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions2" "If you'd like to Parcel, set ParcelOn to 1, ParcelMules to your toons names and the items you want to parcel to Parcel1-5 respectively." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions3" "To destroy items, set DestroyItems to 1 and set whatever you want to get rid of to Destroy." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions4" "To summon a vendor where there would otherwise not be one, set SummonVendor to 1 (ParcelOn must be 0 for this to work)." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions5" "To buy things, set BuyStuff to 1 and items to Buy or, alternatively, BuyParcel1-5 if you're using parcels and want to parcel the things you bought." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions6" "To buy stuff from a list of up to 5 vendors, set BuyStuff to 2 and list your vendors accordingly using the BuyVendors variable." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions7" "To Tribute, turn Tribute to 1 then set items to GuildTribute, PersonalTribute and Tribute accordingly!" /if (!${Window[InventoryWindow].Open}) { /windowstate InventoryWindow open } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",ParcelOn].Length}) { /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "ParcelOn" "0" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "ParcelMules" "InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "SellStuff" "1" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "BuyStuff" "0" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "BuyVendors" "VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "DestroyItems" "0" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "SummonVendor" "0" |/ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "Tribute" "0" /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "TotalItems" ${totalSlots} } /echo Grabbing our containers... /delay 10 /for slot 23 to 34 /varset itemName ${Me.Inventory[${slot}].Name} /if (${InvSlot[${slot}].Item.Container} || ${itemName.Equal[NULL]} || ${itemName.Equal[Scuffed Weapon Crate of the Mercenary]} || ${itemName.Equal[Sensible Satchel]} || ${itemName.Equal[Dreamweave Satchel]}) { /varset containers[${slot}] ${itemName} /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Containers ======|",${itemName}].Length}) { /ini AutoVendor_${Me.CleanName}.ini "|====== Containers ======|" "${itemName}" "TRUE" } /if (${itemName.Equal[NULL]}) { /echo Slot ${slot} is NULL, Terror of Luclin must not be active. } else { /echo ${containers[${slot}]} } } else { /echo ${itemName} is not a container, skipping... } /next slot /windowstate InventoryWindow close /varset slot -1 /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /for looper 1 to 26 /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"- ${alphabet.Arg[${looper},|]} -"].Length}) { /ini AutoVendor_${Me.CleanName}.ini "- ${alphabet.Arg[${looper},|]} -" "|====================" "====================|" } /next looper /echo Grabbing our items... /delay 10 /for slot 0 to ${totalSlots} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${slot},4].Compare[General]} == 32) { /nomodkey /notify FindItemWnd FIW_ItemList listselect ${slot} /varset itemName ${Window[FindItemWnd].Child[FIW_ItemList].List[${slot},2]} /varset firstLetter ${itemName.Left[1]} /if (!${Ini[AutoVendor_${Me.CleanName}.ini,- ${firstLetter} -,${itemName}].Length}) { /if (${FindItem[${itemName}].NoDrop} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Containers ======|",${itemName}]}) { /echo ${itemName} is not valid for vendoring, skipping... } else { /echo Creating entry for ${itemName}. /ini AutoVendor_${Me.CleanName}.ini "- ${firstLetter} -" "${itemName}" "Sell" } } } /next slot /windowstate FindItemWnd close /return |-------------------------------------------------------------| | End BuildINI |-------------------------------------------------------------| |-------------------------------------------------------------| | Sub CheckINI |-------------------------------------------------------------| Sub CheckINI /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions].Length} || !${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions2].Length} || !${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions3].Length} || !${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions4].Length} || !${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions5].Length} || !${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Instructions ======|",Instructions6].Length}) { /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions" "Set items on the list you want to sell to Sell, not sell to Ignore. Make sure SellStuff is set to 1 (is by default) if you plan on selling stuff!" /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions2" "If you'd like to Parcel, set ParcelOn to 1, ParcelMules to your toons names and the items you want to parcel to Parcel1-5 respectively." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions3" "To destroy items, set DestroyItems to 1 and set whatever you want to get rid of to Destroy." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions4" "To summon a vendor where there would otherwise not be one, set SummonVendor to 1 (ParcelOn must be 0 for this to work)." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions5" "To buy things, set BuyStuff to 1 and items to Buy or, alternatively, BuyParcel1-5 if you're using parcels and want to parcel the things you bought." /ini AutoVendor_${Me.CleanName}.ini "|====== Instructions ======|" "Instructions6" "To buy stuff from a list of up to 5 vendors, set BuyStuff to 2 and list your vendors accordingly using the BuyVendors variable." } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",ParcelOn].Length}) { /echo INI is missing \atParcelOn\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "ParcelOn" "0" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",ParcelMules].Length}) { /echo INI is missing \atParcelMules\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "ParcelMules" "InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere|InsertMuleNameHere" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",SellStuff].Length}) { /echo INI is missing \atSellStuff\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "SellStuff" "1" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff].Length}) { /echo INI is missing \atBuyStuff\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "BuyStuff" "0" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyVendors].Length}) { /echo INI is missing \atBuyVendors\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "BuyVendors" "VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",DestroyItems].Length}) { /echo INI is missing \atDestroyItems\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "DestroyItems" "0" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",SummonVendor].Length}) { /echo INI is missing \atSummonVendor\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "SummonVendor" "0" /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",Tribute].Length}) { /echo INI is missing \atTribute\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "Tribute" 0 /varset iniChanged 1 } /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",TotalItems].Length}) { /echo INI is missing \atTotalItems\ax, writing variable. /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "TotalItems" ${totalSlots} /varset iniChanged 1 } /for looper 1 to 26 /if (!${Ini[AutoVendor_${Me.CleanName}.ini,"- ${alphabet.Arg[${looper},|]} -"].Length}) { /ini AutoVendor_${Me.CleanName}.ini "- ${alphabet.Arg[${looper},|]} -" "|====================" "====================|" } /next looper /if (${iniChanged} != 0) { /echo \arWe added the above variables to our INI! /echo \arIf you'd like to use them, please edit your INI and restart the macro. /for counter 0 to 4 /if (${counter} == 0) { /echo Continuing in 5... } /if (${counter} == 1) { /echo 4... } /if (${counter} == 2) { /echo 3... } /if (${counter} == 3) { /echo 2... } /if (${counter} == 4) { /echo 1... } /delay 10 /next counter } /return |-------------------------------------------------------------| | End CheckINI |-------------------------------------------------------------| |-------------------------------------------------------------| | Sub FindVendor |-------------------------------------------------------------| Sub FindVendor /declare slot int local -1 /for slot 0 to 200 /if (${tributeTime} == 1) { /if (${Zone.Name.Equal[Guild Hall]}) { /echo We are in Guild Hall, therefore we will do Guild Tribute. /varset guildTrib 1 /tar Melody the Singer of Great Deeds /echo We have found a suitable tribute master! Navigating to Melody the Singer of Great Deeds. /delay 20 /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } /break } else { /for looper 0 to 200 /varset vendorType ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},1]} /if (${vendorType.Equal[Tribute Master]} || ${vendorType.Equal[Personal Tribute Master]}) { /varset vendorName ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},2]} /delay 10 /tar ${vendorName} /echo We have found a suitable tribute master! Navigating to ${vendorName}. /delay 20 /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } /break } /next looper /break } } else { /if (${parcels} == 0 && !${Zone.Name.Equal[Guild Lobby]}) { /for looper 0 to 200 /varset vendorType ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},1]} /if (${vendorType.Equal[Parcels and General Supplies]} || ${vendorType.Equal[General Supplies]} ) { /varset vendorName ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},2]} /delay 10 /tar ${vendorName} /echo We have found a suitable vendor! Navigating to ${vendorName}. /delay 20 /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } /break } /next looper /break } /if (${parcels} == 1) { /for looper 0 to 200 /varset vendorType ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},1]} /if (${vendorType.Equal[Parcels and General Supplies]} || ${vendorType.Equal[Parcel Services]}) { /varset vendorName ${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${looper},2]} /delay 10 /tar ${vendorName} /echo We have found a suitable vendor! Navigating to ${vendorName}. /delay 20 /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } /break } /next looper /break } /if (${Zone.Name.Equal[Guild Lobby]} && ${parcels} == 0) { /tar A Disciple of Luclin /echo We have found a suitable vendor! Navigating to A Disciple of Luclin. /delay 20 /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget /break } /next slot /delay 20 /if (!${Window[MerchantWnd].Open} && !${Window[TributeMasterWnd].Open}) { /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",SummonVendor]} == 1 && ${parcels} == 0) { /echo There is no suitable vendor, attempting to summon/trade with one. /if (!${Me.AltAbilityReady[Summon Resupply Agent]} && ${Me.Buff[Summon Resupply Agent].ID}) { /tar ${Me.CleanName}`s familiar /delay 10 /nav target /while (${Navigation.Active}) { /delay 10 } /delay 20 /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } } /if (${Me.AltAbilityReady[Summon Resupply Agent]}) { /alt act 8081 /delay 20 /tar ${Me.CleanName}`s familiar /delay 10 /usetarget /if (${Window[FindLocationWnd].Open}) { /windowstate FindLocationWnd close } } /delay 20 /if (!${Window[MerchantWnd].Open}) { /echo Could not succesfully summon/trade with vendor. /echo Please relocate to a zone with a General Supplies vendor and restart the macro. /endmac } } else { /echo There was no suitable vendor for your requirements. /echo Please move to a different zone. /endmac } } } /return |-------------------------------------------------------------| | End FindVendor |-------------------------------------------------------------| |-------------------------------------------------------------| | Sub GetTotalSlots |-------------------------------------------------------------| Sub GetTotalSlots /echo Getting our total # of items... /if (!${Window[FindItemWnd].Open}) { /windowstate FindItemWnd open } /for looper 1 to 100000 /nomodkey /notify FindItemWnd FIW_ItemList listselect ${looper} /if (${Window[FindItemWnd].Child[FIW_ItemList].List[${looper},4].Length} == 0) { /break } else { /varcalc totalSlots ${totalSlots}+1 } /next looper /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",TotalItems].Length}) { /ini AutoVendor_${Me.CleanName}.ini "|====== Options ======|" "TotalItems" ${totalSlots} } /varset looper -1 /return |-------------------------------------------------------------| | End GetTotalSlots |-------------------------------------------------------------| |-------------------------------------------------------------| | Sub BuyingStuff |-------------------------------------------------------------| Sub BuyingStuff /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 1 || ${vendorsVisited} == 0) { /echo Buying is about to begin... } /if (!${Window[MerchantWnd].Open} && ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 1) { /call FindVendor } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 2) { /varset specifiedVen ${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyVendors]} /call FindSpecificVendor } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 2 && ${specifiedVen.Equal[VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere|VendorNameHere]}) { /echo \arYou're using specified vendors but haven't set any. /echo \arSet some vendors in your INI then restart the macro. /endmac } /delay 10 /varset looper -1 /varset looperTwo -1 /if (${Window[MerchantWnd].Open}) { /for looper 1 to 100000 /nomodkey /notify MerchantWnd MW_ItemList listselect ${looper} /varset itemName ${Window[MerchantWnd].Child[MW_ItemList].List[${looper},2]} /varset itemCost ${Window[MerchantWnd].Child[MW_ItemList].List[${looper},5]} /varset firstLetter ${itemName.Left[1]} /if (${Window[MerchantWnd].Child[MW_ItemList].List[${looper},2].Length} == 0) { /break } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[Buy]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel1]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel2]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel3]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel4]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel5]}) { /delay 10 /nomodkey /notify MerchantWnd MW_Buy_Button leftmouseup /delay 20 /if (${Window[QuantityWnd].Open}) { /varset itemQuantity ${Window[QuantityWnd].Child[QTYW_SliderInput].Text} /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /delay 20 } else { /varset itemQuantity 1 } /varcalc saleTotal ${itemQuantity}*${itemCost} /echo We bought \at ${itemQuantity} ${itemName} \ax for a total of \ag ${saleTotal}pp\ax! /varcalc totalCost ${saleTotal}+${totalCost} /varcalc totalBought ${itemQuantity}+${totalBought} /varcalc timesBought ${timesBought}+1 } /for looperTwo 0 to 100000 /varset itemName ${Window[MerchantWnd].Child[MW_ItemList].List[${looper},2]} /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[Buy]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel1]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel2]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel3]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel4]} || ${Ini[AutoVendor_${Me.CleanName}.ini,"|==================== ${firstLetter} ====================|",${itemName}].Equal[BuyParcel5]}) { /delay 10 /nomodkey /notify MerchantWnd MW_Buy_Button leftmouseup /delay 20 /if (${Window[QuantityWnd].Open}) { /varset itemQuantity ${Window[QuantityWnd].Child[QTYW_SliderInput].Text} /nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup /delay 20 } else { /varset itemQuantity 1 } /varcalc saleTotal ${itemQuantity}*${itemCost} /echo We bought \at ${itemQuantity} ${itemName} \ax for a total of \ag ${saleTotal}pp\ax! /varcalc totalCost ${saleTotal}+${totalCost} /varcalc totalBought ${itemQuantity}+${totalBought} /varcalc timesBought ${timesBought}+1 } else { /break } /next looperTwo /next looper } else { /echo Vendor is either not set, is mispelled or isn't in this zone, skipping... } /if (${Ini[AutoVendor_${Me.CleanName}.ini,"|====== Options ======|",BuyStuff]} == 2) { /if (${vendorsVisited} == 5) { /varcalc totalSlots ${totalSlots}+${timesBought} } } else { /varcalc totalSlots ${totalSlots}+${timesBought} } /return |-------------------------------------------------------------| |End BuyingStuff |-------------------------------------------------------------| |-------------------------------------------------------------| | Sub FindSpecificVendor |-------------------------------------------------------------| Sub FindSpecificVendor /if (${Window[MerchantWnd].Open}) { /windowstate MerchantWnd close } /if (${specifiedVen.Arg[1,|].NotEqual[VendorNameHere]} && ${specifiedVen.Arg[1,|].Length} && ${vendorsVisited} == 0) { /tar ${specifiedVen.Arg[1,|]} /delay 10 /echo Naving to our first vendor, ${specifiedVen.Arg[1,|]}. /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget } /if (${specifiedVen.Arg[2,|].NotEqual[VendorNameHere]} && ${specifiedVen.Arg[2,|].Length} && ${vendorsVisited} == 1) { /tar ${specifiedVen.Arg[2,|]} /delay 10 /echo Naving to our second vendor, ${specifiedVen.Arg[2,|]}. /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget } /if (${specifiedVen.Arg[3,|].NotEqual[VendorNameHere]} && ${specifiedVen.Arg[3,|].Length} && ${vendorsVisited} == 2) { /tar ${specifiedVen.Arg[3,|]} /delay 10 /echo Naving to our third vendor, ${specifiedVen.Arg[3,|]}. /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget } /if (${specifiedVen.Arg[4,|].NotEqual[VendorNameHere]} && ${specifiedVen.Arg[4,|].Length} && ${vendorsVisited} == 3) { /tar ${specifiedVen.Arg[4,|]} /delay 10 /echo Naving to our fourth vendor, ${specifiedVen.Arg[4,|]}. /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget } /if (${specifiedVen.Arg[5,|].NotEqual[VendorNameHere]} && ${specifiedVen.Arg[5,|].Length} && ${vendorsVisited} == 4) { /tar ${specifiedVen.Arg[5,|]} /delay 10 /echo Naving to our fifth vendor, ${specifiedVen.Arg[5,|]}. /nav target /while (${Navigation.Active}) { /delay 10 } /usetarget } /varcalc vendorsVisited ${vendorsVisited}+1 /return |-------------------------------------------------------------| | End FindSpecificVendor |-------------------------------------------------------------|