Seminko 41 Posted November 18, 2017 Share Posted November 18, 2017 Does anyone know the method that is handling this or how to recreate it? When I'm botting and I'm physically at the computer I don't want the game to be closed when teleported, rather I would like the bot to stop / close. I tried looking in the DLL but man, those random names are messing me up so bad. Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/ Share on other sites More sharing options...
Droidz 2742 Posted November 19, 2017 Share Posted November 19, 2017 Hello, I am not sure to understand what you want but: robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable) { if (state is wManager.Wow.Bot.States.StopBotIf && state.DisplayName == "Security/Stop game") { // sample to disable tp detection: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; wManager.Wow.Bot.States.StopBotIf.LastPos = wManager.Wow.ObjectManager.ObjectManager.Me.Position; // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 450) { // close bot... } } }; Matenia and Seminko 1 1 Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35313 Share on other sites More sharing options...
Seminko 41 Posted November 19, 2017 Author Share Posted November 19, 2017 Can't really test it but it looks good :) Thanks Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35318 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 On 19. 11. 2017 at 12:02 PM, Droidz said: Hello, I am not sure to understand what you want but: robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable) { if (state is wManager.Wow.Bot.States.StopBotIf && state.DisplayName == "Security/Stop game") { // sample to disable tp detection: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; wManager.Wow.Bot.States.StopBotIf.LastPos = wManager.Wow.ObjectManager.ObjectManager.Me.Position; // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 450) { // close bot... } } }; BTW, what does wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; do? EDIT: any idea how to test it? Tried with using HS but that apparently didn't work. Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35419 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 To test Teleporting, you can use a hearthstone or use a mage portal / game portal etc. Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35434 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 Just now, Avvi said: To test Teleporting, you can use a hearthstone or use a mage portal / game portal etc. Thanks, so smething must be wrong. Tried with HS and it didn't work. What I don't get is the first IF statement: if (state is wManager.Wow.Bot.States.StopBotIf && state.DisplayName == "Security/Stop game") Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35435 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 state comes from the FiniteStateMachine robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable To be honest, I have implemented what Droidz has , but in my RoboAlert plugin. I implemented it a little differently through looking at his code in dotPeek. One problem with the code snippet Droidz provided is that it's missing the continent change. The above code might not catch that. Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35436 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 You may want to just try the below in its own method with a while loop (for testing). // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 450) { // close bot... } That should probably work Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35437 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 Tried using it in a plugin. Didn't work with blink, both for the event and the while loops Spoiler using wManager.Wow.ObjectManager; using wManager.Wow.Bot.Tasks; using System; using System.Collections.Generic; using System.Threading; using robotManager.Helpful; using robotManager.Products; using robotManager.Events; using wManager.Plugin; using wManager.Wow.Helpers; using System.Configuration; using System.ComponentModel; using System.IO; using System.Windows.Forms; using wManager.Wow.Enums; using System.Linq; public class Main : wManager.Plugin.IPlugin { public void Initialize() { robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable) { if (state is wManager.Wow.Bot.States.StopBotIf && state.DisplayName == "Security/Stop game") { // sample to disable tp detection: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; wManager.Wow.Bot.States.StopBotIf.LastPos = wManager.Wow.ObjectManager.ObjectManager.Me.Position; // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 15) { robotManager.Products.Products.ProductStop(); } } }; /* while (Conditions.ProductIsStartedNotInPause) { // sample to disable tp detection: wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; wManager.Wow.Bot.States.StopBotIf.ForcePvpMode = true; wManager.Wow.Bot.States.StopBotIf.LastPos = wManager.Wow.ObjectManager.ObjectManager.Me.Position; // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 15) { robotManager.Products.Products.ProductStop(); } Thread.Sleep(5); } */ } public void Dispose() { } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35439 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 Can you try the below? using wManager.Wow.ObjectManager; using wManager.Wow.Bot.Tasks; using System; using System.Collections.Generic; using System.Threading; using robotManager.Helpful; using robotManager.Products; using robotManager.Events; using wManager.Plugin; using wManager.Wow.Helpers; using System.Configuration; using System.ComponentModel; using System.IO; using System.Windows.Forms; using wManager.Wow.Enums; using System.Linq; public class Main : wManager.Plugin.IPlugin { public void Initialize() { pluginLoop(); } public void pluginLoop() { while (Products.IsStarted && _isLaunched) { if (!Products.InPause) { checkForTeleport() } } } public void checkForTeleport() { // how to wrobot check if your char is tp: if (wManager.Wow.Bot.States.StopBotIf.LastPos != null && wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAlive && wManager.Wow.ObjectManager.ObjectManager.Me.Position.DistanceTo(wManager.Wow.Bot.States.StopBotIf.LastPos) >= 450) { Logging.Write("[Teleport Tester] PLAYER HAS TELEPORTED."); robotManager.Products.Products.ProductStop(); } } public void Dispose() { } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35441 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 Didn't work even though I tried >= 15, since Blink teleports you 20yards... Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35442 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 Just now, Seminko said: Didn't work even though I tried >= 15, since Blink teleports you 20yards... Do the logs show [Teleport Tester] PLAYER HAS TELEPORTED." Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35443 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 nope Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35444 Share on other sites More sharing options...
Avvi 98 Posted November 20, 2017 Share Posted November 20, 2017 My recommendation is to take a look / decompile the WRobot code using dotPeek to figure out how Droidz does it. In his above snippet, he is omitting a lot - such as checking for when character is dead / character moved to different continent, etc. Matenia 1 Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35446 Share on other sites More sharing options...
Seminko 41 Posted November 20, 2017 Author Share Posted November 20, 2017 Deleted, cos I'm stupid Link to comment https://wrobot.eu/forums/topic/7718-close-game-when-teleported-stop-bot-when-teleported/#findComment-35447 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now