Public Macros Remote loot, tell eqbc client to loot an item
Reply
Remote loot, tell eqbc client to loot an item
Note that I play on EZServer, but this should work for any emu. Currently I don't use the mqemulator compile but this macro was written to be compatible with it, if there are issues please post here and I'll do my best to refactor where necessary.

This macro is pretty simple, it lets you tell a toon in your EQBC channel to check a specific corpse for a specific item. Generally most people use their tank as the control toon and that's the toon that does the looting. This macro is handy for when you see an item on a corpse that the tank doesn't need, but someone else in the raid does. Say you're in T4 and necro boots drop, start this macro and use it to tell the necro to loot the boots and the necro will try to do so. It's not that hard to tab between windows but it can become tedious to keep track of them, this is a simple quality of life macro to streamline the loot process for alts.

The macro watches for the trigger text and the trigger text supplies the information needed to process the logic. The syntax is as follows:

/echo rloot toonName item itemName on corpse id

The first gold colored variable is the name of the toon that will be doing the remote looting.

The second gold colored variable is the name of the item to search for, in this example I am searching the corpse for an item that contains the word citrine in it. This is a string that is used as a search parameter for the item you want...I could search for a compound name like gemstone of the ages, but considering the citrine is a unique name for an item on the loot table I just keep it simple.

The third gold colored variable is the ID of the corpse containing the item. This is up to you to parse, you can just target the corpse and /echo ${Target.ID} to get the number. Without telling the macro the correct corpse ID, it won't be able to find your item to loot.

There's a quick syntax refresher if you need, just /echo remoteloot help, and this echo tip is announced every time you start the macro.

How it works is using chat watches to trigger actions in the macro, when it sees the correct trigger text it calls the sub routines it needs to for doing the dirty work. The toon initiating the command tells the toon receiving it to start the macro too, look for the item you want and what corpse to loot to check for the item. The receiving toon moves to the corpse using the stick command, when it gets within range it opens the loot window and checks the corpse for the item. If found, it loots it and if not it tells you the problem and either way once it's done proceessing the logic it exits the macro on both toons.


Macro
More +

|==== dum_as_f for use on EZServer
|==== Be aware this uses the outdated /goto command because the MQ2 compile
|==== supported on EZServer is from mqemulator.net and lacks support for /while
|==== Tell a toon in your EQBC to loot
|==== a specific item off a specific corpse.
|==== The item is a string you supply to the
|==== character as a search parameter, the
|==== corpse is the ${Corpse.ID}
 #Event LootItem "[MQ2] rloot #1# item #2# on #3#"
 #Event ThisItem "#*# tells you, '@ item #1#'"
 #Event LootLogic "#*# tells you, '@ enter sub lootlogic'"
 #Event HelpRelayLoot "[MQ2] remoteloot help"
 
|==== Sub Main
 Sub Main
  /bc To pull up the help menu, /echo remoteloot help
  :MainLoop
   /doevents
  /goto :MainLoop
 /return
|==== End Sub Main
|==== Sub Event_LootItem
 Sub Event_LootItem(Line, Name, Item, CorpseID)
  /if (!${Defined[looterName]})   /declare looterName string outer
  /if (!${Defined[lootItem]})   /declare lootItem  string outer
  /if (!${Defined[corpseID]})   /declare corpseID string outer
  /varset looterName ${Name}
  /varset lootItem ${Item}
  /varset corpseID ${CorpseID}
 
  /call ValidateParameters
 /return
|==== End Sub Event_LootItem
|==== Sub ValidateParameters
 Sub ValidateParameters
  /declare i int local
  /declare isValid bool local FALSE
 
  /if (${looterName.Length} > 0) {
   /for i 1 to ${Math.Calc[${EQBC.Names.Count[ ]}+1]}
    /if (${EQBC.Names.Arg[${i},].Equal[${looterName}]}) {
     /varset isValid TRUE
     /bc Found ${looterName.Left[1].Upper}${looterName.Right[-1]} in EQBC, checking for valid corpse ID
    }
   /next i
  } else {
   /bc Name can't be blank, try running macro again with valid name
   /timed 5 /end
  }
  /if (!${isValid}) {
   /bc Name wasn't found in EQBC, try running macro again with valid name
   /timed 2 /if (${Macro}) /end
  }
  /if (${Bool[${Spawn[${corpseID}]}]}) {
   /bc Corpse matching ${corpseID} has been found, entering loot logic
  } else {
   /bc No corpse matching id: ${corpseID} was found, try running macro again with valid corpse ID
   /end
  }
  /delay 3
  /bct ${looterName} //mac rloot
  /delay 9
  /bct ${looterName} //target id ${corpseID}
  /delay 5
  /tell ${looterName} @ item ${lootItem}
 /return
|==== End Sub ValidateParameters
|==== Sub Event_ThisItem
 Sub Event_ThisItem(Line, Item)
  /if (!${Defined[myItem]}) /declare myItem string outer
  /varset myItem ${Item}
  /bc Looking for ${myItem}
  /delay 10
  /bct ${EverQuest.LastTell} //tell ${Me} @ enter sub lootlogic
 /return
|==== End Sub Event_ThisItem
|==== Sub Event_LootLogic
 Sub Event_LootLogic
  :GetCloser
  /stick 5
  /if (${Target.Distance} < 12) {
   /loot
   /delay 20
   /if (${Bool[${Corpse.Item[${myItem}].InvSlot}]}) {
    /bc Found ${myItem} on the corpse
    /itemnotify ${Corpse.Item[${myItem}].InvSlot} rightmouseup
    /delay 5
    /bc Got what I needed, standing up
    /squelch /echo ${Window[LootWnd].DoClose}
   } else {
    /bc ${myItem} not found, are you sure you have the right corpse?  Standing up
    /squelch /echo ${Window[LootWnd].DoClose}
   }
  } else {
   /delay 50
   /goto :GetCloser
  }
  /timed 10 /multiline ; /bc Exiting macro ; /end ; /bct ${EverQuest.LastTell} //end
 /return
|==== End Sub Event_LootLogic
|==== Sub Event_HelpRelayLoot
 Sub Event_HelpRelayLoot
  /bc Use the following syntax: /echo rloot (remoteToonName) item (itemName) on (corpse ID)
  /bc remoteToonName is the name of the toon you are telling to loot the item
  /bc itemName is the item you want the toon to loot, it's just a search string
  /bc corpse ID is the ID of the corpse that the toon should look on for the item
 /return
|==== End Sub Event_HelpRelayLoot

Thu Apr 11, 2019 1:56 pm
Very nice, very clean, thanks for sharing this
Fri Apr 12, 2019 10:57 am
Project Lead
Public Macros Remote loot, tell eqbc client to loot an item
Reply