Jump to content

Avvi

Members
  • Posts

    397
  • Joined

  • Last visited

Posts posted by Avvi

  1.  If your desire is to wait 5 minutes, and sometimes wait 1 minute, then something like this will work:

        public void pluginLoop()
        {        
    
    
            bool lootStuff = false;
            int longerTimeToWait = 300000;
            int shortTimeToWait = 60000;
            int actualTimeToWait = shortTimeToWait;
    
            while (Products.IsStarted && _isLaunched)
            {
    
    
                if (!Products.InPause)
                {
    
                    wManager.wManagerSetting.CurrentSetting.LootMobs = lootStuff;
                    lootStuff= !lootStuff;
    
                    if(actualTimeToWait == longerTimeToWait){
                        actualTimeToWait = shortTimeToWait;
                    }
                    else{
                        actualTimeToWait = longerTimeToWait
                    }
                    Logging.Write("Waiting this long until switching looting status: " + actualTimeToWait);
                    Thread.Sleep(actualTimeToWait); 
    
                }
            }
    
        }
  2. unfortunately, that won't work.

    That will make it do the following:

    1.  Set looting to the variables value.
    2.  Wait 5 minutes before doing anything
    3.  Flip the looting variable to the opposite value
    4. Wait for 1 minute
    5. Repeat

    So you'll get something like this:

    Variable value = false:

    1.  Set looting to false.
    2.  Make plugin wait 5 minutes before doing anything
    3. Set looting variable to true
    4.  Make plugin wait 1 minute before doing anything
    5. Repeat:
    6.  Set looting to True.
    7.  Make plugin wait 5 minutes before doing anything
    8. Set looting variable to False
    9.  Make plugin wait 1 minute before doing anything
    10. Repeat
    11.  Set looting to false.
    12.  Make plugin wait 5 minutes before doing anything
    13. Set looting variable to true
    14.  Make plugin wait 1 minute before doing anything
    15. Repeat

     

     

    I think your desired outcome is something else. I'm guessing you want it to sometimes wait 5 minutes, and sometimes wait 1 minute?

     

    14 minutes ago, Stresse said:

    You are so awesome! I honestly can't thank you enough (I actually need to spend some time going around and "liking" all the posts you have made that have been so so helpful to me while I try to figure all this out)! You are my god!

     

    I am glad I could help ? !!!

  3. 1 hour ago, Stresse said:

    @Avvi

    No, it loots whatever is lootable (currently when I have two grouped up killing low-level mobs, one of them will start just following the other around looting their stuff).

    Oh, well then that's great news!  In  that case, you can swap out my plugin template's pluginLoop with this:

     

        public void pluginLoop()
        {
            bool lootStuff = false;
            while (Products.IsStarted && _isLaunched)
            {
    
                if (!Products.InPause)
                {
    
    		wManager.wManagerSetting.CurrentSetting.LootMobs = lootStuff;
    		lootStuff= !lootStuff;
                    Thread.Sleep(300000);
                }
            }
    
        }

     

    It will wait 300,000 (5 minutes ) milliseconds and then it will flip the LootMobs value from False to True. After another 300,000 milliseconds  (5 minutes ) it will go from True to False. It will flip it over and over until the WRobot it turned off. 

     

    Regarding my template, there are a lot of extra things in there. I added them so that there would be examples of many things ? . If you'd like, you can create a Setting that lets you set the milliseconds manually.

     

    Or, you can copy what I've done below. (Replace pluginLoop and pluginSettings : Settings 

        public void pluginLoop()
        {
            bool lootStuff = false;
    
            while (Products.IsStarted && _isLaunched)
            {
    
    
                if (!Products.InPause)
                {
    
    				wManager.wManagerSetting.CurrentSetting.LootMobs = lootStuff;
    				lootStuff= !lootStuff;
                    Thread.Sleep(_settings.timetowait);
                }
            }
    
        }
    
    
     [Serializable]
        public class pluginSettings : Settings
        {
            public pluginSettings()
            {
              
                timetowait = 300000;
            }
    
            [Setting]
            [Category("General Settings")]
            [DisplayName("Time to wait before looting stuff")]
            [Description("This is a Description.")]
            public int timetowait { get; set; }
    
    
            public static pluginSettings CurrentSetting { get; set; }
    
            public bool Save()
            {
                try
                {
                    return Save(AdviserFilePathAndName("TemplateProjectName", ObjectManager.Me.Name + "." + Usefuls.RealmName));
                }
                catch (Exception e)
                {
                    Logging.WriteError("TemplateProjectName > Save(): " + e);
                    return false;
                }
            }
    
            public static bool Load()
            {
                try
                {
                    if (File.Exists(AdviserFilePathAndName("TemplateProjectName", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                    {
                        CurrentSetting =
                            Load<pluginSettings>(AdviserFilePathAndName("TemplateProjectName",
                                                                          ObjectManager.Me.Name + "." + Usefuls.RealmName));
                        return true;
                    }
                    CurrentSetting = new pluginSettings();
                }
                catch (Exception e)
                {
                    Logging.WriteError("TemplateProjectName > Load(): " + e);
                }
                return false;
            }
        }

     

     

     

  4. On 7/25/2018 at 12:00 AM, Floood0 said:

    Hello, how we can log GM messages, i dont see this messages in wrobot chat window?

    UPD I mean global GM messages, this red strings that says " Hello word, acc ****** banned " (On 243 warmane)

    Do you know what channel that is in?

  5. 6 hours ago, Matenia said:

    The license on the old version was already restricting your number of sessions. However, Droidz had never implemented proper security. He didn't change the rules without asking, rather you were breaking the before and didn't care because they weren't being enforced. You can check out web.archive.org and you'll see what the old restrictions were.

    Hmm. Is this true? I thought you were allowed to bot on as many as you wanted, as long as you were on the same IP?

    https://web.archive.org/web/20160422023648/https://wrobot.eu/store/category/2-wrobot/

  6. 7 minutes ago, yori69 said:

    By the way, i can shut down admin's paypal account because he scammed me, my license is still working and i can't access to it because i got banned for the most stupid reason ever. I think i will just talk to paypal about this ?

    Quote

    And how do you know that is my own name? I'm not that dumb to put my own name or use my own credit card to stuff like these.

    By the way, not using your 'own name' on paypal is against their ToS and is also considered a felony depending on where you live. I'd be careful about what else you reveal about yourself here.

  7. 2 minutes ago, yori69 said:

    I might be a threat but would i do it? You don't have proofs that it was me, because there are others who also don't like you guys. Go ahead, report me to authorities, i would actually laugh at you guys. And my IP is not the same you idiot, i always use a good paid VPN. And how do you know that is my own name? I'm not that dumb to put my own name or use my own credit card to stuff like these. And if i would get caught, they have no proof it was me. And there are legal ways to shut down a website. 

     

    Anyways, this website is going down not on my action, but someone else told me that this website is going down, that's why i showed off '' i will hire a hacker ''

     

    Good luck ?

    I hope you like being linked to a crime. You'll be the first we'll report , and the first they'll gather information from. Good luck ?

  8. 57 minutes ago, yori69 said:

    I went to my Hanyoo69's banned profile. And it was logged 8 minutes ago? I can't login to it since i've been banned since like 2-4 days ago. 

     

    I want an explanation or i will hire a hacker to turn this whole site down, my last warning.

    You do know that that is a threat and that this website has your IP address, right? On top of your IP address, you've also already revealed your age, and that your a student. To top it off, Droidz also knows what your paypal account information is. It wouldn't take long to figure out your full name and your exact location. We already have enough information to report you to authorities if you were to do anything as stupid as you suggest. I wouldn't recommend trying it.

  9. 2 hours ago, Marsbar said:

    Would the simple fix for this not just be after its finished its ToTown run that the feature is paused for X minutes giving the bot time to get out of town and the pausing feature is re-enabled after that X variable.

    I actually thought this was built into WRobot lol

    Yes this is exactly how I achieve it in my code. Not the best solution, but an easy one. 

  10. 3 hours ago, Donkomon said:

    Hello, is it possible to remove wManager.Wow.Bot.States?

    like

    
    wManager.Wow.Bot.States.Resurrect
    wManager.Wow.Bot.States.Looting

     

    If you would like to ignore states, you can do so. Below is an example of ignoring/cancelling the To Town State.

     

    
            robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
            {
                if (state != null && state.DisplayName == "To Town")
                {
                  	Logging.Write("We have cancelled the To Town State");
                    cancelable.Cancel = true;
                }
            };
          

     

  11. 1 hour ago, pasdoy said:

    Hi I just did my first fight class in F# for fun. Well the beginning only. I built the dll but the bot can't run it, big red error in logs. Anyone tried to make a class in F#? I am not sure if it's F# or me building the DLL the wrong way. I am new to F#.

    
    namespace priestf
    
    open robotManager.Helpful
    open wManager.Wow.Helpers
    
    type Main() = 
        let mutable _loop = false
    
        interface ICustomClass with
            override this.Initialize() = 
                Logging.Write "Start Class"
                _loop <- true
    
            override this.Dispose() = 
                _loop <- false
    
            override this.ShowConfiguration() = ()
    
            override this.Range = 30.0f
    

     

    Is F# fight class development supported?  I know that WRobot supports .net 4.0 but hadn't ever seen things written in anything other than that.

  12. 1 hour ago, ScripterQQ said:

    I just had to change (after the tram != null check)

    
    var distance = tram.GetDistance();

    to

    
    var distance = ObjectManager.GetWoWGameObjectByyId(20808).FirstOrDefault().GetDistance;

    because it was giving me error (basically not running at all). Now it reads the ship position correctly, I just need to adjust the range and other settings and it should be good =)

    Great, cool to see the null check worked!

  13. 10 minutes ago, ScripterQQ said:

    Sorry I just noticed I've posted into Official Forums, I'm testing this on private servers, so idk if this should be moved or what, maybe the problem it's indeed the private server object ID recognition.. Thanks.

    I think it might be crashing  because FirstOrDefault is not returning an instance of an object. So, you'll need to check if the object returned is null or not before checking its distance property.

    For example:

    var tram = ObjectManager.GetWoWGameObjectByyId(176082).FirstOrDefault();
    
    if(tram!=null){
     var distance = tram.GetDistance();
    	if(distance<=25){
    		 Logging.Write("Tram is within 25 units");
    	}
    	else{
    		 Logging.Write("Tram is farther than 25 units");
    	}
    }
    else{
    	 Logging.Write("Tram is null");
    }

     

    Also, to be safe, you can wrap the entire thing in a try catch block. This will prevent WRobot from crashing.

    try{
      var tram = ObjectManager.GetWoWGameObjectByyId(176082).FirstOrDefault();
    
      if(tram!=null){
       var distance = tram.GetDistance();
          if(distance<=25){
               Logging.Write("Tram is within 25 units");
          }
          else{
               Logging.Write("Tram is farther than 25 units");
          }
      }
      else{
           Logging.Write("Tram is null");
      }
    }
    catch(Exception e){
    	Logging.Write("Uh oh... something happened:"+ e.ToString());
    }

     

     

     

  14. 2 hours ago, marrvin said:

    Unfortunately one of the biggest issues can only be solved in the core:  the performance during combat
    I used  both HB and TNB before and ran multiple  WOW+Bot  on one  PC  (i7 6700 @ 4 GHz) with 30 FPS.
    But with WRobot as soon as combats starts the FPS drops from 30  to   0.3 - 1  at best.
    (yes I tested multiple fight classes with multiple specc)

    Also the lack of  pathfinding when flying  can not be added with a plugin  AFAIK.

     

    I have not experienced this issue myself. I think this to be an issue on your side. I suggest that you open a Bug Report https://wrobot.eu/bugtracker/ so that Droidz can work to help you fix this problem.

×
×
  • Create New...