Weer36 3 Posted November 8, 2022 Share Posted November 8, 2022 Hi everyone! I'm trying to change product inside plugin with running quester profile or just inside quester profile with following code: new Thread(() => { wManager.Plugin.PluginsManager.DisposeAllPlugins(); robotManager.Products.Products.DisposeProduct(); robotManager.Products.Products.LoadProducts("Gatherer"); robotManager.Helpful.Gatherer.Bot.GathererSetting.CurrentSetting.ProfileName = "123.xml"; robotManager.Products.Products.ProductStart(); }).Start(); But robotManager.Helpful.Gatherer is not accessible, cuz Gatherer never started before and assembly not loaded yet. Adding smth like Products.LoadProductsWithoutInit() won't help. Is exist any solution instead of making fake profile with Gatherer preload? Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/ Share on other sites More sharing options...
Droidz 2738 Posted November 8, 2022 Share Posted November 8, 2022 Hello, It is new Thread(() => { wManager.Plugin.PluginsManager.DisposeAllPlugins(); robotManager.Products.Products.DisposeProduct(); robotManager.Products.Products.LoadProducts("Gatherer"); Gatherer.Bot.GathererSetting.CurrentSetting.ProfileName = "123.xml"; robotManager.Products.Products.ProductStart(); }).Start(); (your line 5 is bad) Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67150 Share on other sites More sharing options...
Weer36 3 Posted November 9, 2022 Author Share Posted November 9, 2022 Doesn't matter its mistake in post. For clarity: when I run fake profile like: <QuestsSorted Action="RunCode" NameClass="robotManager.Products.Products.LoadProductsWithoutInit("Gatherer");" /> <QuestsSorted Action="LoadProfile" NameClass="my_profile_with_thread_of_product_change.xml" /> then assembly Gatherer.dll have time to load. Same successful result, if I manually select Gatherer product in UI, then select back Quester "my_profile_with_thread_of_product_change.xml" Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67151 Share on other sites More sharing options...
Droidz 2738 Posted November 9, 2022 Share Posted November 9, 2022 I'm not sure to understand all. But my previous code should work, even if the product settings interface is not up to date (one time, if you have loaded several time gatherer dll you will get error). Why you need to do that ? Why not use relogger application or Schedule product ? Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67152 Share on other sites More sharing options...
Weer36 3 Posted November 9, 2022 Author Share Posted November 9, 2022 Nope, ur code isn't work, test it please as Quester profile. Shedule and relogger has no needed condition to switch profiles. Also relogger need to restart game. Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67153 Share on other sites More sharing options...
Weer36 3 Posted November 13, 2022 Author Share Posted November 13, 2022 error text is: Compilator Error : c:\Data\temp\2q51l50f.0.cs(107,23) : error CS0103: The name 'Gatherer' does not exist in the current context Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67170 Share on other sites More sharing options...
Droidz 2738 Posted November 14, 2022 Share Posted November 14, 2022 new Thread(() => { robotManager.Helpful.ArgsParser.GetArgs.Profile = "123.xml"; robotManager.Helpful.ArgsParser.GetArgs.Product = "Gatherer"; wManager.Plugin.PluginsManager.DisposeAllPlugins(); robotManager.Products.Products.DisposeProduct(); robotManager.Products.Products.LoadProducts("Gatherer"); robotManager.Products.Products.ProductStart(); }).Start(); Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67176 Share on other sites More sharing options...
Weer36 3 Posted November 16, 2022 Author Share Posted November 16, 2022 That works, thanks a lot for a trick ) Link to comment https://wrobot.eu/forums/topic/14929-fake-load-assembly/#findComment-67203 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