So I wrote this probably 2 years ago. It was part of me being bored and writing another macro that would farm Luclin in Vexthal on THF by its self to get the rare items and tokens. These subs work together in looking for the items in the array and asking if your characters have them. When someone doesnt have an item it will send them to loot the item. These are kinda just ripped out of my macros so you will need to tweak them to how you want them to work.
this is to find items in your inventory and bank
This will loot Luclin taking the token and asking who needs the rare item if dropped
Tell the one who needs to loot
The one told to loot will loot
this is to find items in your inventory and bank
C++:
#event finditem "#*#> |${Me.CleanName}| whohas #1#
#event finditem "#*#(msg)] whohas #1#
sub event_finditem(junk, itemname)
/if (${FindItemCount[${itemname}]} > 0) {
/bc I have ${FindItemCount[${itemname}]} of ${FindItem[${itemname}]} on me.
}
/if (${FindItemBankCount[${itemname}]} > 0) {
/bc I have ${FindItemBankCount[${itemname}]} of ${FindItemBank[${itemname}]} in my bank.
}
/if (${FindItemBankCount[${itemname}]}==0 && ${FindItemCount[${itemname}]}==0) {
/bc I dont have ${itemname}
}
/return
This will loot Luclin taking the token and asking who needs the rare item if dropped
C++:
sub event_luclindies
/declare RareArray[4] int outer
/varset RareArray[1] 122832
/varset RareArray[2] 122833
/varset RareArray[3] 122834
/varset RareArray[4] 122835
/declare i int local
/declare x int local
/declare LootList string local
/target Luclin, the Avatar of Darkness
/delay 1s
/stick 2
/delay 5s
/loot
/delay 5s
/if (${Corpse.Open} && ${Corpse.Items}) {
/declare loottotal int local
/delay 1s
:corpseloop
/varset loottotal ${Corpse.Items}
}
/for i 1 to ${loottotal}
/for x 1 to ${RareArray.Size}
/if (!${Corpse.Open}) {
/target Luclin, the Avatar of Darkness
/delay 1s
/stick 2
/delay 5s
/loot
/delay 5s
/goto :corpseloop
}
/if (${Corpse.Item[Token of Vex Thal].InvSlot}) {
/echo Looting Token of Vex Thal YAY
/itemnotify ${Corpse.Item[Token of Vex Thal].InvSlot} Rightmouseup
}
/if (${Corpse.Item[${i}].ID}==${RareArray[${x}]}) {
/bc luclin whohas ${Corpse.Item[${i}].Name}
|This should wait till someone needs that item and send them to loot it and come back to finish loot
/delay 4s
/doevents
} else /next x
/next i
/if (${Window[LootWnd].Open}) {
/notify LootWnd LW_DoneButton leftmouseup
/return
Tell the one who needs to loot
C++:
#event lootitem "[#1#(msg)] I dont have #2#"
sub event_lootitem
/if (${Window[LootWnd].Open}) {
/notify LootWnd LW_DoneButton leftmouseup
}
/bct ${Param1} loot **${Param2}**
/doevents flush
/delay 10s
/return
The one told to loot will loot
C++:
#event Lootitem "#*# loot **#1#**"
Sub event_Lootitem
/target corpse
/delay 1s
/stick 5
/delay 3s
/loot
/delay 5s
/bc Looting ${Param1}
/if (${Corpse.Item[${Param1}].InvSlot}) {
/echo Looting ${Param1} YAY
/itemnotify ${Corpse.Item[${Param1}].InvSlot} Rightmouseup
}
/delay 5s ${Window[ConfirmationDialogBox].Open} || !${Corpse.Item[${i}].NoDrop}
/if (${Window[ConfirmationDialogBox].Open}) /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 2s
/if (${Window[LootWnd].Open}) {
/notify LootWnd LW_DoneButton leftmouseup
}
/bc Looting finished
/return

