Skip to content

Commit

Permalink
Merge pull request #147 from Lady-Binary/r-1-2-1-0
Browse files Browse the repository at this point in the history
R 1 2 1 0
  • Loading branch information
Lady-Binary authored Jan 12, 2021
2 parents 8b0c68d + e79aaab commit a1baa58
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 950 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "LoU"]
path = LoU
url = https://github.com/Lady-Binary/LoU.git
[submodule "SharpMonoInjector"]
path = SharpMonoInjector
url = https://github.com/Lady-Binary/SharpMonoInjector.git
4 changes: 2 additions & 2 deletions EasyLoU.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonSharp.Interpreter.net35
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditorEx", "ICSharpCode.TextEditorEx\ICSharpCode.TextEditorEx.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpMonoInjector", "SharpMonoInjector\SharpMonoInjector.csproj", "{4A1B44F7-447C-4441-BFA8-B6FCED65B4BD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoU", "LoU\LoU.csproj", "{99E17151-042B-499D-B752-5B185AB289FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpMonoInjector", "SharpMonoInjector\src\SharpMonoInjector\SharpMonoInjector.csproj", "{4A1B44F7-447C-4441-BFA8-B6FCED65B4BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion EasyLoU/EasyLOU.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<Project>{91ea9b9d-fe03-4273-bdaf-8ad42ede1e59}</Project>
<Name>MoonSharp.Interpreter.net35-client</Name>
</ProjectReference>
<ProjectReference Include="..\SharpMonoInjector\SharpMonoInjector.csproj">
<ProjectReference Include="..\SharpMonoInjector\src\SharpMonoInjector\SharpMonoInjector.csproj">
<Project>{4a1b44f7-447c-4441-bfa8-b6fced65b4bd}</Project>
<Name>SharpMonoInjector</Name>
</ProjectReference>
Expand Down
41 changes: 0 additions & 41 deletions EasyLoU/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,47 +506,6 @@ private bool CheckAnyFileChanged()
return FileChanged;
}

private delegate void LoadFileThreadSafeDelegate(TextEditorControlEx control, string propertyName, string propertyValue);
public static void LoadFileThreadSafe(TextEditorControlEx control, string propertyName, string propertyValue)
{
if (control.InvokeRequired)
{
control.Invoke(new LoadFileThreadSafeDelegate(LoadFileThreadSafe), new object[] { control, propertyName, propertyValue });
}
else
{
do
{
Thread.Sleep(100);
}
while (IsFileLocked(control.FileName));

control.LoadFile(control.FileName);
}
}

private static bool IsFileLocked(String filePath)
{
FileInfo file = new FileInfo(filePath);
FileStream stream = null;

try
{
stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None);
}
catch (IOException)
{
return true;
}
finally
{
if (stream != null)
stream.Close();
}

return false;
}

private void DoReopen()
{
int SelectedTabIndex = ScriptsTab.SelectedIndex;
Expand Down
4 changes: 2 additions & 2 deletions EasyLoU/ScriptDebugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void Play(String script, String path)

((ScriptLoaderBase)Script.Options.ScriptLoader).ModulePaths = new string[] { path + "\\?" };

// LOU commands
// LoU commands
foreach (var s in Enum.GetValues(typeof(CommandType)))
{
this.Script.Globals[s.ToString()] = DynValue.NewCallback(CallBack, s.ToString());
Expand All @@ -314,7 +314,7 @@ public void Play(String script, String path)
this.Script.Globals["OnHotKey"] = (Func<string, DynValue>)OnHotKey; // Override: this is implemented client side


// LOU status variables
// LoU status variables
UserData.RegisterType<ClientStatus.FINDBUTTONStruct>();
UserData.RegisterType<ClientStatus.FINDINPUTStruct>();
UserData.RegisterType<ClientStatus.FINDITEMStruct>();
Expand Down
2 changes: 1 addition & 1 deletion LoU
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
[![Build status](https://ci.appveyor.com/api/projects/status/slacd3eo77qmy1fp/branch/master?svg=true)](https://ci.appveyor.com/project/Lady-Binary/EasyLoU/branch/master) [![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)

# Easy LOU

Instructions: [Wiki](https://github.com/Lady-Binary/EasyLoU/wiki/Instructions)
# Easy LoU

Discord server: https://discord.gg/RWAqYcV

Public Scripts Library: https://easylou.boards.net/
Public Scripts Library: https://easyLoU.boards.net/

Documentation: [Wiki](https://github.com/Lady-Binary/EasyLoU/wiki)

![EasyLoU Screenshot](Screenshot.png?raw=true "EasyLoU Screenshot")

## So what is EasyLoU?

EasyLoU is a totally free tool inspired by EasyUO, the popular premiere macroing tool for Ultima Online.

## Why EasyLoU and not EasyLOA?
## How do I get started?

- Read the [Instructions](#instructions) below in order to learn how to launch EasyLoU and connect it to Aria
- Take a look at the scripts provided with the [Examples/](Examples/) folder which is extracted from the zipped release archive
- Learn some [Lua](https://www.lua.org/manual/5.2/)
- Use the available [Commands](https://github.com/Lady-Binary/EasyLoU/wiki/Commands) and [Variables](https://github.com/Lady-Binary/EasyLoU/wiki/Variables)
- Enjoy!

## Instructions

- From the [Releases](https://github.com/Lady-Binary/EasyLoU/releases) tab here on GitHub, download the archive containing the latest build and extract it
- Place the two extracted files EasyLoU.exe and LoU.dll in the folder where the file Assembly-CSharp.dll resides (usually C:\Program Files\Legends of Aria Launcher\Legends of Aria\Legends of Aria_Data\Managed or \steamapps\common\Legends of Aria\Legends of Aria_Data\Managed)
- Launch EasyLoU.exe
- Launch your Legends of Aria Client
- Wait for your Legends of Aria Client login page to show up
- On EasyLoU click on the Connect To Client Icon ![icon](EasyLoU/icons/uo.ico?raw=true "Connect to Client Icon"); the mouse cursor should turn into a beautiful UO hand
- Click on the Legends of Aria Client you want to connect to
- When asked, click OK to inject
- Load a script
- Enjoy!

*Note 1*: On Windows 10, upon launcing EasyLoU.exe you might get a "Microsoft Defender SmartScreen prevented an unrecognised app from starting." error message. If you know what you're doing then open the properties menu of EasyLoU.exe, check the "Unblock" box, click apply, click OK, and relaunch EasyLoU.exe.

*Note 2*: EasyLoU requires Administrative Privileges in order to be able to inject into the Legends of Aria Client running process.

## Why EasyLoU and not EasyLoA?

For two reasons:
- The name EasyLOA was already taken by https://github.com/MythikGN/EasyLoA :)
- The name EasyLoA was already taken by https://github.com/MythikGN/EasyLoA :)
- As a tribute to the [Legends of Ultima](https://www.legendsofultima.online/) community server.

## What can I do with EasyLoU?
Expand All @@ -39,10 +64,10 @@ Volunteers are always welcome :)

## How does it work?

EasyLoU.exe injects LOU.dll into the Legends of Aria client process, using a well known technique for injecting assemblies into Mono embedded applications, commonly Unity Engine based games.
EasyLoU.exe acts as the GUI while LOU.dll acts as the commands engine, and they communicate via two shared memory maps:
EasyLoU.exe injects LoU.dll into the Legends of Aria client process, using a well known technique for injecting assemblies into Mono embedded applications, commonly Unity Engine based games.
EasyLoU.exe acts as the GUI while LoU.dll acts as the commands engine, and they communicate via two shared memory maps:
- A ClientCommand memory map, where EasyLoU.exe queues all the commands that have to be processed and executed by the LoA Client
- A ClientStatus memory map, where LOU.dll updates the status of the LoA Client and the answers to various commands by populating a bunch of variables
- A ClientStatus memory map, where LoU.dll updates the status of the LoA Client and the answers to various commands by populating a bunch of variables
Credits for various components and implementations can be found at the bottom of this page.

## Can I run multiple scripts in parallel?
Expand All @@ -59,7 +84,7 @@ Rinse, and repeat.
## How can I build EasyLoU?

EasyLoU has been compiled for x64 architevture with Visual Studio Community 2017 and .NETFramework Version v4.7.2.
In order to build it, you need to own a copy of the Legends of Aria client, and you need to copy into the LOU\libs\ folder the following libraries which you can take from the C:\Program Files\Legends of Aria Launcher\Legends of Aria\Legends of Aria_Data\Managed folder (or whatever path you have installed your client into):
In order to build it, you need to own a copy of the Legends of Aria client, and you need to copy into the LoU\libs\ folder the following libraries which you can take from the C:\Program Files\Legends of Aria Launcher\Legends of Aria\Legends of Aria_Data\Managed folder (or whatever path you have installed your client into):

Assembly-CSharp-firstpass.dll
Assembly-CSharp.dll
Expand Down Expand Up @@ -91,7 +116,7 @@ By using EasyLoU you may be breaching the Terms and Conditions of Citadel Studio
ONLY download EasyLoU from its official repository: NEVER accept a copy of EasyLoU from other people.
ONLY run scripts that you can understand: NEVER accept scripts from people you do not know and trust.

Keep in mind, there is always a possibility that a malicious version of EasyLoU or a malicious script will steal your LOU/LOA or Steam credentials or cause other damage. You assume the risk and full responsibility for all of your actions.
Keep in mind, there is always a possibility that a malicious version of EasyLoU or a malicious script will steal your LoU/LOA or Steam credentials or cause other damage. You assume the risk and full responsibility for all of your actions.

Also: don't be evil.

Expand All @@ -104,7 +129,7 @@ Legends of Aria is copyright of [Citadel Studios](https://citadelstudios.net/).
Legends of Ultima is copyright of [Legends of Ultima](https://www.legendsofultima.online/).
Lady Binary is a tribute to Lord Binary, who was very active in the UO hacking scene (see for example [UO_RICE](https://github.com/necr0potenc3/UO_RICE)).
EasyLoU is of course inspired by the great [EasyUO](http://www.easyuo.com/).
The LOU part of EasyLoU is a tribute to [Legends Of Ultima](https://www.legendsofultima.online/), whose passionate staff have dedicated so much effort in putting together a wonderful product based off of [Legends of Aria](https://www.legendsofaria.com/).
The LoU part of EasyLoU is a tribute to [Legends Of Ultima](https://www.legendsofultima.online/), whose passionate staff have dedicated so much effort in putting together a wonderful product based off of [Legends of Aria](https://www.legendsofaria.com/).
The Lua engine is based on [MoonSharp](https://github.com/moonsharp-devs/moonsharp/), commit 4e748a7 plus minor enhancements.
The Text editor is based on [ICSharpCode.TextEditorEx](https://github.com/StefH/ICSharpCode.TextEditorEx), commit 1934da7 plus minor enhancements.
The Mono Injection code is based on [SharpMonoInjector](https://github.com/warbler/SharpMonoInjector), commit 73566c1.
Expand Down
1 change: 1 addition & 0 deletions SharpMonoInjector
Submodule SharpMonoInjector added at 84795f
99 changes: 0 additions & 99 deletions SharpMonoInjector/Assembler.cs

This file was deleted.

17 changes: 0 additions & 17 deletions SharpMonoInjector/ExportedFunction.cs

This file was deleted.

Loading

0 comments on commit a1baa58

Please sign in to comment.