Jump to content
Sign in to follow this  
Swagkhalifa

[Request] [Help] ItemRack fix *SOLVED*

Recommended Posts

Hello!
I've recently started using ItemRack and I must say it has some potential for being a very nice addon, however some of its features doesn't work properly which is quite annoying imo. I've tried to fix it myself but unfortunatly i'm a noob when it comes to scripting. Therefore I seek someone who is experienced with addon scripting to help me out.

First of all a quick explanation of what ItemRack is, for those of you who aren't familiar with it: 
ItemRack is an addon that lets you swap gear faster. Whats interesting about it is that it has a queue function and can equip items automatically, pretty much similar to TrinketMenu. With ItemRack you can use wow's API events to set a "trigger event" for a set of gear that you've made and also make it run a script when that trigger event is met. To give a quick example:

Trigger: PLAYER_REGEN_ENABLED
Delay: 0.5 sec
Script: EquipSet("PvP Gear")

So what that tells me is that it should automatically equip my set "PvP Gear" 0.5 seconds after PLAYER_REGEN_ENABLED (i.e. when i'm out of combat).

Now this feature allows for some interesting stuff. For example what i'm trying to do:

Trigger: ITEMRACK_ITEMUSED
Delay: 0.5
Script: if arg1=="Goblin Rocket Helmet" then EquipSet("PvP Helm") end

What this does is, equipping my set "PvP Helm" 0.5 seconds after I have used Goblin Rocket Helmet. Unfortunatly this works in an awkward way, because if I click my equipped Goblin Rocket Helmet, ItemRack will register it as the item being used even though it isn't, and equip my PvP Helm right away. I basically have to target an enemy, be in range, and be able to use Goblin Rocket Helmet BEFORE I click it, in order to make it work.

So what I need help with is to make this work properly. ItemRack should only register an item being used, when its actually used.
Another thing is (not as important though), as stated, ItemRack is meant to read API events for its trigger function, however it doesn't seem to work for all API events.

I've already talked to @shirsig about this issue. He told me that the addon is missing a verification step to tell when something has actually been cast/used, however there's no need to detect if the spell actually went through, so a solution would be to check cooldown.

I hope someone can help me with this, I would really appreciate it and i'm sure others would too! :)

Thanks in advance!

TL;DR: ItemRack not working properly - it registeres items being used even though they aren't. Need help from experienced addon developer to fix problem.

EDIT: ItemRack v1.975 : https://wow.curseforge.com/projects/itemrack/files?sort=game-version

Edited by Swagkhalifa

Share this post


Link to post
Share on other sites

I've noticed this as well, I have a macro I spam to cast Frostbolt with "/use Trinket 1 /use Trinket 2 /cast Frostbolt", I set up events so when the trinkets used to swap out for another trinket and I ran into the same problem where only one of the trinkets actually get used but the other sends the ITEMRACK_ITEMUSED event so an unused trinket is swapped out. 

The readme.txt and the events manual.txt have a tiny bit more of information about the events but nothing really helpful, really just bumping in hope.

Share this post


Link to post
Share on other sites

Have you tryd if it works better using outfitter?

Make a set for your pvp helmet named "pvp" or some thing.

then make a macro:

Quote

/script UseInventoryItem(1);

/outfitter toggle pvp

If you got your rocket helmet on before you use it, then this will use the helmet then swap to your pvp helmet set.

For trinket :

Quote

/script UseInventoryItem(13);

/outfitter toggle trinket

 

Edited by meridaw

Share this post


Link to post
Share on other sites
2 hours ago, meridaw said:

Have you tryd if it works better using outfitter?

I did, however (correct me if i'm wrong) you can't write your own "custom" macros in Outfitter.

Share this post


Link to post
Share on other sites
56 minutes ago, meridaw said:

you make sets of gear in outfitter, then make the macro for it in supermacro.

So you're saying I can make a macro in supermacro that will automatically equip or queue up my pvp helm after I've used Goblin Rocket Helmet without having to click anything manually?

Edited by Swagkhalifa

Share this post


Link to post
Share on other sites

I just tested on a "on use" trinket, that worked fine. Not sure about the helmet one, but it will swap set after a small delay, or once your out of combat.

Share this post


Link to post
Share on other sites
/script UseInventoryItem(1);
/outfitter toggle pvp

This only result in the exact same problem as with ItemRack, as stated in my first post.

To make this macro work as I want, it has to look something like:
 

First Macro (the one which should be used):

/run UseInventoryItem(1); if IsEquippedAction(x) and GetActionCooldown(x)>0 then UseAction(y) end


x = action slot ID for where Goblin Rocket Helmet is
y = action slot ID for where second macro is

Second Macro (passive macro):

/outfitter toggle PvP Helm

 

This would work the way I want it, and can be made with itemrack aswell, but the thing is I don't have room for anymore macros (not using supermacro tho) and I don't have anymore room on my actionbars, therefore I need an addon that can do this for me. ItemRack would do the trick with some minor fixes/modifications but I don't know how to make those myself.

 

EDIT: I think i just found and fixed the whole problem with ItemRack. lol

Edited by Swagkhalifa

Share this post


Link to post
Share on other sites
35 minutes ago, meridaw said:

nice, how did you solve it?

ItemRack.lua
Line 1690 has to be changed from

if cooldown==0 then

to

if cooldown > 0 then

 

Now the only thing I have to do is finding a way to make the addon unable to register an item being used upon clicking it when it has 30 seconds or less left (clicking the item after it has been equipped).
But this is definitely much easier to work around :)

EDIT: After some testing with this solution it seems like one has to click their usable items twice. Once for using the item, twice for putting item in queue. This is because we told the addon to register an item being used when the item has more than 0 seconds cooldown left. Still not as annoying as before but i'll try to find a solution. - Would still appreciate help from someone experienced...

Edited by Swagkhalifa

Share this post


Link to post
Share on other sites

just needs addon supermacro and create macro

/order Goblin Rocket Helmet, Item2

Edited by coldlol

Share this post


Link to post
Share on other sites

Update:
I've reverted the modification I did to the addon, back to what it was before. Instead I went with this in-game ItemRack macro:

if arg1=="Goblin Rocket Helmet" and GetInventoryItemCooldown("player",1)>0 then EquipSet("PvP HELM") end



Now it works exactly the way I want it :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×