Jump to content

Seminko

Members
  • Posts

    225
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Seminko got a reaction from srazdokunebil in [Solution] How to check for specific buff duration   
    I was trying to figure this out for vanilla to optimize my combat rotation. Finally made it work.
    public decimal BuffTimeLeft() { var SliceAndDiceTimeLeft = Lua.LuaDoString<decimal>("for i=0,31 do\r\n local id,cancel = GetPlayerBuff(i,\"HELPFUL|HARMFUL|PASSIVE\");\r\n if(id > -1) then\r\n local buffTexture = GetPlayerBuffTexture(id);\r\n if(strfind(buffTexture,\"Ability_Rogue_SliceDice\")) then\r\n local timeleft = GetPlayerBuffTimeLeft(id);\r\n return timeleft;\r\n end\r\n end\r\nend"); return SliceAndDiceTimeLeft; } Just change the buff texture from "Ability_Rogue_SliceDice" to the texture name you are checking for.
  2. Like
    Seminko got a reaction from Nireves in Switch target, polymorph, switch to original target   
    Sorry, I don't follow. My understanding is the OnFightLoop "loop" is acting like a while loop everytime I'm in combat, doing its thing continuously.
    Let's say, if I have the code below and the first argument would be true, cancelable.Cancel would be set to true, what would happen? It would skip the second if argument in the OnFightLoop and start right from the start?
    FightEvents.OnFightLoop += (unit, cancelable) => { if (ObjectManager.Target.GetDistance <= 8 && (!ObjectManager.Target.HaveBuff("Frost Nova") || !ObjectManager.Target.HaveBuff("Frostbite")) && (_timerFrostNova == null || _timerFrostNova.IsReady) && ObjectManager.Target.HealthPercent >= 20) { Move.StrafeRight(Move.MoveAction.PressKey, 1250); cancelable.Cancel = true; } if (ObjectManager.Target.GetDistance <= 10 && (!ObjectManager.Target.HaveBuff("Frost Nova") || !ObjectManager.Target.HaveBuff("Frostbite")) && (_timerFrostNova == null || _timerFrostNova.IsReady) && ObjectManager.Target.HealthPercent >= 20) { Move.StrafeLeft(Move.MoveAction.PressKey, 1250); } }; If that is the case can I disable OnFightLoop? I'm looking at the += and thinking if I did -= it would somehow remove things from the OnFightLoop? If so, how?
     
    Btw guys, this is great, this is how I like to learn, not sitting in books, that doesn't work for me at all. I have to dive right in and figure things out on real life examples. ;) Thanks for being so helpful!
  3. Like
    Seminko got a reaction from eniac86 in How to open "Big-mouth Clam" while fishing?   
    For some reason I cannot determine if you're being sarcastic or not :-P
    But I have a new plugin in the works and opening and looting items will be a part of it.
  4. Like
    Seminko got a reaction from eniac86 in How to open "Big-mouth Clam" while fishing?   
    I do use it in a plugin.
     
  5. Like
    Seminko got a reaction from eniac86 in How to open "Big-mouth Clam" while fishing?   
    Pretty ghetto, but works:
    robotManager.Helpful.Keyboard.DownKey(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, System.Windows.Forms.Keys.ShiftKey); Thread.Sleep(robotManager.Helpful.Others.Random(50, 150)); ItemsManager.UseItem(1234); // item ID of the clam Thread.Sleep(robotManager.Helpful.Others.Random(50, 150)); robotManager.Helpful.Keyboard.UpKey(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, System.Windows.Forms.Keys.ShiftKey); Thread.Sleep(robotManager.Helpful.Others.Random(50, 150));  
  6. Haha
    Seminko got a reaction from BetterSister in Bot does not rest before re-engaging after death   
    WRobot does that WRobot does that If it doesn't for you, the issue is with your settings / code. You would do yourself more good if you asked what might be causing this or how WRobot handles these scenarios instead of using CAPS and complaining that Wrobot doesn't work the way you are used to.
  7. Like
    Seminko got a reaction from eeny in How to open "Big-mouth Clam" while fishing?   
    I do use it in a plugin.
     
  8. Like
    Seminko reacted to valetine in How to open "Big-mouth Clam" while fishing?   
    Thank you very much, you have helped me many times!
  9. Thanks
    Seminko reacted to Marsbar in Make plugins product specific   
    robotManager.Products.Products.ProductName ?
    while (robotManager.Products.Products.ProductName == "Grinder") { asfhyhaskasfasjaisugbfasufa }
    Not actually tested
  10. Thanks
    Seminko reacted to Droidz in Close game when Teleported --> Stop bot when Teleported   
    Hello, I am not sure to understand what you want but:
    robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable) { if (state is wManager.Wow.Bot.States.StopBotIf && state.DisplayName == "Security/Stop game") { // sample to disable tp detection: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; wManager.Wow.Bot.States.StopBotIf.LastPos = wManager.Wow.ObjectManager.ObjectManager.Me.Position; // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 450) { // close bot... } } };  
  11. Thanks
    Seminko got a reaction from Marsbar in Light's Hope: Elysium realm renamed to Lightbringer - how to batch rename WRobot settings   
    I have over 100 XML settings files for WRobot. Here's how you can change all of them at once.
    Run Windows PowerShell, navigate to the settings folder and do:
    Get-Childitem *.xml | foreach { rename-item $_ $_.Name.Replace("Elysium", "Lightbringer") } Enjoy
  12. Thanks
    Seminko got a reaction from Findeh in Light's Hope: Elysium realm renamed to Lightbringer - how to batch rename WRobot settings   
    I have over 100 XML settings files for WRobot. Here's how you can change all of them at once.
    Run Windows PowerShell, navigate to the settings folder and do:
    Get-Childitem *.xml | foreach { rename-item $_ $_.Name.Replace("Elysium", "Lightbringer") } Enjoy
  13. Thanks
    Seminko got a reaction from AudreyH in Light's Hope: Elysium realm renamed to Lightbringer - how to batch rename WRobot settings   
    I have over 100 XML settings files for WRobot. Here's how you can change all of them at once.
    Run Windows PowerShell, navigate to the settings folder and do:
    Get-Childitem *.xml | foreach { rename-item $_ $_.Name.Replace("Elysium", "Lightbringer") } Enjoy
  14. Thanks
    Seminko got a reaction from iMod in Light's Hope: Elysium realm renamed to Lightbringer - how to batch rename WRobot settings   
    I have over 100 XML settings files for WRobot. Here's how you can change all of them at once.
    Run Windows PowerShell, navigate to the settings folder and do:
    Get-Childitem *.xml | foreach { rename-item $_ $_.Name.Replace("Elysium", "Lightbringer") } Enjoy
  15. Like
    Seminko reacted to Apexx in Prioritize Low HP targets   
    I do believe Seminko did not define unitToAttack.
    Simply replace
    if (lowestHP != null && unitToAttack.IsValid && unitToAttack.IsAlive && !lowestHP.IsMyTarget) // if the lowest hp mob is valid, alive and NOT your current target with:
    if (lowestHP != null && lowestHP.IsValid && lowestHP.IsAlive && !lowestHP.IsMyTarget) // if the lowest hp mob is valid, alive and NOT your current target  
  16. Like
    Seminko got a reaction from Matenia in Prioritize Low HP targets   
    You need an OnFightLoop fight event.
    I'm not sure whether this is the correct way to handle events but it's the way I could come up with, since my knowledge of Csharp is very limited still... BUT, what I do is put the OnFightLoop event in a method and call it during initialization. Once it is called the events "are recognized" and will fire everytime you are in a fight loop.
    Disclaimer: this is not tested, put this together just now...
    public void TargetSwitcher() // needs to be called just once, ie during Initialize { FightEvents.OnFightLoop += (unit, cancelable) => { // this code will loop everytime you are fighting List<WoWUnit> attackers = ObjectManager.GetUnitAttackPlayer(); // gets all units attacking you if (attackers.Count > 1) // if you are attacked by more than one mob { Logging.WriteDebug("More than 1 attackers detected."); //WoWUnit highestHP = attackers.OrderBy(uo => uo.HealthPercent).LastOrDefault(); // sort the list based on HP from lowest to highest, pick highest WoWUnit lowestHP = attackers.OrderBy(ou => ou.HealthPercent).FirstOrDefault(); // sort the list based on HP from lowest to highest, pick lowest if (lowestHP != null && lowestHP.IsValid && lowestHP.IsAlive && !lowestHP.IsMyTarget) // if the lowest hp mob is valid, alive and NOT your current target { cancelable.Cancel = true; // not TOO sure about this one haha Interact.InteractGameObject(lowestHP.GetBaseAddress); // switch to it Fight.StartFight(lowestHP.GetBaseAddress); // start fighting it Logging.WriteDebug("Switched to lowestHP target."); } } }; }  
    As a bonus, check this post by Droidz. Might be usefull too.
     
    Let me know how it worked out for ya...
  17. Like
    Seminko reacted to Droidz in GetIdByName strange behavior (explained)   
    Hello, it is not a bug, items names are server side, you need to have item in your bag (or request item info like when you "GetNameById) for that Wow request the item name at the server ( http://wowwiki.wikia.com/wiki/API_GetItemInfo )
  18. Thanks
    Seminko got a reaction from BrutusV in Fishing not working   
    Try this --> 
     
    And disable all your addons...
  19. Thanks
    Seminko reacted to reapler in Why does this code crash WRobot?   
    You may check first whether "sRogueSettings.CurrentSetting" is null:
    private void FoodManager() { try { if (sRogueSettings.CurrentSetting == null) robotManager.Helpful.Logging.Write("CurrentSetting is null"); else robotManager.Helpful.Logging.Write("CurrentSetting is not null"); } catch (Exception e) { robotManager.Helpful.Logging.WriteError(e.ToString()); } } You get probably "CurrentSetting is null" ;)
    So in this case this means you haven't initialized "CurrentSetting" = no instance to your object is given = "CurrentSetting" is null, hence you cannot accessing its properties.
    In the end you need to call "sRogueSettings.Load();" to create an instance.
    However If it's not the case, you may check for other variables against null.
  20. Thanks
    Seminko reacted to Marsbar in [Resolved] Pause if player nearby ONLY AFTER regen finishes   
    foreach (var player in ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120)) { Logging.Write("Player '" + player.Name + "' is close by!"); } Guess you could do that. May want to add a timer in there though so it doesn't spam the log like mad.
    edit: Maybe something like that around it>
    using Timer = robotManager.Helpful.Timer; public Timer PlayerNotificationTimer = new Timer(); public void GetPlayers() { if (PlayerNotificationTimer.IsReady) { foreach (var player in ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120)) { Logging.Write("Player '" + player.Name + "' is close by!"); } PlayerNotificationTimer = new Timer(1000 * 5); } }  
  21. Thanks
    Seminko got a reaction from Marsbar in Switch target, polymorph, switch to original target   
    Well the way I understand it is that if you don't use OnFightLoop and you call InteractGameObject and it instantly switches back to the original target, the one bot decided to target.
    I can polymorph a mob but it will keep it targetted until it dies despite InteractGameObject switching to a different target.
    So if the bot targets MOB1 and you InteractGameObject with MOB2 and cast Poly, it might work. But if the bot targets MOB1 and you poly MOB1, it will keep switching between MOB2 and MOB1.
    I guess it could work if polytarget was NOT my original target.
  22. Like
    Seminko got a reaction from Marsbar in [Resolved] Pause if player nearby ONLY AFTER regen finishes   
    Well it was easier then I thought :)
  23. Like
    Seminko reacted to Marsbar in [SOLVED] Move after Frost Nova - is it really that hard?   
    No, that's why you were getting the stuttering. It was trying to go back to doing what it was and then hitting the condition again (i think). We're adding extra behavior to the onfightloop.
    In regards to moving to a "safe" position, it may not be as hard as we think. We need to change the direction of the vector if a mob is too close to the end position.
    If you look at the code you can see that the xvector and yvector are our position xy minus the target xy. This ends up giving us the x and y distance we move in the x and y directions.
    Example (ignoring z axis):
    Our target is at position x:55,y:45
    We are at position x:48,y:44
    Our x position minus the target x position = our x vector == 48 - 55 = -7
    Our y position minus the target y position = our y vector == 44 - 45 = -1

    What we could do is then add or subtract to that vector if an enemy is too close to our target pos, which would change the direction from the Me pos. 
    (I'm at work again so cant play with it but it's actually quite interesting because I'm starting to get how this works lol)
  24. Thanks
    Seminko reacted to Matenia in [SOLVED] Move after Frost Nova - is it really that hard?   
    You actually need to set isTooClose to false again after the while loop and maybe give it a short Thread.Sleep(500) or so at the end of each iteration.
    Does the bot interrupt movement and then starts strafing again? Or is the strafing itself just choppy?
     
    I highly recommend getting Visual Studio and doing a basic C# tutorial (or even Java, they're essentially the same
  25. Like
    Seminko got a reaction from Apexx in [SOLVED] Move after Frost Nova - is it really that hard?   
    GG WP! Yup that's it. Works both in my test blank fightclass as well as in the main one!
    Thank you very much @Marsbar.
    Also thank you @Matenia and @Apexx ! I apreciate the help guys!
    This will definitely help me with my rogue fightclass as well. The only thing missing from perfection is moving to a spot without mobs. But that is way above my knowledge of coding :-D
     
    You know what the funny part is? I've seen that post dozens of times when I was googling but since I didn't know what FightEvents.OnFightLoop was or even how to use it properly I didn't even attempted to fiddle with it. I was so close yet so far :-D
×
×
  • Create New...