<<Check the later posts. We are up to a partial but increasingly full (and working!) wrapper for ISXEQ that lets you find MOB's, target them, and attack from any .Net language.>>
I've been playing around with Everquest under InnerSpace and trying to understand Lax's copious documentation in the Wiki. Here's a working snippet of code that shows how to get a C# program to display your character's loc onto the InnerSpace console. I'm posting here because some MQ'ers who are slightly curious about InnerSpace don't frequent the other IS boards, e.g. ISMods.com or Lavishsoft.com. And a couple of days ago I would have been glad to get a tiny example that just compiled to a runnable console program.
Now my question to the knowledgeable developers out there is: 1) Now that I can, clumsily, access TLO's, how would I go about initiating in-game actions from within a .NET program? e.g. moving, attacking, casting, etc. Is this a matter of sending KeyPress commands etc.? <cringes> and 2) The following shows one way to read ISXEQ objects from C#, but it would seem a lot better to have the whole ISXEQ data exposed to .NET through a wrapper. Would this be a big deal? I notice that most of the other games that run under InnerSpace (EQ2, Vanguard, WoW etc.) have such a wrapper available, but, ironically, EQ1 does not.
OK, here's my example. If you set it up as a C# Console App under VS2005 it should compile cleanly and be runnable from the InnerSpace console. Feel free to point out flaws:
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using InnerSpaceAPI;
using LavishVMAPI;
// This is an experiment to play around with how to access ISXEQ Top Level Objects from .NET.
// It's a console app that should display your character's name and location on the InnerSpace console.
// To run it, so far I am feeding the IS dotnet command the full line of text that gacutil creates. For example,
// at the InnerSpace console I type:
// dotnet "ISXBasicAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=48f786b573cdbb7f, processorArchitecture=MSIL"
// There has to be a better way to do this, but it works for now.
//
// To set this up in VS2005, follow the instructions in
// http://www.lavishsoft.com/wiki/index.php/NET:Tutorials:HelloWorld
namespace ISXBasicAccess
{
class Program
{
static void Main(string[] args)
{
using (new FrameLock(true))
{
EqMe myGuy = new EqMe();
if (!myGuy.IsValid) InnerSpace.Echo("myGuy.IsValid=false");
InnerSpaceAPI.InnerSpace.Echo("Name: " + myGuy.name);
//InnerSpaceAPI.InnerSpace.Echo("ID: " + myGuy.id.ToString("D") );
InnerSpaceAPI.InnerSpace.Echo("Loc:" + myGuy.y.ToString("F") + "," + myGuy.x.ToString("F") + "," + myGuy.z.ToString("F") );
}
}
}
public class EqMe : LavishScriptAPI.LavishScriptObject
{
public EqMe()
: base(LavishScriptAPI.LavishScript.Objects.GetObject("Me"))
{
}
public int id
{
get
{
return GetMember<int>("ID");
}
}
public string name
{
get
{
return GetMember<string>("Name");
}
}
public int level
{
get
{
return GetMember<int>("Level");
}
}
public float x
{
get
{
return GetMember<float>("X");
}
}
public float y
{
get
{
return GetMember<float>("Y");
}
}
public float z
{
get
{
return GetMember<float>("Z");
}
}
}
}

