Hi there. I would like to see some more .NET development around here, so I am going to try to help things out a little. Here is a project that you can include in your .NET project to access all the members of MQ2. It might need a little polishing here and there, but I have spent a lot of time on it and matched it against the MQ2 source and included documentation from the wiki to make sure it is complete.
How do you use it? This was created with vs2005, so if you only have 2003 you might need to make your own dll class. Here is a sample program of how to access the members. To make it, just create a new windows application and paste this into Program.cs. Then add a reference to Lavish.Innerspace.dll under Project->Add Reference. Then under Project->Add Reference again, add another reference to EQInterface under the Projects tab.
Code: Select all
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using InnerSpaceAPI;
using LavishVMAPI; //For framelock
using EQInterface; //You only need this if you want to directly access the base objects
using EQTopLevelObjects; //To access the MQ2 TLO's
using IS = InnerSpaceAPI.InnerSpace;
using LS = LavishScriptAPI.LavishScript;
namespace EQBot
{
class Program
{
static void Main()
{
Me me = new Me();
EQAltAbility aa;
using (new FrameLock(true))
{
IS.Echo("My name is " + me.Name);
//Note here I am assigning the returned object to an EQAltAbility object.
aa = me.AltAbility("Celestial Regeneration");
if (aa.IsValid)
{
IS.Echo("I have the AA ability celestial regeneration.");
//Note here that I am directly accessing the EQSpell object from EQAltAbility
IS.Echo("It heals everyone around me within a radius of " + aa.Spell.AERange.ToString());
}
}
Application.Exit();
}
}
}
I am excited to start developing for ISXEQ myself, and hope to see some more people catch on since writing code in VB or C#is much better than the macroquest script language.
There is only one thing remaining to do before you can fully write in .NET like you do MQscript. We need a way to catch console text inside .NET. I will be working to find a way to do this and post here when I discover it. If you can help, please reply here with an example. I'm thinking the source for macroquest itself will need to be changed to add a LavishScript event for console text.
Post any bugs or questions to this thread. Thanks.