• 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

Macro help

burdsjm

IM TEH CONDUCTOR OF THE POOP TRAIN
Creator
Commits
1
Got a question I am hoping to get answered.

I want to build a macro that will check if an item in the first slot if my inventory. and if it is then trade it to an npc.

Thanks for your help.
 
You should be able to steal what you need from this. It has a lot of the same things you are asking about.

Rich (BB code):
|Velium.mac modified from bonechips.mac
|bonechips.mac - 20 DEC 2004
|Originally by kkmonte. Updated by Redbot for use on Redguides.com
|USAGE: /macro velium.mac
|Edited/fixed by: raistlin8989
|Ignore the "Invalid item slot 'null'" echo in the mq2 window as it doesn't affe                                                                             ct the way the macro runs(ran it for a few hours)

Sub Main
/declare l0 int local
/declare hi int local
/declare ax int local

:Loop
/if (${FindItemCount[=small piece of velium]}<1) /goto :Done

/target npc Normon Stonetooth
/warp target
/say I will do a favor
/delay 1
/target npc Hakon Brightsteel
/warp target


/for l0 0 to 4
   /ctrlkey /itemnotify ${FindItem[=Normon's axe].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   /delay 1
   /if (${l0}==0) {
      /click left target
      /delay 10 ${Window[GiveWnd].Open}
      /delay 1
   } else {
      /notify GiveWnd GVW_MyItemSlot${lo} leftmouseup
      /delay 10 !${Cursor.ID}
      /delay 1
   }
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 20 !${Window[GiveWnd].Open}
/delay 1
:cursorclear1
/autoinv
/delay 1
/if (${Cursor.ID}) /goto :cursorclear1

/target npc Hakon Brightsteel

/for hi 0 to 4

   /ctrlkey /itemnotify ${FindItem[=small piece of velium].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   /delay 1
   /if (${hi}==0) {
      /click left target
      /delay 10 ${Window[GiveWnd].Open}
      /delay 1

   } else {

      /notify GiveWnd GVW_MyItemSlot${hi} leftmouseup
      /delay 10 !${Cursor.ID}
      /delay 1
   }

/if (!${FindItemCount[=small piece of velium]}) /goto :Done

/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10 !${Window[GiveWnd].Open}
/delay 1

:cursorclear2
/autoinv
/delay 1
/if (${Cursor.ID}) /goto :cursorclear2

/target npc Normon Stonetooth
/warp target

/for ax 0 to 4
   /ctrlkey /itemnotify ${FindItem[=Normon's axe].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   /delay 1
   /if (${ax}==0) {
      /click left target
      /delay 10 ${Window[EQUI_GiveWnd].Open}
      /delay 1
   } else {
      /notify GiveWnd GVW_MyItemSlot${ax} leftmouseup
      /delay 10 !${Cursor.ID}
      /delay 1
   }

/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10 !${Window[GiveWnd].Open}
/delay 1

:cursorclear3
/autoinv
/delay 1
/if (${Cursor.ID}) /goto :cursorclear3

/goto :Loop

:Done
/echo YOU ARE OUT OF "Small Piece of Velium"
/delay 1
/notify GiveWnd GVW_Give_Button leftmouseup
/warp succor

/endmacro
 
Macro help

Users who are viewing this thread

Back
Top
Cart