Jump to content

Brian

Members
  • Posts

    92
  • Joined

  • Last visited

Everything posted by Brian

  1. check if Npc Shannox is not null, if not null run out
  2. Thanks, I'll test later when Im available. The second method is exactly what I'm looking for!
  3. I need to change the process name and I can do it via [DllImport("user32.dll")] static extern void SetWindowText(IntPtr hWnd, string windowName); But I need to get the main window handle.. Also, wManger.WoW.Memory.WoWMemory.Memory.. no GetProcess exists, only serialize
  4. Is it possible to change process name of attached WoW process? Also, how would I get an IntPtr to the attached WoW process?
  5. The anti-afk plugin is not working. (I am on 3.3.5), I am in combat for like 30minutes ~ and can't move and I go AFK and sometimes will logout. How can I avoid this?
  6. I use BlackMagic in my instance so it is all done in a plugin
  7. I don't need to use pathfinding or what not, just need the bot to click a x,y,z location. (Entering an instance..)
  8. So, I need to return the processID of the attached wrobot instance. How can I do this? (There will be multiple wrobot/wow's running so I need the attached instance)
  9. This is for OP, not for me :P, I use it just fine
  10. string name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = Lua.LuaDoString<string>("BuffStatus('target','Hunter's Mark')");
  11. If you want to retrieve multiple values; a,b,c,d,e,f,g = Lua.LuaDoString<string>("UnitIsDead('target')); a,b,c.. are the respective values in order
  12. Lua.LuaDoString<string>("UnitIsDead('target')")
  13. So, when I am in combat and lets say the unit is unattackable or behind me or something the player moves / turns to try and fix itself. I don't want this. If the bot is in combat, I don't want it to move at all even if my target is unattackable. How can I do this? Or, is there a way I can completely pause the bot in combat and unpause after combat? (I have my own rotation/combat manager that has sesperate from wrobot) " [MovementManager] Trying something funny, hang on" I want to disable this, I only want movement to happen if I specifically call .Move
  14. Just making this in a plugin with an empty bot base! Solved
  15. How do I start dialog / manage gossip in C# with an NPC by name? Or do I have to use LUA? One more question, how can I check (via either LUA or a bot function) if I can talk to a npc? So basically, I talk to an npc, and after I can no longer speak with that npc, I want to move onto the next step, how would I check if I can no longer speak to an npc using his name?
  16. So, I am attempting to make a very complex dungeon script, I need to use C# for a lot of the code with external DLLs. Is there any official way of handling this? If not, I'll probably just create the entire script in a plugin with an empty bot base, but that will be a bit annoying.
  17. What is the correct API to send a keystroke?
  18. So I am playing a class with all instants and 400 ping, so I would like my fightclass to spam the next button until it is pressed. How would I do that? Maybe not a full out spam, but start looking for next button to press a couple hundred milliseconds early. I tried : cooldownc = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Black Arrow'); return start;"); if (cooldownc == 0 && BlackArrow.IsDistanceGood && BlackArrow.KnownSpell) { BlackArrow.Launch(); return; } Instead of : if (BlackArrow.IsSpellUsable && BlackArrow.IsDistanceGood && BlackArrow.KnownSpell) { BlackArrow.Launch(); return; } But it breaks the rotation and gets out of order because there is so much spamming it backs up. I tried adding sleeps but they didn't help much, rotation was suboptimal. using System; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Class; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : ICustomClass { public float Range { get { return 30f; } } private bool _isLaunched; private WoWUnit _lastTarget; public void Initialize() { _isLaunched = true; Logging.Write("Lock1.0 Started"); Rotation(); } public void Dispose() { _isLaunched = false; Logging.Write("Lock1.0 Stop in progress."); } public void ShowConfiguration() { Logging.Write("Lock1.0 No setting for this Fight Class."); //MessageBox.Show("[My fightclass] No setting for this Fight Class."); } public Spell BlackArrow = new Spell("Black Arrow"); public Spell KillCommand = new Spell("Kill Command"); public Spell ChimShot = new Spell("Chimera Shot"); public Spell MultiShot = new Spell("Multi-Shot"); public Spell AimedShot = new Spell("Aimed Shot"); public Spell ExpShot = new Spell("Explosive Shot"); public Spell SteadyShot = new Spell("Steady Shot"); public Spell KillShot = new Spell("Kill Shot"); public Spell HunterMark = new Spell("Hunter's Mark"); public Spell SerpSting = new Spell("Serpent Sting"); public Spell BeastWrath = new Spell("Bestial Wrath"); public Spell RapidFire = new Spell("Rapid Fire"); public Spell Readiness = new Spell(23989); public Spell CallPet = new Spell("Call Pet"); public int SerpID = 49001; public int HuntID = 19423; internal void Rotation() { Logging.Write("Lock1.0 Is started."); while (_isLaunched) { try { if (!Products.InPause) { if (!ObjectManager.Me.IsDeadMe) { //buffRotation(); if (Fight.InFight && ObjectManager.Me.Target > 0 && ObjectManager.Me.SpeedMoving == 0 && !ObjectManager.Me.GetMove) { CombatRotation(); } else if (ObjectManager.Me.Target == 0) { } } } } catch (Exception e) { Logging.WriteError("[My fightclass] ERROR: " + e); } Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage. } Logging.Write("[My fightclass] Is now stopped."); } Aura GetAuraByPlayer(int ID) { Aura final = new Aura(0); Aura[] TargetAuras = ObjectManager.Target.GetAllBuff().ToArray(); foreach (Aura i in TargetAuras) { if (i.IsValid() && i.Owner == wManager.Wow.ObjectManager.ObjectManager.Me.Guid && i.SpellId == ID) { final = i; return i; } } return final; } internal void CombatRotation() { Aura SerpAura = GetAuraByPlayer(SerpID); Aura HuntAura = GetAuraByPlayer(HuntID); int cooldown; int cooldownb; int cooldownc; int cooldownd; int cooldowne; int cooldownf; int cooldowng; int cooldownh; int cooldowni; int cooldownj; if (!ObjectManager.Pet.IsValid) { CallPet.Launch(); return; } if (HunterMark.IsSpellUsable && HunterMark.IsDistanceGood && HunterMark.KnownSpell) { if (!ObjectManager.Target.HaveBuff("Hunter's Mark")) { HunterMark.Launch(); return; } } cooldown = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Bestial Wrath'); return start;"); if (BeastWrath.IsSpellUsable && BeastWrath.IsDistanceGood && BeastWrath.KnownSpell) { BeastWrath.Launch(); return; } if (RapidFire.IsSpellUsable && RapidFire.KnownSpell) { if (!ObjectManager.Me.HaveBuff("Rapid Fire")) { RapidFire.Launch(); return; } } if (SerpSting.IsDistanceGood && SerpSting.KnownSpell) { if (SerpAura.SpellId == 0) { SerpSting.Launch(); return; } } cooldownc = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Black Arrow'); return start;"); if (BlackArrow.IsSpellUsable && BlackArrow.IsDistanceGood && BlackArrow.KnownSpell) { BlackArrow.Launch(); return; } cooldowni = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Explosive Shot'); return start;"); if (ExpShot.IsSpellUsable && ExpShot.IsDistanceGood && ExpShot.KnownSpell) { ExpShot.Launch(); return; } cooldownd = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Chimera Shot'); return start;"); if (ChimShot.IsSpellUsable && ChimShot.IsDistanceGood && ChimShot.KnownSpell) { ChimShot.Launch(); return; } cooldowne = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Kill Command'); return start;"); if (KillCommand.IsSpellUsable && KillCommand.IsDistanceGood && KillCommand.KnownSpell) { KillCommand.Launch(); return; } cooldownf = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Multi-Shot'); return start;"); if (MultiShot.IsSpellUsable && MultiShot.IsDistanceGood && MultiShot.KnownSpell) { MultiShot.Launch(); return; } cooldowng = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Aimed Shot'); return start;"); if (AimedShot.IsSpellUsable && AimedShot.IsDistanceGood && AimedShot.KnownSpell) { AimedShot.Launch(); return; } cooldownh = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Kill Shot'); return start;"); if (KillShot.IsSpellUsable && KillShot.IsDistanceGood && KillShot.KnownSpell && ObjectManager.Target.HealthPercent < 20) { KillShot.Launch(); return; } cooldownj = Lua.LuaDoString<int>("start, duration, enabled = GetSpellCooldown('Readiness'); return start;"); Logging.WriteDebug(cooldownj.ToString()); if (Readiness.IsSpellUsable && Readiness.KnownSpell) { Readiness.Launch(); return; } if (SteadyShot.IsSpellUsable && SteadyShot.IsDistanceGood && SteadyShot.KnownSpell) { SteadyShot.Launch(); return; } } } that is what my rotation looks like, a bunch of those if statements
  19. If I have an object A I want to target, how wold I do that?
  20. theres your issue. Don't do once per target, check if it has buff and if not, apply it. Never use once per target.
  21. Rotation stops working after stun/disabled of any kind. I need to target a different unit then retarget original unit to get it to work again. I have tried multiple classes on multiple servers. Will post a log later, going to bed.
  22. When the realm crashes and the relogger is called, it will sometimes (good majority of the time) get stuck on realm connecting, tries to connect to the realm when it is down, and sits on the window forever. Solution, add a 5mibute timer, if relogger starts and not logged in within 5minutes, logout and try again or close wow and try again.
  23. The bot can run LUA secure scripts without an unlocker
×
×
  • Create New...