• Visit Rebornbuddy
  • [Plugin] Nuok Server Hop

    Discussion in 'Uncataloged' started by Nuok, Jun 18, 2016.

    1. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      As of 7.0 Server Hoping is pretty much dead, will leave this up if anyone wants the code.
      http://wow.curseforge.com/addons/server-hop/pages/changes-to-cross-realm-in-legion/

      NuokServerHop


      This is a basic plugin that allows you to jump realms at set intervals, which can be useful for farming in the world.

      It is similar to and partly based on the Server Hop addon for wow (http://mods.curse.com/addons/wow/server-hop).

      Credits to Apoc for the Ui window.


      Versions
      v3.4
      - Initial release to this thread
      v3.5 - Slight change to how it applies to groups, will now check available roles rather than just applying as dps.
      v3.6 - Logs the settings you have to debug easier (no other change)
      v3.7 - Fixed GetRealmName method from returning null
      v3.8 - Add a jump after second setting, the time is combined with the minuet setting!
       

      Attached Files:

      Last edited: Jul 27, 2016
      chinajade likes this.
    2. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Settings
      Search Categories - Use this to pick what you would like to search for, by default it searches only the Custom category that includes groups for things like kazzak that are ideal for realm hopping.

      Filters
      Auto Invite Only - Allows to only apply to groups with auto invite ticked, allows you to jump faster and hopefully annoy less people.
      Max Party Size - Allows you to set the max size the group should be when applying, useful for if you want to quest as raids wont allow for completion of objectives.

      Options
      Auto Leave After X Minuets - Will automatically leave the group your in after so many minuets, be careful if you leave the plugin on it will leave groups. If you set it too 0 it will disable this function.
      Realm Blacklist Timer - This will set a minimum time for each realm you jump to before it is allowed to jump back. So you dont jump from Outland to Outland server for example.
      Delay Pulse - Slows down the plugin to improve frame rates in-game, this plugin uses alot of LUA which can cause frame rate problems. The higher you set this the less the plugin will run and the less LUA calls will be made (dosn't impact any other part of the bot).
      Leave if your group leader - Simply put if your the leader of the group, it will leave the group :)

      Debug

      Debug Performance - Logs the time it takes for some of the plugins functions to occur.
      Detailed Debug - Log alot more information into the logs from the plugin, if you want help turn this on!
       
      Last edited: Jun 23, 2016
    3. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Reserved for future needs.
       
    4. version

      version New Member

      Joined:
      Feb 12, 2012
      Messages:
      166
      Likes Received:
      0
      Trophy Points:
      0
      Will test this out soon. Sounds very nice though.
       
    5. dragonbuddy

      dragonbuddy Member

      Joined:
      Dec 29, 2014
      Messages:
      574
      Likes Received:
      3
      Trophy Points:
      18
      I pray this is back and working because without a doubt my favourite plugin of all.
       
    6. jimhoughton

      jimhoughton New Member

      Joined:
      Jan 23, 2016
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      still not working for me, even with just custom selected for the type of group :(
       
    7. dragonbuddy

      dragonbuddy Member

      Joined:
      Dec 29, 2014
      Messages:
      574
      Likes Received:
      3
      Trophy Points:
      18
      same, not working.

      [EDITED 19-Jun-2016 by chinajade]: Removed highly-abusive cut-n-paste of log file fragment. Please learn to attach your full log:
       
      Last edited by a moderator: Jun 19, 2016
    8. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Ok the last thing i can try is to make it apply for all Available Roles so the lua looks like below.

      Code:
      local tank, heal, dd = C_LFGList.GetAvailableRoles(); C_LFGList.ApplyToGroup({id}, '', tank, heal, dd);
      I have run it again this morning with & without wow addons enabled and both times it was able to repeatedly find groups with this version.

      I see you get alot of Russian groups dragonbuddy are you using the Russian client?

      Like chinajade has said above, please only post full logs.
       
    9. littleJ

      littleJ New Member

      Joined:
      Feb 23, 2012
      Messages:
      24
      Likes Received:
      0
      Trophy Points:
      0
      Well, is there anyway you can make the plugin go for join one group and leave after x minutes, then join another group for more efficient farming?
       
    10. dragonbuddy

      dragonbuddy Member

      Joined:
      Dec 29, 2014
      Messages:
      574
      Likes Received:
      3
      Trophy Points:
      18
      WORKING; my problem was I had v3.4 and my toons are tank spec to farm anything, your v3.5 which I just downloaded and tested on US and EU is working. Thanks so much Nuok :)
       
    11. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      That's so weird, I guess i did only test it on characters with DPS and heal specs tho so it never had any impact for me.

      Glad its working again tho :0

      [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]
      [/FONT]

      [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]That's what this does....[/FONT]
       
    12. jimhoughton

      jimhoughton New Member

      Joined:
      Jan 23, 2016
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      Last edited: Jun 23, 2016
    13. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Can you run v3.6 and upload the logs I need to see your settings so I can try and replicate.
       
    14. jimhoughton

      jimhoughton New Member

      Joined:
      Jan 23, 2016
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      didnt notice the v3.6. will try
       
    15. jimhoughton

      jimhoughton New Member

      Joined:
      Jan 23, 2016
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      logs
       

      Attached Files:

    16. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Did you "trim" the log its missing the bit I wanted from when the bot first starts.
       
    17. jimhoughton

      jimhoughton New Member

      Joined:
      Jan 23, 2016
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      nope - ill do another one.
       

      Attached Files:

      Last edited: Jun 24, 2016
    18. predatorline

      predatorline New Member

      Joined:
      Dec 15, 2014
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      I did some small changes in your LFGList class. See below

      Code:
              /// <summary>
              ///     Gets the players current realm name
              /// </summary>
              public static string GetRealmName
              {
                  get
                  {
                      using (new PerformanceLogger(NSettings.Instance.DebugPerformace, "GetRealmName"))
                      {
                          string realm;
                          using (StyxWoW.Memory.AcquireFrame())
                          {
                              string lua;
                              var gi = StyxWoW.Me.GroupInfo;
                              var meLeader = gi.GroupLeader == StyxWoW.Me;
                              if (gi.IsInParty && !meLeader)
                                  lua = @"local index = GetNumGroupMembers();
      for i = 1, index do
      if UnitIsGroupLeader('party' ..i) then
      local name, realm = UnitName('party' ..i);
      if realm == "" or realm == nil then
      					realm = GetRealmName()
      				end
      return realm;
      end
      end";
      
      
                              else if (gi.IsInRaid && !meLeader)
                                  lua = @"local index = GetNumGroupMembers();
      for i = 1, index do
      if UnitIsGroupLeader('raid' ..i) then
      local name, realm = UnitName('raid' ..i);
      if realm == "" or realm == nil then
      					realm = GetRealmName()
      				end
      return realm;
      end
      end";
                              else lua = "return GetRealmName();";
                              realm = Lua.GetReturnVal<string>("return GetRealmName();", 0);
                          }
      
                          if (NSettings.Instance.DebugDetailed && realm != null)
                              Log($"GetRealmName: {realm}");
                          return realm;
                      }
                  }
              }
      Now it properly works to leave the realm after the set Leave after X minutes
      However it will not blacklist already visited realms. In my logs the plugin returns always the same current realm. Before this change it was always returning null
      The problem is somewhere inside the GetRealmName Method.
      I understand your code but i dont know if the syntax is correct.

      Edit: sorry for the bad code format
       
    19. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
       
    20. predatorline

      predatorline New Member

      Joined:
      Dec 15, 2014
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      Yes but this is somehow returning always my realmname. Even if i lookup the leaders realm and he is on another one. Is there a way to debug a message inside the first 2 Lua-If-Statements?
      Maybe posting inside the WoW chat something like this? (i dont know if its dangerous tho^^)
      DEFAULT_CHAT_FRAME:AddMessage("The groupleaders realm is: " .. realm)

      Edit: I also noticed some way around to avoid getting NIL as the return value.
      See this topic on the wow forum http://eu.battle.net/wow/en/forum/topic/12618441939
       
      Last edited: Jun 24, 2016

    Share This Page