• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Remote loot macro, tell a toon to loot a specific item off a specific corpse

dum_as_f

Active member
This is a small QOL macro that lets you tell any toon in your EQBC to loot an item that you specify from the corpse you tell it. It's just a quick and dirty way to keep me from having to cycle through windows to loot an item on an alt and uses chat watches as triggers.

The syntax for it is: /echo rloot (toonName) item (itemName) on (corpse id)

The toonName is obviously the toon who is going to loot the item, itemName is the search string for the item name you are trying to find on the corpse, and corpse id is the id of the corpse to loot.

This macro does use the deprecated /while because I play on EZServer and the supported client there is from mqemulator.net and lacks support for /while, as I said it's just a quick and dirty macro.

The toon initiating the command will tell the toon receiving the command to start the macro as well, so it can watch for the chat triggers it needs too. Once the loot logic is processed, it'll either loot the item or tell you what the issue was and either way both toons will end the macro.

Code:
|==== 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
 
Remote loot macro, tell a toon to loot a specific item off a specific corpse

Users who are viewing this thread

Back
Top
Cart