• 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 --->
Resource icon

Plugin - MQ2Exchange (1 Viewer)

Teichou

RedGuides OG
Joined
Jun 15, 2011
RedCents
1,501¢
MQ2Exchange - This plugin will allow you to exchange items or unequip items without having any inventory windows or bags opened. Will now allow exchanging items that are in main inventory slots, not just in bags.

Syntax
Rich (BB code):
NOTE: If you use custombinds using shift, alt, or ctrl, and use /itemnotify to right click the item... ENSURE that you use the format: "/nomodkey /itemnotify <slotname> rightmouseup"
 
/exchange "item name" <slotname> - Swaps "item name" into <slotname>
/unequip <slotname> - Unequip any of the equipment slots
/exchange help - Gives a list of the commands available
/exchange help list - Gives a list of the equipment slot names
  
Slotname can be any of the standard named slots:
charm
leftear
head
face
rightear
neck
shoulder
arms
back
leftwrist
rightwrist
ranged
hand
mainhand
offhand
leftfinger
rightfinger
chest
leg
feet
waist
ammo
pack1 - pack8
 
My clickies only work if I have them in an open inventory slot. They are not exchanged. I've searched the forums and found several old threads on the matter but the solution always seemed to be to include MQ2ExchangeItem plugin as well as MQ2Exchange. However, this plugin isn't in the vanilla compile and seems to have been dropped in general. So, how do we get item exchanging to work or do I need to find a copy of that plugin somewhere (either an existing binary or compile it myself)?

Right now I have to waste a lot of bag space to have certain key buffs work without my intervention.
 
Well magoon are you playing live servers? emu? if its live they added the ability to click items in bags, so the mq2exchange became obsolete, and the syntax was changed to cast an item from bag slots. I cant remember the syntax right off hand but if you check the changelog for vanilla it should have it in there about the casting from bag slots without exchange.
 
Re: MQ2Exchange &amp;amp; exchanging clicky items

Hmm... I'm on a SOE server but it is a progression server, not sure if that makes a difference. I am currently using a replacement for the map that puts bag tabs on it, but that's a recent change and the clicky thing has never worked for me.

Edit - Well, I tried manually clicking from a bag and it doesn't work. Must be a progression server rule set thing. Be nice to work out a work around though.

- - - Updated - - -

Well, your comment got me doing different searches. And I discovered the importance of the mq2bagwindow and made sure the xml file was in my EverQuest\uifiles\default folder and that the plugin was loaded. Unfortunately, even on accounts with Rain of Fear expansion, I cannot click things from bags nor does the above work. So it seems to be related to the progression server.

Is there some change in the macro code (kissassist in this case) or the casting syntax to have it work before those changes on live servers (Rain of Fear expansion from what I can see) as it was working at some point prior to that change.
 
I have an idea on this, and a proposed work around. Around line 1196 in the macro is the item casting logic as far as I can tell:

Rich (BB code):
       | - Check & cast if item
        /if (${FindItem[=${castWhat}].ID} && ${FindItem[${castWhat}].Timer}==0) {			
            | Prevent casting of Prestige items on silver and F2P accounts
            /if (${Me.Subscription.NotEqual[gold]} && ${FindItem[${castWhat}].Prestige}) /return
            /if (${WasTwisting}) {
                /squelch /twist off
                /delay 50 !${Twist} && !${Me.Casting.ID}
                /varset CastResult CAST_SUCCESS
                /useitem "${castWhat}" 
                /call CheckCasting 100
                   /if (${WasTwisting} && !${Twist}) {
                    /delay 30
                    /squelch /twist
                }
                /return ${CastResult}
            }
            /if (${Target.ID}!=${castTargetID}) {
                /target id ${castTargetID}
                /delay 10 ${Target.ID}==${castTargetID}
            }
            /call MQ2Cast "${castWhat}" item
            /if (${Debug}) /echo DEBUG CastWhat cast item result: ${Macro.Return}
            /varset CastResult ${Macro.Return}
            /delay 5s ${Cast.Status.Equal}
            /if (${Debug}) /echo  DEBUG CastWhat Leave item cast ${CastResult}
            /return ${CastResult}
        }


The issue is that an item can't be cast from within a bag, but if it were in a top level inventory slot, casting would be allowed. Would doing something like the following work?

