September 14, 20169 yr 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 ?
September 14, 20169 yr 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");
September 14, 20169 yr Author 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
September 15, 20169 yr Profile is loaded more quickly than plugin, add Wait step at the start: test (1).xml
February 19, 20179 yr Author @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
Create an account or sign in to comment