• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

swapping out items (1 Viewer)

Donnavan2005

New member
Joined
May 30, 2005
RedCents
can anyone post me a snipet of a macro that will take an item from inventory equip it, right click it and put back the item it replaced?

as in:

get my velium coldain insignia ring out of my backpack, put it on (replacing my terror chain ring) clicky it, then put back on my terror chain ring and put the coldain ring into inventory.


I have been looking over several different macro's that swap out items, but I'm not able to put my mind around it.

(wow there's alot of stuff to dig through in the macroquest VIP section... :confused: )
 
EquipItem: An easier way to equip items you have in bags ( useful for weapons or focus items )
| slot name is optional. If not given, it will equip it in the first possible spot
|
| Usage:
| /call EquipItem "item name|slotname"
|
| Returns: "old item name|slotname"
| Examples:
|
| To Equip Sharp Ended Broken Lever when you have Serpent of Vindication equiped:
| /call EquipItem "Sharp Ended Broken Lever"
| It will return "Staff of Vindication|mainhand"
| To reequip the original item, you can save the return in a variable, and then use it later like this:
| /varset oldPrimary ${Macro.Return}
| | ... do stuff here with your new item equiped
| /call EquipItem ${oldPrimary}

this function is included in spell_routine.inc


Rich (BB code):
#include spell_routines.inc

put this in your macro after the #turbo line
 
this is what i use ... got it off MQ2 site (i think)

and i use this for that very ring

/mac swap "coldain insignia ring"


Rich (BB code):
//swap.mac
Sub Main(p0,p1)
   /call SwapCast "${p0}" "${p1}"
/endmacro

Sub SwapCast(item,equipslot)
   /declare inventoryslot int local
   /declare pack local
   /declare packslot int local
   /declare leaveopen int local 1
   /declare packnumber int local 0
   /declare leavetwisting int local 0

   /if (!${Defined[item]}) /goto :end
   /if (${Twist}) {
      /twist stop
      /varset leavetwisting 1
   }
   :stopsingingdelay
   /if (${Me.Casting.ID}>0) {
      /stopsong
      /goto :stopsingingdelay
      }
   /varset inventoryslot ${FindItem[${item}].InvSlot}
   /if (!${inventoryslot}) /goto :notfound
   :packcountloop
   /if (${inventoryslot}>250 && ${inventoryslot}<331) {
      /varset packnumber ${Math.Calc[${packnumber}+1]}
      /varset inventoryslot ${Math.Calc[${inventoryslot}-10]}
      /goto :packcountloop
      }
   /if (${packnumber} > 0) {
      /varset pack pack${packnumber}
      /varset packslot ${Math.Calc[${inventoryslot}-240]}
      /goto :foundit
      }
   :notinpack
      /call CastItem ${inventoryslot}
      /goto :end
   :foundit
      /if (!${Window[${pack}].Open}) {
         /nomod /itemnotify ${pack} rightmouseup
         /varset leaveopen 0
         }
      /call WaitCursor ${packslot} ${pack}
      /if (${equipslot.Find[null]}) {
         /if (${Cursor.WornSlots}>0) {
            /varset equipslot ${Cursor.WornSlot[1]}
         } else {
               /varset equipslot pack1
         }
      }
      /call WaitCursor ${equipslot}
      /call CastItem ${equipslot}
      /call WaitCursor ${equipslot}
      /call WaitCursor ${packslot} ${pack}
      /if (${leaveopen} == 0) /nomod /itemnotify ${pack} rightmouseup
      /goto :end
   :notfound
      /echo ${item} not found in inventory.
   :end
   /if (${leavetwisting} == 1) /twist start
/return

Sub CastItem(slot)
   /nomod /itemnotify ${slot} rightmouseup
   /echo Swapcast::Casting the effect on your ${InvSlot[${slot}].Item.Name}
   :castloop
|| special case composer greaves don't ever stop casting
      /if (${InvSlot[${slot}].Item.Name.Find["Composers Greaves"]}) {
         /delay 12
         /stopsong
      }
|| special cases for epics and other items that don't seem to cast proper with default cast times
       /if (${InvSlot[${slot}].Item.Name.Find["Blade of Vesagran"]}) {
         /delay 10
         /stopsong
      }
      /if (${InvSlot[${slot}].Item.Name.Find["Prismatic Dragon Blade"]}) {
         /delay 10
         /stopsong
      }
      /if (${Me.Casting.ID}>0) /goto :castloop
/return

Sub WaitCursor(slot, pack)
   /declare item local
   /declare timeout timer 30
   /varset item ${Cursor.ID}
   /if (${Defined[pack]}) /goto :waitloop2
   :waitloop1
      /nomod /itemnotify ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop1
   /goto :donewaiting
   :waitloop2
      /nomod /itemnotify in ${pack} ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop2
   :donewaiting
/return
 
swapping out items

Users who are viewing this thread

Back
Top