Rich (BB code):
       | - Check & cast if item
        /if (${FindItem[=${castWhat}].ID} && ${FindItem[${castWhat}].Timer}==0) {
		
            | Fix for progression server - exchange item to inventory slot 30

            | Check if the server name is a progression server name
            /if (${MacroQuest.Server.Equal["fippy"]} || ${MacroQuest.Server.Equal["vulak"]}){
                | Check if the item is equipped. If the item's InvSlot is in 0-22, it is equipped
		| and doesn't need to be exchanged.
                /if (${Select[${FindItem[=${castWhat}].ItemSlot},0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]} == 0){
                    /exchange "${castWhat}" 30
                }
            }
			
            | Prevent casting of Prestige items on silver and F2P accounts
            /if (${Me.Subscription.NotEqual[gold]} && ${FindItem[${castWhat}].Prestige}) /return
            /if (${WasTwisting}) {
                /squelch /twist off
                /delay 50 !${Twist} && !${Me.Casting.ID}
                /varset CastResult CAST_SUCCESS
                /useitem "${castWhat}" 
                /call CheckCasting 100
                   /if (${WasTwisting} && !${Twist}) {
                    /delay 30
                    /squelch /twist
                }
                /return ${CastResult}
            }
            /if (${Target.ID}!=${castTargetID}) {
                /target id ${castTargetID}
                /delay 10 ${Target.ID}==${castTargetID}
            }
            /call MQ2Cast "${castWhat}" item
            /if (${Debug}) /echo DEBUG CastWhat cast item result: ${Macro.Return}
            /varset CastResult ${Macro.Return}
            /delay 5s ${Cast.Status.Equal}
            /if (${Debug}) /echo  DEBUG CastWhat Leave item cast ${CastResult}
            /return ${CastResult}
        }


This should move any non-equipped items to the bottom right inventory slot, which will need to remain open. I'm in the middle of a project right now so can't get in game to test, but would appreciate feedback, and letting me know if this is working. Obviously not the most robust solution, but may be a starting point for someone to expand on.
 
There were some errors in my original workaround. After testing:

  • Apparently /if doesn't deal with string equality directly, so using MQ2Data string comparison is required.
  • The second if didn't like the Select statement. Changing that to check ItemSlot>22 (0-22 are worn and don't require exchange on progression) is working.


Rich (BB code):
/if (${String[${MacroQuest.Server}].Equal[fippy]} || ${String[${MacroQuest.Server}].Equal[vulak]}) {
    /if (${FindItem[${castWhat}].ItemSlot}>22) {
        /exchange "${castWhat}" 30
        /autoinventory
    }
}

Adding this at the beginning of the Check item cast section (line 1190ish) directly after

