This commit is contained in:
Zontreck 2020-05-13 18:52:27 -07:00
parent d8a4f32584
commit 3c8fe5f1f8
3 changed files with 39 additions and 9 deletions

View file

@ -23,8 +23,3 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Upload Artifact
uses: actions/upload-artifact@v1.0.0
with:
name: artifact
path: bin/Release

View file

@ -6,7 +6,7 @@ using System.Reflection;
[assembly: AssemblyCompany("ZNI")]
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
[assembly: AssemblyCopyright("© 2020 Tara Piccari")]
[assembly: AssemblyFileVersion("5.617")]
[assembly: AssemblyFileVersion("5.724")]
[assembly: AssemblyDescription("Second Life Bot - BotCore5")]
@ -15,7 +15,7 @@ namespace Bot.Assemble
public class ASMInfo
{
public static string BotName = "ZBotCore";
public static double BotVer = 5.617;
public static double BotVer = 5.724;
public static string GitPassword
{
get

View file

@ -675,11 +675,46 @@ namespace Bot
cfg.Save();
}
[CommandGroup("assign", 75, 1, "assign [DLL Name] - Sets the active DLL", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
[CommandGroup("assign", 75, 1, "assign [DLL Name] - Sets the primary active DLL", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
public void SetActiveProgram(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
{
MHE(MessageHandler.Destinations.DEST_ACTION, UUID.Zero, "{\"type\":\"assignProgram\",\"newProgram\":\"" + additionalArgs[0] + "\"}");
}
private ManualResetEvent profile_get = new ManualResetEvent(false);
private Avatar.AvatarProperties Properties_AV;
[CommandGroup("set_profile_text", 75, 1, "set_profile_text [text:Base64] - Sets the profile text", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
public void setProfileText(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
{
MHE(source, client, "Setting...");
BotSession.Instance.grid.Avatars.AvatarPropertiesReply += Avatars_AvatarPropertiesReply;
BotSession.Instance.grid.Avatars.RequestAvatarProperties(BotSession.Instance.grid.Self.AgentID);
profile_get.Reset();
if (profile_get.WaitOne(TimeSpan.FromSeconds(30)))
{
Properties_AV.AboutText = Encoding.UTF8.GetString(Convert.FromBase64String(additionalArgs[0]));
BotSession.Instance.grid.Self.UpdateProfile(Properties_AV);
MHE(source, client, "Profile text set");
}
else
{
MHE(source, client, "The profile text could not be set. Timeout experienced");
BotSession.Instance.grid.Avatars.AvatarPropertiesReply -= Avatars_AvatarPropertiesReply;
}
}
private void Avatars_AvatarPropertiesReply(object sender, AvatarPropertiesReplyEventArgs e)
{
Properties_AV = e.Properties;
profile_get.Set();
BotSession.Instance.grid.Avatars.AvatarPropertiesReply -= Avatars_AvatarPropertiesReply;
}
[STAThread()]
private static void onObjectTerseUpdate(object sender, TerseObjectUpdateEventArgs e)