• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • /oos command

    Discussion in 'Archives' started by phoenixgold, Mar 20, 2014.

    1. phoenixgold

      phoenixgold New Member

      Joined:
      Mar 10, 2014
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      is there a way the bot do /oos when stuck in loop patern,its always unblock after i hit my /oos macro.

      or a plugin thx
       
    2. randomstraw

      randomstraw Community Developer

      Joined:
      Jul 17, 2012
      Messages:
      1,611
      Likes Received:
      10
      Trophy Points:
      38
      just setup a plugin that issues /oos every 30-90 sec

      :>
       
    3. phoenixgold

      phoenixgold New Member

      Joined:
      Mar 10, 2014
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      can you tell me how to do it or link me where they explain how to do plugin thx
       
    4. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      You can call:
      Code:
      LokiPoe.Resync();
      
      I've not tested to see if there is ant current logic that would conflict with this being called while the bot is moving, but it'll be reworked if necessary.
       
    5. phoenixgold

      phoenixgold New Member

      Joined:
      Mar 10, 2014
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      thx but where i put this :p
       
    6. Angelus

      Angelus Member

      Joined:
      Jan 15, 2010
      Messages:
      848
      Likes Received:
      6
      Trophy Points:
      18
    7. Pochizzle

      Pochizzle Member

      Joined:
      Mar 5, 2012
      Messages:
      204
      Likes Received:
      0
      Trophy Points:
      16
      Would like this as well
       
    8. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      There's some things the bot doesn't support well yet that make using this not as easy as it should be. Some changes are being worked on to allow user code to work with the bot logic "paused", in a sense, temporarily so code like this can run.
       
    9. Emmitt

      Emmitt Member

      Joined:
      Jul 24, 2011
      Messages:
      79
      Likes Received:
      1
      Trophy Points:
      8
      Code:
      using System;
      using System.Collections.Generic;
      using System.Globalization;
      using System.Linq;
      using System.Text;
      
      using Loki;
      
      using Loki.Game;
      using Loki.Game.Objects;
      using Loki.TreeSharp;
      using Loki.Utilities;
      using Loki.Utilities.Plugins;
      using log4net;
      using Action = System.Action;
      
      namespace ExileBot
      {
          class simpleOOS : IPlugin
          {
                      // Set it to FALSE to disable /oos spam
                      private bool DoResync = true;
      
      
              #region Implementation of IEquatable<IPlugin>
      
              public bool Equals(IPlugin other) { return Name.Equals(other.Name); }
      
              #endregion
      
              #region Implementation of IPlugin
      
              public string Author { get { return "Emmitt"; } }
              public Version Version { get { return new Version(1, 0, 0, 0); } }
              public string Name { get { return "Simple OOS"; } }
              public string Description { get { return "Da resync"; } }
      
      
              public void OnInitialize() {}
              public void OnStop() {}
              public void OnShutdown() {}
              public void OnEnabled() {}
              public void OnDisabled() {}
              public void OnConfig() {}
              public void OnStart() {}
              #endregion
      
      
              private static readonly ILog Log = Logger.GetLoggerInstanceForType();
       
      
              private string CurrentAreaID { get { return LokiPoe.LocalData.WorldAreaName; } }
              private readonly WaitTimer _resyncWait = WaitTimer.FiveSeconds;
              private readonly Random _random = new Random();
      
      
      
              public void OnPulse()
              {
                  if (DoResync && !CurrentAreaID.Contains("town") && _resyncWait.IsFinished)
                  {
                      _resyncWait.Reset(TimeSpan.FromMilliseconds(_random.Next(15000, 45000)));
                      Log.Debug(string.Format("--Resync  {0}",DateTime.Now.ToString(CultureInfo.InvariantCulture)));
                      LokiPoe.Resync();
                  }
      
              }
          }
      }
      
      Just paste the attached file into your plugins folder. The logic probably could be improved. If you don't want it on simply true the flag to false
      View attachment simpleOOS.zip

      Code:
      resyncWait.Reset(TimeSpan.FromMilliseconds(_random.Next(15000, 45000)));
      may want to change this line since you don't want to be spamming the hell out of the server every 15-45seconds

      Edit: This code is from the plugin stated above just reworked to fit with the current api and ripped out all the useless stuff.
       
      Last edited: Mar 28, 2014
    10. tragopapas

      tragopapas New Member

      Joined:
      Mar 9, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      very nice script but its also entering global chat for some reason i am not really sure if it actually using /oos command but for sure it enters global chat :D can you remove this ?
       
    11. Emmitt

      Emmitt Member

      Joined:
      Jul 24, 2011
      Messages:
      79
      Likes Received:
      1
      Trophy Points:
      8
      I can't handle an issue like that seems how I am just calling a provided function, and I don't know of a way to interact with the chat box so easy fix for you. Remove yourself global.
      Also what does the message look like when it goes into global?
      #.OOS? or something

      Edit: Just ran a test sitting in global...resynced fine
      redid test in trade...resynced fine
      not sure what the problem is
       
      Last edited: Mar 28, 2014
    12. tragopapas

      tragopapas New Member

      Joined:
      Mar 9, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      It doesnt says something in global chat but for some reason activates it ( i mean i can see other chating in there) well its ok if you dont know how maybe someone else can tell why is this happening
       
    13. Emmitt

      Emmitt Member

      Joined:
      Jul 24, 2011
      Messages:
      79
      Likes Received:
      1
      Trophy Points:
      8
      Last edited: Mar 28, 2014

    Share This Page