Jump to content

Rogue Stealth to avoid players


Recommended Posts

  • 2 weeks later...

This sounds like it could be a job for a Fight Class Editor. So basically, create a spell to cast Stealth with spell conditions in a top priority spot in your fight profile.

  • Fight Class Editor
  • Spell Condition
  • Add Condition "Hostile Unit Near" or maybe "Target is Player"
  • Play around with some stuff and make sure you have Stealth at top for #1 priority or something...

Hope it helps and let me know what you think...

Link to comment
Share on other sites

I've never had any luck with fight class editor. I made a profile for its sole purpose to stealth and it won't do it. I'm using a second account to try it out. I'm using a fishbot and I'm trying to get the fishbot to stealth when a player is nearby. 

Link to comment
Share on other sites

@pookasmight you can try this: StealthOnNearbyPlayers.xml

I'm not sure if this also might work on vanilla, but as long the api works you won't have a problem.

There's just one annoying thing to mention: I noticed Wrobot now also logs c# conditions so your log could probably be spammed.

Personally i would log the spells on initialization but i can't :)

Link to comment
Share on other sites

I can see that its trying to work and its trying to work when theres a player nearby which is great but its not stealthing. I'm getting an error [string "cWsNAA.lua"] Attempt to call global 'Dismount' (a nil value). 

and it is spamming the log pretty good but its reading that there's a player nearby.

Link to comment
Share on other sites

so i figured out theres a conflict here. I figured out how to get rid of the error. But I can't get the bot to stealth without it stopping it fishing. It'll stealth then it'll just start fishing again. I've tried delaying the timer on the bot stopping so it can stealth without casting a fish but it's not working. I set it at 0 seconds and the stealth isn't quick enough and if I set it to 2 seconds (after a player is detected) it's too fast and stealths then it sends another fishling line. any ideas?

 

Link to comment
Share on other sites

theres two remedies I can think of. Figuring out if theres a way to create a delay when disrupting the fish cast or taking the player detection out of the bot and having the fightclass pause the fishbot so it doesn't recast. I'm totally clueless on how to do either one of these. 

Link to comment
Share on other sites

43 minutes ago, pookasmight said:

theres two remedies I can think of. Figuring out if theres a way to create a delay when disrupting the fish cast or taking the player detection out of the bot and having the fightclass pause the fishbot so it doesn't recast. I'm totally clueless on how to do either one of these. 

So far i understand you, you want to stealth while a player is nearby and doing nothing, til the player goes away to start fishing again?

Link to comment
Share on other sites

no I didn't alter the XML. I altered the internal settings of the bot. And yes, if a player is nearby when im fishing I want it to stop and stealth until they leave. if they don't leave then i want it to log.

Link to comment
Share on other sites

@pookasmight the last part would take take too much effort on fightclass. But this should be fine: StealthOnNearbyPlayers+stopfishing.xml

New part looks like this:

//C# Fish block on Stealth
            if (wManager.Statistics.RunningTimeInSec() < 2)
            {
                robotManager.Helpful.Logging.Write("Register OnFishingPulse");
                wManager.Events.FishingEvents.OnFishingPulse += delegate(ulong node, CancelEventArgs cancelable)
                {
                    if (ObjectManager.Me.HaveBuff("Stealth"))
                    {
                        cancelable.Cancel = true;
                    }
                };
                robotManager.Helpful.Logging.Write("Register OnFishLoop");
                wManager.Events.FishingEvents.OnFishLoop += delegate(ulong node)
                {
                    while (ObjectManager.Me.HaveBuff("Stealth") && !robotManager.Products.Products.InPause)
                    {
                        Thread.Sleep(50);
                    }
                };
                System.Threading.Thread.Sleep(2000);//to initialize event only once on startup
            }

 

Link to comment
Share on other sites

  • 2 weeks later...

hey sorry for the ultra long response. I just came back from vacation and was able to test this out. It looks like it works at stopping fishing and stealthing but when the player leaves it gets stuck at stealth and doesn't go back to fishing. I get an error that says [string "KJIRFYNIY.lua"]:1: attempt to call global "CancelUnitBuff' (a nil value). Any ideas?

Link to comment
Share on other sites

45 minutes ago, pookasmight said:

I get an error that says [string "KJIRFYNIY.lua"]:1: attempt to call global "CancelUnitBuff' (a nil value). Any ideas?

Forgot that you are playing on vanilla, so "CancelUnitBuff" doesn't exist in the api.

I replaced it just with another cast: StealthOnNearbyPlayers+stopfishing.xml

Link to comment
Share on other sites

9 hours ago, reapler said:

Forgot that you are playing on vanilla, so "CancelUnitBuff" doesn't exist in the api.

I replaced it just with another cast: StealthOnNearbyPlayers+stopfishing.xml

This is cool, but wouldn't it be better as a plugin rather than a fight class? Then again you'd hope no one would attack you and no mobs would be close enough to aggro anyway.

Link to comment
Share on other sites

Hey thanks a lot for helping me with this but it's still not working right. the bot senses a player and stealths but immediately breaks the stealth and goes back to fishing. When the stealth cool down runs out it pops stealth again to only break again with a fish cast. it'll just keep doing this over and over. 

Link to comment
Share on other sites

2 hours ago, pookasmight said:

Hey thanks a lot for helping me with this but it's still not working right. the bot senses a player and stealths but immediately breaks the stealth and goes back to fishing. When the stealth cool down runs out it pops stealth again to only break again with a fish cast. it'll just keep doing this over and over. 

i belive i know what's wrong, but please attach a log first, since it worked on 3.3.5a.

3 hours ago, Marsbar said:

This is cool, but wouldn't it be better as a plugin rather than a fight class? Then again you'd hope no one would attack you and no mobs would be close enough to aggro anyway.

Of course, initially i wanted to add more features but i don't have time yet.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...