camelot10 155 Posted September 21, 2016 Share Posted September 21, 2016 Hi. i cant find out how i can check if known/usable and not in cooldown http://www.wowhead.com/item=64488/the-innkeepers-daughter / http://www.wowhead.com/spell=94719/the-innkeepers-daughter#used-by-item i tryed this: var list = SpellListManager.SpellIdByName("The Innkeeper's Daughter"); foreach (var id in list) { var name = SpellListManager.SpellNameInGameById(id); Logging.Write(" >> id=" + id + " name="+ SpellListManager.SpellNameInGameById(94719)+" know =" + SpellManager.KnowSpell(id)+ " cd=" + SpellManager.GetSpellCooldownTimeLeft(id) + " usable=" + SpellManager.SpellUsableLUA(name)+ " cd=" + SpellManager.GetSpellCooldownTimeLeftBySpellName(name) ); Logging.Write("exist:" + SpellManager.ExistSpellBook(name)); Logging.Write("------------------------------"); } but i get this result: 17:34:45 - >> id=91226 name=Дочь трактирщика know =False cd=0 usable=False cd=0 17:34:45 - exist:False 17:34:45 - ------------------------------ 17:34:45 - >> id=94719 name=Дочь трактирщика know =False cd=0 usable=False cd=0 17:34:45 - exist:False 17:34:45 - ------------------------------ 17:34:45 - >> id=94727 name=Дочь трактирщика know =False cd=0 usable=False cd=0 17:34:45 - exist:False didnt get anything usable from decompiling wrobot dlls. also: how i can check hearthstone cooldown left? any help would be usefull im trying to get this working: if know("The Innkeeper's Daughter") and not in cooldown > cast "The Innkeeper's Daughter" else if have("Hearthstone") and not in cooldown > use "Hearthstone" else Thred.Sleep( hearthstone.cooldown) Link to comment https://wrobot.eu/forums/topic/3903-the-innkeepers-daughter-how-to-check-if-known-and-use-it/ Share on other sites More sharing options...
camelot10 155 Posted September 21, 2016 Author Share Posted September 21, 2016 only this works public static void UseHeathstone() { var name = SpellListManager.SpellNameInGameById(94719); Lua.RunMacroText("/cast " + name); Thread.Sleep(Usefuls.Latency * 2); if (ObjectManager.Me.IsCast) { Logging.Write("Heathstoning ("+ name+")"); Usefuls.WaitIsCasting(); return; } else if (ItemsManager.HasItemById(6948)) { Logging.Write("Heathstoning"); ItemsManager.UseItem(6948); Usefuls.WaitIsCasting(); } else { Logging.WriteError("Dont have Heathstone or The Innkeeper's Daughter"); } } Link to comment https://wrobot.eu/forums/topic/3903-the-innkeepers-daughter-how-to-check-if-known-and-use-it/#findComment-18163 Share on other sites More sharing options...
Droidz 2738 Posted September 21, 2016 Share Posted September 21, 2016 Do you have try with lua? http://wow.gamepedia.com/API_IsSpellKnown var isKnown = wManager.Wow.Helpers.Lua.LuaDoString<bool>("return IsSpellKnown(91226)"); Link to comment https://wrobot.eu/forums/topic/3903-the-innkeepers-daughter-how-to-check-if-known-and-use-it/#findComment-18198 Share on other sites More sharing options...
camelot10 155 Posted September 23, 2016 Author Share Posted September 23, 2016 var isKnown = wManager.Wow.Helpers.Lua.LuaDoString<bool>("return IsSpellKnown(91226)"); Logging.Write(" is known 91226= " + isKnown); isKnown = wManager.Wow.Helpers.Lua.LuaDoString<bool>("return IsSpellKnown(94719)"); Logging.Write(" is known 94719= " + isKnown); isKnown = wManager.Wow.Helpers.Lua.LuaDoString<bool>("return IsSpellKnown(94727)"); Logging.Write(" is known 94727= " + isKnown); result: 02:06:53 - is known 91226= False 02:06:54 - is known 94719= False 02:06:54 - is known 94727= False any other ideas ? Link to comment https://wrobot.eu/forums/topic/3903-the-innkeepers-daughter-how-to-check-if-known-and-use-it/#findComment-18292 Share on other sites More sharing options...
Droidz 2738 Posted September 24, 2016 Share Posted September 24, 2016 Try to use http://wow.gamepedia.com/API_GetItemCooldown and http://wow.gamepedia.com/API_GetItemCount var itemId = 64488; var count = wManager.Wow.Helpers.Lua.LuaDoString<int>("return GetItemCount("+itemId+", nil);"); Logging.Write("Count = " + count); var timeLeft = wManager.Wow.Helpers.Lua.LuaDoString<double>("local startTime, duration, enable = GetItemCooldown("+itemId+"); return startTime + duration - GetTime();"); Logging.Write("Item Cooldown time left (seconde) = " + timeLeft); Link to comment https://wrobot.eu/forums/topic/3903-the-innkeepers-daughter-how-to-check-if-known-and-use-it/#findComment-18317 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now