Rich (BB code):
/if (${FindItem[=${castWhat}].ID} && ${FindItem[${castWhat}].Timer}==0) {

has me buffing with 2 clickies, stored in bags, after swapping them to the last inventory slot.
 
We will incorporated into kiss as well for compatibility on progression servers.

what expansion are they up to anyways?

Is that last inventory slot empty? as in no bag?
 
Fippy is on UF, with the top raid guild in the final tier. Vulak is in SoD (I think), with no real hope of progressing.

The way I have it set up is that my slot 30 is just empty, reserved for clickies. I've always held epics there since before click from bags was a thing, so in my case it works out of the box. I suppose that if the exchange logic could exchange, click, wait for result, then un-exchange, it would work for any case. The /autinventory line probably needs a delay attached to it too.
 
I just manually added this to my macro. On KA v 8.1.2 you need line # 1352. Is there any way this can get added to the macro so that when It gets updated we don't have to manually readd it?
 
This fix seems to be working. Sometimes the bag the item was in opens and stays open but that is a small price to pay to not have to devote a top level inventory slot for every item you might need clicked often.
 
I'm sure this has been asked before, I could not find anything on it..

Would anyone know a quick fix to my /exchange command not working properly -- it puts new item in, but the item that was originally in the slot stays in inventory. Only way to fix this is to leave a bag or inventory open and it'll swap properly?

I've read that /nomodkey or /itemnotify? but I'm not sure.

Maybe I hvae something misconfigured, in kiss config for pet focus or even bardswap.
 
I am not exactly sure what is going wrong here. You say that the item that was originally in the slot stays in inventory, where are you wanting it to go? I believe using the command: /exchange "item name" <slotname> places the item identified into that slot and if the slot had a current item it will then be placed in the first available inventory slot if none available the first bag slot.

The other issue you are referring to is if you use custombinds with alt, shift or ctrl with /itemnotify for right clicks, then you need to make sure that the format "/nomodkey /itemnotify <slotname> rightmouseup" is used to prevent problems. Let me know what is happening with the items and I will try to offer better help.
 
Stoped to work on last update (150808).. Error msg:
Due to complete misuse of the String Top_Level Object, it has been removed

Also.. would be nice if the new time locked servers would be added so we dont have to edit the script every update.. Ie: Lockjaw and Ragefire

Thanks in advance and HF and jobb well done!
 
My rogues will not swap their weapons back into their MH after the most recent patch

Melee for reference
Rich (BB code):
holyflag1=1
holyflag2=1
holyshit1=/if (!${Me.Buff[Avatar].ID} && ${Spell[Avatar].Stacks} && !${InvSlot[mainhand].Item.Name.Equal[Ancient Prismatic Spear]}) /exchange "Ancient Prismatic Spear" mainhand
holyshit2=/if (${InvSlot[mainhand].Item.Name.Equal[Ancient Prismatic Spear]} && (${Me.Buff[Avatar].ID} || !${Spell[Avatar].Stacks})) /exchange "Massive Heartwood Thorn" mainhand
 
I'm having the same problem with my rogue since the latest update.

"/exchange itemid slotid" is just attaching the weapon in the specified slot to the cursor, leaving the slot empty, and not performing the exchange.

Example:
/exchange "Salindrite Dagger" 14
My currently equipped offhand weapon is attached to the cursor.
No weapon is equipped in my offhand slot.
The MQ Output window shows "There was no container in slot 29" twice.
 
fix it when next release plz
maybe more plugin need do it

/nomodkey to all /itemnotify

Rich (BB code):
     // pick up the item to move
	if (cItem.BagSlot != 0xFFFF) {
        Execute("/nomodkey /shiftkey /itemnotify in %s %d leftmouseup",szItemSlot[cItem.InvSlot],cItem.BagSlot+1);
	} else {
        Execute("/nomodkey /shiftkey /itemnotify %s leftmouseup",szItemSlot[cItem.InvSlot]);
	}

    // swap item with worn slot
	Execute("/nomodkey /shiftkey /itemnotify %s leftmouseup",szItemSlot[lSFSlot]);

    // place the item on cursor into the old item's place
	if (cItem.BagSlot != 0xFFFF ) {
        Execute("/nomodkey /shiftkey /itemnotify in %s %d leftmouseup",szItemSlot[cItem.InvSlot],cItem.BagSlot+1);
	} else {
        Execute("/nomodkey /shiftkey /itemnotify %s leftmouseup",szItemSlot[cItem.InvSlot]);
	}

Rich (BB code):
    // we have found a place to remove to, move the item
    // pick the item up off of the slot
	Execute("/nomodkey /shiftkey /itemnotify %s leftmouseup",szItemSlot[lSFSlot]);

    // put it in desired place
	if (cFreeSlot.BagSlot != 0xFFFF ) {
        Execute("/nomodkey /shiftkey /itemnotify in %s %d leftmouseup",szItemSlot[cFreeSlot.InvSlot],cFreeSlot.BagSlot+1);
	} else {
        Execute("/nomodkey /shiftkey /itemnotify %s leftmouseup",szItemSlot[cFreeSlot.InvSlot]);
	}
 
Well, I found several bugs for this plugin.

1. If you have an item (not a container) in your very first slot of the inventory, or a TS bag, then
INI:
/unequip back
will cause the game freeze. You can only kill the process then restart the game.

2. If you put a non-TS container on your very first inventory slot, but it's full, it will shows "44 is not a valid slot for this container" in MQ window, and
INI:
/unequip back
will put the cloak on you cursor instead of being in bags.

3. If you put a non-TS container who also have some available slots, or your first top inventory is empty, then it works fine for the command
INI:
/unequip back
 
Can confirm that the /unequip command with a non-ts bag 1 but it is completely empty will crash the game just like having a TS bag or a non-container item will. If it is not completely empty but there is an open first slot in bag 1 then it will unequip to the first item it finds and place that item on cursor.
 
Plugin - MQ2Exchange

Users who are viewing this thread

Back
Top