Originally Posted by
808
Can anyone help me out with a code that I can add into a profile use an on use trinket on cool down? Would the data file related to a profile (if there is one) need to be tweaked also when trying to add something like this?
thanks,
808
These are what I use normally posted previously by someone else, dont remember who exactly... but here it is:
Code:
local _, Cooldown, Ready = GetInventoryItemCooldown("player", 10)
if UseCD then
if Cooldown == 0 and
Ready == 1 and
UnitChannelInfo("player") == nil and
UnitAffectingCombat("player") ~= nil
then
UseInventoryItem(10)
return true
end
end
That would be for gloves, your first trinket would be 13 and the other would be 14 instead of the 10 in UseInventoryItem(10) and GetInventoryItemCooldown("player", 10). The UseCD requires a function higher in the priority list with the following like...
Code:
if modtime == nil then
modtime = 0
end
if IsRightControlKeyDown() and not GetCurrentKeyBoardFocus() and GetTime() - modtime > 1 then
modtime = GetTime()
if UseCD then
UseCD = false
PQR_WriteToChat("Cooldowns: \124cFFE61515Disabled")
else
UseCD = true
PQR_WriteToChat("Cooldowns: \124cFF15E615Enabled")
end
end
You can use IsLeftControlKeyDown(), IsLeftShiftKeyDown(), IsLeftAltKeyDown() or vise versa for the right just change the word Left to Right. There's also mouse buttons but I'm not a fan of those... Hope it helps bud, would've repsonded faster but I just woke up!