• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Fight at Joe's

    Discussion in 'Archives' started by JoeBrewski, Nov 11, 2012.

    1. Brentus

      Brentus New Member

      Joined:
      Nov 29, 2011
      Messages:
      132
      Likes Received:
      0
      Trophy Points:
      0
      thanks for the update to JuggernautCombat() and OperativeCombat() seems to be working good now. Now If only the devs would fix buddybot itself.
       
    2. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      For the pause, it was actually plan B of the questrewards suggestion/question.
      Its mainly when the bot is travelling or handing in quests, so i can take a peakaboo at the rewards.
      This sadly needs my presence at every darn quest on every toon, so i dont miss class quest rewards...

      Thats why i hoped you where able to code some diagnostics in.
      And no i dont need to pause the bot during combat, thats good in its current form ;)
      Maybe i need to talk to aevitas about this, hoping he does add something... :s
       
    3. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      thow something is off with the trooper vanguard - Assault specialist spec...

      it only does the following:
      Code:
      [JoesCombat] SoG: Y  HP: 098,9 RS: 089,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 95,04 Comp: M1-4X CHP: 096,8 Casting Hammer Shot
      [JoesCombat] SoG: Y  HP: 096,3 RS: 099,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 89,57 Comp: M1-4X CHP: 094,1 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 096,3 RS: 093,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 86,30 Comp: M1-4X CHP: 092,6 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 093,8 RS: 087,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 74,81 Comp: M1-4X CHP: 091,1 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 091,3 RS: 081,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 68,93 Comp: M1-4X CHP: 088,5 Casting Stockstrike
      [JoesCombat] SoG: Y  HP: 091,3 RS: 075,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 62,41 Comp: M1-4X CHP: 083,6 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 067,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 57,43 Comp: M1-4X CHP: 080,8 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 057,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 53,23 Comp: M1-4X CHP: 079,0 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 041,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 46,54 Comp: M1-4X CHP: 079,0 Casting Recharge Cells
      [JoesCombat] SoG: Y  HP: 088,7 RS: 080,0 AC: 1 CTScale: 1,0 TD: 0,0 THP: 46,54 Comp: M1-4X CHP: 079,0 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 082,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 41,36 Comp: M1-4X CHP: 076,1 Casting Stockstrike
      [JoesCombat] SoG: Y  HP: 088,7 RS: 084,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 34,61 Comp: M1-4X CHP: 074,4 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 078,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 29,57 Comp: M1-4X CHP: 069,0 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 072,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 24,30 Comp: M1-4X CHP: 066,0 Casting Ion Pulse
      [JoesCombat] SoG: Y  HP: 088,7 RS: 075,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 12,19 Comp: M1-4X CHP: 057,9 Casting Full Auto
      [JoesCombat] SoG: Y  HP: 088,7 RS: 062,1 AC: 1 CTScale: 1,0 TD: 0,0 THP: 02,76 Comp: M1-4X CHP: 055,2 Casting Stockstrike
      
      i miss full auto mostly and pulse cannon.
      Mortar valley is completly ignored.
      and a possbile explosive round.

      I also landed with my toon back on tatooine with many height differences (ie where you can walk off a ridge).
      Currently with my vanguard it does sticky grenade and walks into range to dps.
      Would it be possible to let the bot handle the movement to the mob?
      Cause i had a scenario where the bot was moving overa ridge and a mob was on the other side.
      it threw a sticky grenade, and walked to the mob. Sadly the mob was on a bridge and fell off.

      again thanks!
       
      Last edited: Aug 10, 2014
    4. silentfu72

      silentfu72 Member

      Joined:
      Jun 15, 2014
      Messages:
      95
      Likes Received:
      1
      Trophy Points:
      8
      thanks for fixing the goodies issue. Much appreciated. The routine is running great btw!! Movements are quick from one place to the next. :D
       
    5. Jekky

      Jekky New Member

      Joined:
      Jun 10, 2014
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      0
      Hi joe!
      how to make FRD (Field Repair Droid) works?
      He just summon FRD and after nothing happens.

      Second problem:
      If vendor is to far (for example half of the map from the grind spots) bot farm and stops only then all inventory slots are full.
      After this he run back but if he kill monster and find a new item he just try to loot it (get error full inventory). corpse windows opened and he stucks.
      I just wonder how to make him run back to sell items with 5-6 available slots.

      Thank you
       
      Last edited: Aug 10, 2014
    6. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      Updated. Biggest change was to slow down the combat loop so that the abilities would get picked up as usable.

      Interesting how in theory it's a RANGED class, but per the buffs etc, may as well be melee for DPS, which is a MAJOR PAIN IN THE A** when it comes to all the navigation involved during fighting. So to avoid all of the suffering involved per constant movement, I left the range (for the DPS Specs) at 30m. You can update it if you like in VanguardCombat(). Note that since Incendiary Round and Gut are basically melee abilities to some extent, they won't be used until the mob rushes you.

      Joe
       
      Last edited: Aug 11, 2014
    7. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      Thanks, very much appreciate it :)

      Joe
       
    8. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      I hear you,
      I ignore all melee range spells to the point where mobs are at my possition.
      Else its just mortar valley, full auto and pulse cannon...

      But is pause an option?

      Thanks again!
       
    9. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      Nothing I can do re: Pause and TurnInQuest or CompleteQuest, that's hooking done into the questing 'turn-in/completion' code by the .exe - I have no control over that. If I'm understanding correctly, all you need to do for what you're describing is, comment-out the Profile line with the Alignment/AutoSkip (So you can choose it all manually)? .... OR.... just comment-out the Profile CompleteQuest lines, and the rewards will stick-around in a Pending state.

      Joe
       
      Last edited: Aug 11, 2014
    10. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      I've already addressed this a wayyyyys back.
      1. Max-Out your Field Repair Droid Legacy Ability (so it can be resummoned every 15m and will stick around for 3m or so).
      2. IT TAKES TIME, TO FIND THE FIELD REPAIR DROID, PERIOD. And it won't ALWAYS find it. But will most of the time.
      3. You can always just code a grinding profile which will run you near a (stationary/permanent) Repair Droid (i.e. at the Imp/Pub base/camp) and the code will, if you're low on inventory, scan for/find/move-to/use the permanent droid nearby.

      Joe
       
      Last edited: Aug 11, 2014
    11. Rostol

      Rostol Member

      Joined:
      Jul 19, 2014
      Messages:
      95
      Likes Received:
      1
      Trophy Points:
      8
      Hey Joe,

      Thanks for the continuous updates! Bot is running SOOO smoothly now (maybe too fast, as i got used to have time to send companions on missions or to sell grays while walking, and now i need to be fast).

      What was really a pain was merging my changes with yours is there and easy way to fork and merge on svn like on git ? that would save some time.

      As i added some comments and regions my line numbers should be closer but larger than yours (sorry, will try to map corrections to the correct line, i will try to do it now but i am not 100% sure i have any untouched version)

      I have only been playing swtor for a month and so far only have a consular which i love (a mix of tank, dps with treek as tank/healer? what's NOT to like??) so i only touched the general area and ShadowCombat.

      In the consular case the "Call Medical Probe" skill is called "Field Revive" so line 571 should read: (if its like this for all the classes)
      Code:
      if (ta.Name.Contains("Field Revive") && taMedProbe == null) { taMedProbe = ta; Logger.Write("Ability " + ta.Name + " found."); }
      i know taMedProbe is not used anywhere yet, but i am changing that (see below) as nothing pisses me off more than dying and not getting to alt-tab and stop the bot before it warps me to the med center.

      This is the skill
      Code:
      [07:02:32.376 N] [JoesCombat] Name: Field Revive
      			ActionPointCost: 0
      			AiType: None
      			AppearanceSpec: 
      			AutoAttackMode: None
      			CastingTime: 0
      			ChannelingTime: 0
      			CombatMode: None
      			CooldownTime: 0.5
      			EnergyCost: 0
      			ForceCost: 0
      			GlobalCooldownTime: 0
      			HeatCost: 0
      			IconSpec: shadowwalk
      			IgnoreAlacrity: True
      			IsCustom: True
      			IsHidden: True
      			IsPassive: False
      			MaxRange: 0
      			MinRange: 0
      			ModalGroup: 0
      			TargetArc: 0
      			TargetArcOffset: 0
      			TargetRule: SelfDead
      			UsesSpellPushback: False
      			IsValid: True
      			conContainerSlot_db: 0
      			conEntitySpec: 16140945076078806692
      			IsDeleted: False
      			Position: <0,0,0>
      			DistanceSqr: 64.04095
      			Distance: 64.04095
      			YDiff: 24.02201
      			IsFacing: False
      So if the name is different we could check for TargetRule = SelfDead & IgnoreAlacrity=true (for some reason return to medcenter has false in that field)

      Return to medcenter:
      Code:
      [07:02:33.330 N] [JoesCombat] Name: Return to Medcenter
      			 ActionPointCost: 0
      			 AiType: None
      			 AppearanceSpec: 
      			 AutoAttackMode: None
      			 CastingTime: 0
      			 ChannelingTime: 0
      			 CombatMode: None
      			 CooldownTime: 0
      			 EnergyCost: 0
      			 ForceCost: 0
      			 GlobalCooldownTime: 0
      			 HeatCost: 0
      			 IconSpec: 
      			 IgnoreAlacrity: False
      			 IsCustom: True
      			 IsHidden: True
      			 IsPassive: False
      			 MaxRange: 0
      			 MinRange: 0
      			 ModalGroup: 0
      			 TargetArc: 0
      			 TargetArcOffset: 0
      			 TargetRule: SelfDead
      			 UsesSpellPushback: False
      			 IsValid: True
      			 conContainerSlot_db: 0
      			 conEntitySpec: 16141006559840106161
      			 IsDeleted: False
      			 Position: <0,0,0>
      			 DistanceSqr: 64.04095
      			 Distance: 64.04095
      			 YDiff: 24.02201
      			 IsFacing: False
      There is one more SelfDead skill called Accept Revive, which is when someone else is trying to revive you. (always just with my consular as example.

      This is the code i am testing now (literally now) around 1625.
      Code:
                          Logger.Write("Death detected.  Waiting for Medcenter Rez to be Available...");
                          Thread.Sleep(5000);
                          ClearTarget();
                          Thread.Sleep(400);
                          ClearTarget();
                          if (taMedCenter != null)
                          {
                              SynchObjCacheAll();
                              //TorAbility ta = Me.KnownAbilitiesContainer.Where(t => t.Name == "Call Medical Probe").FirstOrDefault();                          // RST   - Test Field Rez
                              if (taMedProbe!=null) try  // RST   - Test Field Rez
                              {
                                  Me.AbilityActivate(taMedProbe, Me, out er);  //RST  - Test Field Rez
                                  if (er == EffectResult.Ok)
                                  {
                                      Logger.Write("Field Rezzing...");
                                      Thread.Sleep(300);
                                      WaitForCast();
                                  }
                              }
                              catch { }
                              //while (taMedProbe.IsValid && (BuddyTor.Me.IsDead || BuddyTor.Me.HealthPercent < .2f)) Thread.Sleep(2000);
                              //if (Me.AbilityActivate(taMedProbe, Me, out er)) { Logger.Write("Rezzing..."); Thread.Sleep(2000); }
                              while (!taMedCenter.IsValid && (BuddyTor.Me.IsDead || BuddyTor.Me.HealthPercent < .2f)) Thread.Sleep(2000);
                              if (Me.AbilityActivate(taMedCenter, Me, out er)) { Logger.Write("MedCenter Rezzing..."); Thread.Sleep(2000); }
                              Logger.Write("Giving the bot some time to 'Get its Bearings'...");
                              Thread.Sleep(5000);
                          }
      


      As you see i've also retouched the Logger to output serialized objects, but its usefulness is limited (most Tor objects have an non-trivial constructor, which wont serialize)

      This wont work on 90% of the objects, but i'll get there...
      Code:
              public static void WriteObject(TorObject O)
              {
                  if (O != null)
                  {try
                      {
                          XmlSerializer xmlserializer = new XmlSerializer(typeof(TorObject));
                          StringWriter stringWriter = new StringWriter();
                          XmlWriter writer = XmlWriter.Create(stringWriter);
      
                          xmlserializer.Serialize(writer, O);
              
                          Write(stringWriter.ToString());
      
                          writer.Close();
                     
                      }
                  catch (Exception ex)
                      {
                          Write("EX: " + ex.ToString());
                      }
                  }
              }
      Also second important disclamer, i've never programmed in c# so learning as i go (i did work with C++), one thing that so far has eluded me is how i can make a simple function. I want to make a function i throw the array of targets surrounding me at X meters and also a radius (say 8 m) and returns the position in the ground where to drop a grenade or force in balance (ie largest concentration of targets, or hp, or elite, idk i need to code it and think about it lol). Speaking of which, is there a command like MercCastOnGround but Use Item on Ground (ie grenade not from a skill).

      So sorry if its presumptuous of me touching and posting comments and corrections of your code being and absolute newb, but honestly it was this bot an how fun it is to have an ACTUAL programmable bot, like with real code that has me enthused (ok some already used LUA including my favorite bot ever for GW2 name slipped now, but it had THE BEST graphical overlay i have ever seen, it colors farming and avoidance area right on the screen.. stunning).
       
    12. Rostol

      Rostol Member

      Joined:
      Jul 19, 2014
      Messages:
      95
      Likes Received:
      1
      Trophy Points:
      8
      This i've also looked into ... it seems that for some reason (either the npc list is not updated or something) if the bot is not visible on the screen (like the view is pointed elsewhere), or the screen is minimized or behind another window it NEVER (almost) finds it, its like the mob collection is refreshed when painted on screen.

      One of the reasons i dumped the whole skill list (passives, and actives) is to try to find the "Sell Grays" companion skill, but to no avail so far (it takes 5s when maxed out, but only works for grays which surely you know cos only one of us is the newb ;) ).

      Edit: which is also why i dumped all of the 'TorObject mob' objects it checks in the for-each, the ammount of stuff in there was surprising (datacrons, cubes, platforms, resources, npc, mobs, etc etc ... but not stupid repair droid.
       
      Last edited: Aug 11, 2014
    13. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      No problem - glad to get feedback, and thanks! I've already tried both Field Revive and Accept Revive, and neither of them have worked - if you get either to work let me know (the Call Medical Probe was a 'shot in the dark'). Thus, the commented-code. ALOT of the code is from trial-and-error. And ditto, my background was definitely NOT in C# or even C coming into this, but yeah it's a good learning experience.

      So far as a 'Targeting Midpoint' - for dropping an AOE of say 8 meters - you can look into void GetAttackers() (that builds the list, Attackers). Believe I had started code to determine the midpoint, but there were other issues at the time. Not sure if any of it is still in there or commented-out.

      So far as returning a 'Generic Array' - IF I'm understanding the question right, believe you can just pass out a parm of type List<> or IEnumerable? Sounds like you're probably ALOT more experienced C-Wise than I am, so if I misunderstood, I apologize.

      Joe
       
    14. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      Yes, it's been a pain to get the ObjectManager.Update() to divulge/include the FRD. Part of that, resulting in the SynchX code (but that like everything has been hit-and-miss). Queried as an NPC, Character, or even Player or Placeable, converted-Object, most of the time, no dice. I then added generic 'class queries' which DID seem to make a difference one day (as in the OM was smart enough to pull from TOR memory into the cache on 'generic enough' queries where the GUID wasn't in there, but the next day... nothing). (rant removed)

      Joe
       
      Last edited: Aug 12, 2014
    15. driftefx

      driftefx Member

      Joined:
      Dec 17, 2010
      Messages:
      41
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the great plugin! I appreciate the hard work you have put in =D

      I had a quick question. My jedi sent isn't using force leap or zen. I'm just using the combat profile with grinder on. Is there a way to turn it on? As of now, it just runs up to the npc to kill without closing the gap with force leap and not using zen at 30 centering stacks.
       
    16. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      One thing you can do is to set the PullRange to something like 3.0f (30 meters) in MercHelpers. I know what you're talking about - has to do with a change I made to 'Draw the Line' between Combat and OOC - the overlap was contributing to instability - long story there. Anyhow, since I made the change, alot of 'ranged pulls' aren't getting picked up as they should - the .exe seems to be running right up to the mob, before calling combat, which is a pain in the ....

      In short, Combat was being called before periodically out of BOTH the OOC Routine and the 'hook to Combat' (when the .exe detected Combat-In-Progress), and although it is a Static class (meaning only ONE Combat call should be running at a time), things would get sketchy on the back-end when that happened, thus the change (to not call Combat, period, out of ANY OOC routine). But the problem is, the damn pulls now.

      Will test it out and notify, but in the meantime you should be able to try out the PullRange update.

      Joe
       
      Last edited: Aug 12, 2014
    17. driftefx

      driftefx Member

      Joined:
      Dec 17, 2010
      Messages:
      41
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the prompt response! So awesome

      I will change it and try that out

      Edit: Zen works. Only on the higher difficulty mobs it seems like.

      Edit: Pulldist doesn't seem to work =/ Changed it to the value you specified
       
      Last edited: Aug 12, 2014
    18. JoeBrewski

      JoeBrewski New Member

      Joined:
      Jul 4, 2012
      Messages:
      315
      Likes Received:
      4
      Trophy Points:
      0
      Ok, looked into it further - something I screwed up a little ways back when removing code I thought was obsolete/ineffective in StopMoving(). Stopping movement has always been an eternal battle, and the code I had commented-out messed things up.

      Updated, sorry, try the latest.

      And yeah, Zen kicks in when you're at 70%-or-less-health.

      Joe
       
    19. driftefx

      driftefx Member

      Joined:
      Dec 17, 2010
      Messages:
      41
      Likes Received:
      0
      Trophy Points:
      6
      Thank you so much for the help! It works very nicely now. Thanks again!
       
    20. Rostol

      Rostol Member

      Joined:
      Jul 19, 2014
      Messages:
      95
      Likes Received:
      1
      Trophy Points:
      8
      Woohoo ... i see you are testing a new Field Revive :D cant wait to test it !! (yeah freak that i am i look at the code first, so i know where to try to see the changes.

      LOVED the BindAbilty cleanup! very nice idea, the code looks GREAT in that section now :)

      The routine keeps looking (and working tho i still havent tried rev 88) better and better! Thanks, your time and effort it's very much appreciated!

      edit: ohh new code for FRD too ... will test both.

      this is what i am trying for the Shadow (could be useful for others, idk still a newb)

      Code:
       Logger.Write("CT.HEAD :" + CT.Heading.ToString() + " - CT.Distance :" + CT.Distance.ToString());
                                  Logger.Write("ME.HEAD :" + Me.Heading.ToString());
                                  float aaa=Math.Abs(CT.Heading - Me.Heading);
                                  Logger.Write("Angle :" + aaa.ToString());
      
                                  if (MercCast("Shadow Strike", CT.Distance <= .20f && Math.Abs(CT.Heading - Me.Heading) < 60f))    
                                      if (MercCastOnGround("Force in Balance",(TWR10 >= 2 || SoG),CT))
                                          if (MercCast("Whirling Blow", TWR5 >= 3))
                                              if (MercCast("Double Strike")) break;
      
      Basically it TRIES to determine if i am behind the target, if i am +/- 60 deg (ie 120 deg arc) behind target (behind is a figure of speech, all i know is heading, behind would be a slightly more complex point and heading vector problem (to-do)) it'll try to cast Shadow Strike, otherwise Force in Balance. The whirling blow is not used now (if there are 3 at 5m there are 2 or more at 10 and FIB is cast). it works around 75% of the times, other times it will overshoot the target
       
      Last edited: Aug 14, 2014

    Share This Page