Donkomon 0 Posted February 10, 2018 Share Posted February 10, 2018 Hi, how can I make a declaration code in the quest profile? Like in hb. <CustomBehavior File="RunCode" Code="uint Zone;" Type="Definition"/> <CustomBehavior File="RunCode" Code="Zone = 123;" /> Link to comment Share on other sites More sharing options...
Droidz 2682 Posted February 16, 2018 Share Posted February 16, 2018 Hello, you have serveral possibilities but the more easy is: robotManager.Helpful.Var.SetVar("Zone", 123); robotManager.Helpful.Var.GetVar<uint>("Zone") Link to comment Share on other sites More sharing options...
Donkomon 0 Posted February 16, 2018 Author Share Posted February 16, 2018 thanks, but this is a very uncomfortable way. better to use <Script> public class Declaration { public static uint Zone; } </Script> Is it possible to implement custom "wManager.Wow.Class.QuestAction" in a bot? like <QuestsSorted Action="InteractWith" MobId="123" /> <QuestsSorted Action="MoveTo" X="111" Y="111" Z="111" /> Link to comment Share on other sites More sharing options...
Droidz 2682 Posted February 17, 2018 Share Posted February 17, 2018 Use step RunCode with code like: To interact: GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-8835.76, 490.084, 109.6157), 123); // OR GoToTask.ToPositionAndIntecractWithGameObject(new Vector3(-8835.76, 490.084, 109.6157), 123); //if you want interact with NPC/GameObject near of your character: GoToTask.ToPositionAndIntecractWithNpc(ObjectManager.Me.Position, 123); GoToTask.ToPositionAndIntecractWithGameObject(ObjectManager.Me.Position, 123); To go to position: GoToTask.ToPosition(new Vector3(-8835.76, 490.084, 109.6157)); If you want to be sure that step are completed (this work on interact and goto): Use step type While with the code: !GoToTask.ToPosition(new Vector3(-8835.76, 490.084, 109.6157)) Add after step type EndWhile Link to comment Share on other sites More sharing options...
Donkomon 0 Posted February 17, 2018 Author Share Posted February 17, 2018 I know, I just gave an example. I wanted to add pieces of code to separate files and use them in profiles, <Script> is not convenient to use. + when using <Script>, bot often freezes Link to comment 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