Archive

Archive for June, 2010

IsSwimming, IsMounted

June 21, 2010 Leave a comment

I’ve had someone asking me how to determine if the player is swimming or not, and I answered: it’s simple, reverse the IsSwimming LUA function.

So, dig it up in IDA, and look for the following:

.text:006D855E                 test    eax, eax
.text:006D8560                 jz      short loc_6D8589
.text:006D8562                 test    dword ptr [eax+0A30h], 200000h
.text:006D856C                 jz      short loc_6D8589

Now, say after me, eax is where the local player is stored, and eax+0A30h is being compared to 0×200000, eax+0a30h is very likely to return whether we’re swimming or not.

public bool IsSwimming
{
	return ObjectManager.Memory.ReadInt(BaseAddress + 0xA30h) == 0x200000;
}

Should therefore make sense, right?

IsMounted is reversed in the same manner, and uses the exact same field, just a different flag:

.text:006D865E test eax, eax .text:006D8660 jz short loc_6D8692 .text:006D8662 cmp dword ptr [eax+9C0h], 0 .text:006D8669 jle short loc_6D8692 .text:006D866B test dword ptr [eax+0A30h], 10000000h .text:006D8675 jnz short loc_6D8692 public bool IsMounted { return ObjectManager.Memory.ReadInt(BaseAddress + 0x0A30h) == 0x10000000; }
I haven't tested this code personally, but I'm pretty confident it's accurate.
Categories: C#, RE

GSpellTimer, simplified.

June 21, 2010 Leave a comment

For the – by now, somewhat – old botters among us, and specifically those who used to make Custom Classes for Glider, you’ll know that Glider used a object called the GSpellTimer. The GSpellTimer was used extensively in Glider, and a sample of it shown here: Glider.Common.Objects.GSpellTimer. Now, I don’t know about you, but I find this functionality extremely useful when making Combat stuff, for example to use it for spell cooldowns!

As you may know, I’m currently working on a small gathering bot, which uses the Spectre Framework by Seifer as its main interface to World of Warcraft.

Now, I’ve coded a small, 20~ line of code class, which replicates exactly what the GSpellTimer did. And as per usual, some demo code:

public SpellTimer GlobalCooldown = new SpellTimer(1500);

if (GlobalCooldown.IsReady)
Logging.Write(“Global cooldown finished.”);

Enjoy.

Categories: C#, WoW

Back to the Basics: List Manipulation

June 13, 2010 1 comment

First in the Back to the Basics series: List Manipulation! This is probably the most boring, and tedious thing for the beginner-coder, if not done properly. Today we’ll be covering this stuff, along with a Visual Studio 2008 project so you can experiment a bit yourself.

Let’s shed some light on the structure of the application first, so you know what we’re working with:

  • One central Order class. This contains all the properties related to the orders.
  • One central List<Order>, containing all the Orders we have stored in our application.
  • Various methods, ie. Insert, Update, Delete. These manipulate the objects in the list, in a straight-forward manner.

So, with that out of the way, there are a few things I highly recommend you read up on – it’ll make your life a lot easier!

Read more…

Categories: University

Spectre

June 2, 2010 Leave a comment

In the coming month or so, I’ll be working on a project which goes by the name of Spectre.

It’ll be a ‘basic’ out-of-process bot for World of Warcraft, which may even end up being open-source and available to the general public.
Along with Spectre, I’ll be updating this journal again; posting some interesting pieces of code, and general methods and approaches.

So stay tuned, and it’ll definitely be worth your while dropping by every now and then!

Categories: C#, WoW
Follow

Get every new post delivered to your Inbox.