Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

UseItemOn doesn't work because of Item Cooldown

  • Version: All
  • Product: Quester
  • Type: Bug
  • Status: Not Added

So in this quest I have to use an item on 2 different points. It used the item on the first hotspot just fine... but when it arrived at the second hotspot the item was still on cooldown when the bot used it, so it didn't work. It ran back again to the first hotspot and used the item again succesfully, ran again to the second hotspot and it was on cooldown again, creating an infinite loop. I thought I could solve it by creating 2 entries for the same quest in the quest editor and doing them seperately but what this does is pulse the first entry succesfully, then it goes to the second step uses the item (which is still on cooldown) once and then it doesn't do anything anymore. I can solve it manually by running code in a thread but seems like this shouldn't be happening.

 

User Feedback

Recommended Comments

Mlarssa

Members

Split it up in two entries and add wait command between the two pulses. 

Pulse no 1

wait 10000 (10sec)

Pulse no 2

Eldunar

Members

Yeah, another possibility. I just think the logic of the useItemOn questclass could be improved, maybe allow setting an item cooldown time. But ofcourse that's up to droidz, im just reporting the issue. 

Hello, to bypass this problem, before to pulse this quest add step type runcode:

        robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) =>
        {
            int itemId = 1234;
            int questId = 1234;

            if (!wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                return;
            if (wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore)
                return;

            if (state.DisplayName == "Quester")
            {
                if (wManager.Wow.Helpers.Quest.HasQuest(questId) &&
                    wManager.Wow.Helpers.Lua.LuaDoString<bool>("local start, duration, enable = GetItemCooldown("+ itemId + "); return enable;"))
                {
                    cancelable.Cancel = true;
                }
            }
        };

(replace spell and item id)

Paultimate

Members
On 12/23/2016 at 4:19 AM, Droidz said:

Hello, to bypass this problem, before to pulse this quest add step type runcode:


        robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) =>
        {
            int itemId = 1234;
            int questId = 1234;

            if (!wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                return;
            if (wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore)
                return;

            if (state.DisplayName == "Quester")
            {
                if (wManager.Wow.Helpers.Quest.HasQuest(questId) &&
                    wManager.Wow.Helpers.Lua.LuaDoString<bool>("local start, duration, enable = GetItemCooldown("+ itemId + "); return enable;"))
                {
                    cancelable.Cancel = true;
                }
            }
        };

(replace spell and item id)

I tried this, had the bit pickup quest, then RunCode step, then pulse to go do the quest (set 4 towers on fire, 30 sec cooldown between each use if item)

After it picked up teh quest the log spits out 

[D] 16:05:44.288 - [Quester] RunCode[29]: robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => (and the rest of the code you posted above)

and then just sits there doing nothing, i waited a few min and nothing else happened. If i remove the code the bot will go and do the quest (and fail due to the item cooldown)
 

Maybe I do error with enabled https://wowpedia.fandom.com/wiki/API_GetItemCooldown, seems return true when item is ready, try:

        robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) =>
        {
            int itemId = 1234;
            int questId = 1234;

            if (!wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                return;
            if (wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore)
                return;

            if (state.DisplayName == "Quester")
            {
                if (wManager.Wow.Helpers.Quest.HasQuest(questId) &&
                    !wManager.Wow.Helpers.Lua.LuaDoString<bool>("local start, duration, enable = GetItemCooldown("+ itemId + "); return enable;"))
                {
                    cancelable.Cancel = true;
                }
            }
        };

or

       robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) =>
        {
            int itemId = 1234;
            int questId = 1234;

            if (!wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
                return;
            if (wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore)
                return;

            if (state.DisplayName == "Quester")
            {
                if (wManager.Wow.Helpers.Quest.HasQuest(questId) &&
                    wManager.Wow.Helpers.Lua.LuaDoString<bool>("local start, duration, enable = GetItemCooldown("+ itemId + "); return start ~= nil and start > 0 and duration ~= nil and duration > 0;"))
                {
                    cancelable.Cancel = true;
                }
            }
        };

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.