Xian55 / WowClassicGrindBot

Highly configurable and responsive World of Warcraft Classic pixel Grind Bot - No DLL injection or memory tampering, just screen capture and input simulation.
189 stars 127 forks source link

Why is my character interrupted while eating? #599

Closed cppbeliever closed 4 months ago

cppbeliever commented 4 months ago

error Log: [00:53:54:239 I] [CastingHandler ] [Conjured Muffin ] instant input 77ms ERR_SPELL_FAILED_INTERRUPTED -96.7554ms [00:53:54:393 I] [CastingHandler ] [Conjured Muffin ] instant input 71ms SPELL_FAILED_ITEM_NOT_READY -81.6946ms

it's json file content(below):

{ "ClassName": "Mage", "Loot": true, "PathFilename": "10_Gnome_New.json", "PathThereAndBack": true, "PathReduceSteps": false, "IntVariables": { "Item_Conjure_Drink": 2288, "Item_Conjure_Food": 5349, "MIN_FOOD%": 50, "MIN_WATER%": 30, "MIN_MANA_SPELL%": 50 }, "Pull": { "Sequence": [ { "Name": "寒冰箭", "Key": "52", "HasCastBar": true, "Requirements": [ "SpellInRange:3", "Mana% > MIN_MANA_SPELL%" ] }, { "Name": "火球术", "Key": "49", "WhenUsable": true, "Requirements": [ "TargetHealth% < 45", "SpellInRange:4" ] },

  {
    "Name": "Approach",
    "Requirements": [
      "!Casting",
      "!Shooting"
    ]
  }
]

}, "Combat": { "Sequence": [ { "Name": "寒冰箭", "Key": "52", "WhenUsable": true, "Requirements": [ "TargetHealth% < 45", "SpellInRange:4" ] }, { "Name": "火球术", "Key": "49", "HasCastBar": true, "Requirements": [ "Mana% > MIN_MANA_SPELL%", "TargetHealth% > 35" ] }, { "Name": "攻击", "Requirements": [ "!HasRangedWeapon", "!AutoAttacking" ] }, { "Name": "Approach", "Requirements": [ "!Casting", "AutoAttacking" ] } ] }, "Wait": { "AutoGenerateWaitForFoodAndDrink": true, // should generate 'Eating' and 'Drinking' KeyActions "FoodDrinkCost": 5, // can override the Cost of awaiting Eating and Drinking "Sequence": [ { "Name": "魔法松饼", "Cost": 5, // FoodDrinkCost "Requirement": "魔法松饼 && Health% < 99" }, { "Name": "魔法水", "Cost": 5, // FoodDrinkCost "Requirement": "魔法水 && Mana% < 99" } ] }, "Parallel": { "Sequence": [ { "Name": "魔法松饼", "Key": "54", "Requirement": "Health% < MIN_FOOD%" }, { "Name": "魔法水", "Key": "53", "Requirement": "Mana% < MIN_WATER%" } ] }, "Adhoc": { "Sequence": [ { "Name": "霜甲术", "Key": "50", "Requirement": "!Frost Armor" }, { "Name": "奥术智慧", "Key": "55", "Requirement": "!Arcane Intellect", "Log": false }, { "Name": "造水术", "Key": "112 ", "Cost":100, "HasCastBar": true, "Requirement": "!BagItem:Item_Conjure_Drink:4", "AfterCastWaitCastbar": true, "AfterCastWaitBag": true }, { "Name": "造食术", "Key": "113", "Cost":100, "HasCastBar": true, "Requirement": "!BagItem:Item_Conjure_Food:4", "AfterCastWaitCastbar": true, "AfterCastWaitBag": true } ] }, "NPC": { "Sequence": [ { "Cost": 6, "Name": "Repair", "Key": "C", "Requirement": "Durability% < 35", "PathFilename": "10_Gnome_Vendor.json" }, { "Cost": 6, "Name": "Sell", "Key": "C", "Requirements": [ "BagFull", "BagGreyItem" ], "PathFilename": "10_Gnome_Vendor.json" } ] } }

Xian55 commented 4 months ago

Hello, i need more info about your setup.

[00:53:54:239 I] [CastingHandler ] [Conjured Muffin ] instant input 77ms ERR_SPELL_FAILED_INTERRUPTED -96.7554ms [00:53:54:393 I] [CastingHandler ] [Conjured Muffin ] instant input 71ms SPELL_FAILED_ITEM_NOT_READY -81.6946ms

The provided log does not contain all the information in order to draw a meaningful conclusion.

Please upload the log files which are next to the executable.

cppbeliever commented 4 months ago

@Xian55 I solved this problem by:

change:

"Parallel": {
"Sequence": [
{
"Name": "魔法松饼",
"Key": "54",
"Requirement": "Health% < MIN_FOOD%"
},
{
"Name": "魔法水",
"Key": "53",
"Requirement": "Mana% < MIN_WATER%"
}
]
}

To:

"Parallel": {
      "Sequence": [
      {
        "Name": "Food",
        "Key": "54",
        "Requirement": "Health% < MIN_FOOD%"
      },
      {
        "Name": "Drink",
        "Key": "53",
        "Requirement": "Mana% < MIN_WATER%"
      }
    ]
  },

If the value of the attribute name is Chinese characters, there seems to be a problem.

Xian55 commented 4 months ago

In the KeyAction section there's a mention about having two reserved names Food and Drink.

image