Updates
This commit is contained in:
parent
d8a4f32584
commit
3c8fe5f1f8
3 changed files with 39 additions and 9 deletions
7
.github/workflows/dotnetcore.yml
vendored
7
.github/workflows/dotnetcore.yml
vendored
|
@ -22,9 +22,4 @@ jobs:
|
|||
- name: Restore Dependencies
|
||||
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
|
||||
run: dotnet build --configuration Release
|
|
@ -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
|
||||
|
|
37
Program.cs
37
Program.cs
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue