camelot10 155 Posted September 14, 2016 Share Posted September 14, 2016 i made some usefull cs helpers classes for travel/world quests/scenario and im wonder, how i can use it in profiles without adding this class to profiles? its possible thru plugin ? if yes, how i can check in quester profile that plugin installed and enabled/running ? Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/ Share on other sites More sharing options...
Droidz 2738 Posted September 14, 2016 Share Posted September 14, 2016 For create you helpers class, look this sample: MyLib sample.zip (extract it in your WRobot folder, don't forget to activate plugins "MyLib Loader.cs"). This plugin contains two files, "MyLib Loader.cs" and "\MyLib\MyLib.cs". "MyLib Loader.cs" load file "\MyLib\MyLib.cs". "\MyLib\MyLib.cs" is your helpers class. To try this, you can run c# code where you want: MyLibNamespace.MyLib.Test(); (It is plugin, but you can convert "MyLib Loader.cs" to integrate it at your Quester or custom profiles). To check if plugin is active use this code: bool isActive = false; foreach (var p in wManager.wManagerSetting.CurrentSetting.PluginsSettings) { if (p.FileName == "MyLib Loader.cs" && p.Actif) { isActive = true; break; } } or you can use "Var", in plugin Initialize method put: robotManager.Helpful.Var.SetVar("MyLibInitialised", true); and when you want check if plugin loaded (where you want in WRobot): bool isActive = robotManager.Helpful.Var.Exist("MyLibInitialised") && robotManager.Helpful.Var.GetVar<bool>("MyLibInitialised"); Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-17924 Share on other sites More sharing options...
camelot10 155 Posted September 14, 2016 Author Share Posted September 14, 2016 when i run this first time: i got error, plugin doesnt compiled. 2nd profile start works fine. any possibility fix that? QuestHelpers.zip test.xml Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-17933 Share on other sites More sharing options...
Droidz 2738 Posted September 15, 2016 Share Posted September 15, 2016 Profile is loaded more quickly than plugin, add Wait step at the start: test (1).xml Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-17958 Share on other sites More sharing options...
camelot10 155 Posted February 19, 2017 Author Share Posted February 19, 2017 @Droidz this doesnt work. maded plugin, maded lib. if i use in quests editor, in any quest details complete or can condition return QuestHelper.SOMETHING(); on quester start, when profiles compiles in *.cs, this throw error, becouse plugin not inited and lib not loaded. i can use lib code in steps. but not in quests directly. anything like "wrobot/SharedLibs/" possible? i mean without plugins and direct in quest profiles code. something like static class and nothing more Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-23843 Share on other sites More sharing options...
Droidz 2738 Posted March 14, 2017 Share Posted March 14, 2017 Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-24779 Share on other sites More sharing options...
Zoki 0 Posted June 1, 2017 Share Posted June 1, 2017 Also very interested in this feature, any updates ? Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-27283 Share on other sites More sharing options...
Droidz 2738 Posted June 1, 2017 Share Posted June 1, 2017 4 minutes ago, Zoki said: Also very interested in this feature, any updates ? Link to comment https://wrobot.eu/forums/topic/3834-shared-cs-code-for-all-profiles/#findComment-27284 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