Friday, August 31, 2007

How should Blizzard respond to botting

I read a interesting post on World of Warcraft botting,
Below is part of my response:

There will always be botters. That is because anyone with a real job and life will be hard pressed to squeeze the time to grind to 70, or spend 5 hours in raids. Instead of trying to ban botters, Blizzard should think of ways to please the gamers better.

Below are some examples that I could think of:
1. Create dungeons that are soloable, but hard enough for the stupid bots.
2. Add more XP/rewards for quests to encourage players to play instead of botting.

Have you ever tried to block the flow of water in a stream? See how hard that is? If you try to lead it away, it is much easier. Always lead, don't block.

good business and bad engineers

I was doing some re-structuring on one of my company's project, and immediately noticed how bad the project was written. It is almost like the guy who wrote it is fresh out of college or don't know the language at all. I was wondering how our company (which was still young) survived the initial period.

What can be extract from the above is, you don't need good engineers at the start if you want to start your own company. As long as you got a good idea and have a good business sense, you can afford to hire crappy engineers from the edge of no where (at least initially). The important thing is to push the product out (no matter how bad it is).

Now looking back, if that kind of engineer was hired here today, he/she won't survive a week.
So in a business word, if you are the owner, your priority is to push your products out first, even if it is still buggy. If the product is there, people will use it. Once you made it, you will be able to afford better engineers and fix all the mistakes you made in the past :-)

Just my 2 cents.

Thursday, August 30, 2007

Stupid mistakes ....

I finally found out why sometimes zoloFighter run around without attacking. It is not bad memory reader, not timing issue, not priority, but I put in a line of code that if not full health, ignore all mobs! Must been there for a reason before, now it is just causing headaches.

Also found two cool fan site, and
The second guy even went to BlizzCon, I wish I could have been there (or I might been there without you knowing :-)

Wednesday, August 29, 2007

The way zoloFighter should be used

Fighter is meant to be used as a supplement for your questing. When I first enter Outland, I run fighter and it estimates I will level in 12hours, and during the late level 60s, it jumped to 30+ hours. The first impression was, this is going to be impossible.

As I get impatient, I started to do questing, and as you guessed, huge huge differences. After a bunch of quests, most of them solo-able, the time dropped dramatically, and I was able to leave it farming over night and be confident that the next day I will find it leveled (not recommended to leave it like that). Not only that, the quests give great items and I was able to get much better equipment then farming.

So the moral of the story is, don't be too lazy and use the bot for everything. Quest reasonably, and use zoloFighter to fill in the blanks. The best will be, 50% questing and 50% boting while you and your girlfriend/wife/family members having fun.

This way, you are having fun, enjoying the vast content Blizzard created, avoiding the boring grinding, and at the same time, you can afford to relax on the questing a bit (doing green quests are much easier and less annoying then the yellow/red ones).

Now enjoy!

Monday, August 20, 2007

Java, C#, C++, why C++??

Last Sunday while boting, I noticed bot stopped with an "Unknown Errror" in the log. I do a catch on all exceptions in the main loop, and the unknown error is usually memory access exception (using memory that has been freed).

This was not a problem before, but since javascript is introduced, there are just many more ways for this to happen. Example, native code calls javascript code then call back to native code again, where some of the previous auto functions might became recurisive...

This bring up another interest question, why I didn't use C# at the begining? That will make all of memory access problems a NULL problem.

Well, in the very begining, I had 3 choices, Java (my previous favorite), C++ or C#.
Java is out because it is kinda slow (at least feels) and the bot uses too many windows APIs and JNI is a pain in the axx.
I almost pick C# but at the time I am not very familar with it and don't want spend time to find the invoke syntexs.
So I used C++ for testing and modeling, and what begins as an fun poking around habby turned out to be a full blown bot.
And now since all of the stuff already written, I don't want to convert any more.

After all, if I know the scope the current project is, I would not write it in the first place. They all comes small, like all my other proejcts, open source or not.

javascript (spidermonkey) embedding pitfalls

Here is some experiences I had with Mozilla's spidermonkey during my attempts to embedded it into zoloFisher and zoloFighter.

1. the engine is built for speed, not much around user friendliness. Examples will be, engine provides INT_TO_JSVAL, FLOAT_TO_JSVAL macros, but if you look at them, they simply uses part of the bits ON THE VALUE itself to mark them as int or float (or object). So what value you can put in them are restricted, the macros are just a faster way to make jsvals when permits. To be on the safe side, always use the js_MakeNumber functions to make an object out of it.

2. If you compile with VC++, certain macros are not compiled correctly (visual c++ problem). So if you ever wondering why some exception was generated during GC under certain conditions or why 'new Array()' won't work, move 2 of the macros in jsobj.h, OBJ_SET_PROPERTY and OBJ_GET_PROPERTY, make them functions (VC++ still sucks in compile, but great to use).

3. Last but not the least, when compile, always define XP_WIN

How to do finally in C++

A couple of days ago, I was trying to add some new functionality to zoloFighter, and run into some trouble with the
} finally{

block, VC++ complained about some unfolding stuff. The __try{}__finally{} block is used to clean up the javascript engine, so even if some exception has been thrown, the engine don't leak memory.

I don't want to remove the try/finally block, but I am tired tweaking my code around to fit it. So some internet search later, I found a post with a great idea (sorry, I lost the post, because I was too lazy to blog right there).

allocate resource
class doFinally{
release resource

doFianlly f();
do your stuff;

Very smart. Just want to make a record about it.

Why create a bot?

Finally, I have created this blog. I wanted to do this for a long time now but keep delaying because of lazyness.

Anyway, like many people, I am a computer Gamer, currently playing World of Warcraft (WOW).

About a year ago, I started playing WOW because of my friends. We are a close group of friends playing C&C, Diablo since college. We just want to get the good memory back, and yes we had a lot of fun playing WOW together. Initially I started about 2 weeks late then my other friends, and that translated to about 10 level of difference (when we started). Oh God that 10 level is a huge difference. We tried to play WOW like Diablo II, but I just can't survive, you can't hurt mobs 5 level above you, that pretty much prevented me from playing with my friends! Yes there is a rest bouns, but since we are so new, none of us have much use of that. Also most of us are married and have a day job, so it is impossible to play the same style when we were in college (Yes, huge difference). Beside that, Wifes, Girlfriends all have huge impace too, so for us working class, there is no way we can spend more than 3 to 4 horus a day playing.

The initial excitment around WOW also caused major argo upon my wife. With the 3 to 4 hour of my life each day spend to WOW, I don't have much time with her any more. Well, I tried to get her to play WOW, but she doesn't like the 3D interface. The argo was so bad the tension is killing me (imaging half way in a dungen I have to hold all my teammates and go argo management on her).

WoW also has other interesting spots, like professions. Very usefull but very time consuming! One day while I was fishing, I got so bored and I thought, this should not be done by me, this should be done by a program! As a engineer major I was interested in computer programming since highschool, so a fishing bot is piece of cake. Basically image recogination (finally stuff learned in school became usefull). At the time I was not aware of any EULA etc, but since I am the only user this is no big deal. The result? fishing 300 without much argoing from wife Smile And ZoloFisher is born (At the time I call it WowFisher), if you are interested check out at

So why stop there? why not making a Fighter bot? I am no stranger at hacking, back in college years, I hacked school's network (appletalk share), various games. I still remember we laughed so hard one day when I helped my friend with a hacked c&c beat a much skillfull player, and of course diablo fix file offsets etc. I was a warrior with a ton of mana and a mana shell top of my head. One PKer with a huge axe tried to kill me, and got a huge surprise instead Smile

OK, long story short. hacking started. @#@$%^$E%! WTF?? This is not the old C style game any more, this is post Y2K DX9 MMORPG!! The hardware mapped memories, uses of std library, threads OMG. Well, I am no average programmer either, I have a wide range of interest, from how CPU works (back in high school, read that whole book), embedded systems, linux kernels , C/C++ to Java, C#, php, I know a lot of crap. This is certainly different than when I was digging RFCs, but presistance paid off (You will know what real presistance is if you are debuging on a 3 year old single core machine with a 5 year old graphics card, dumping 300mg of memory and analyzing on it).

With the initial link open, the rest is to implement a program to take advantage on it. All it remains is to read my position, and find the nearest mob, and keep pressing the same set of keys over and over till the mob is dead. I was so happy! I still remember the first day when I was testing out the turning, that was learned either from high school or mid school (tan, atan etc), at last have some real usefullness. why we need schools? The stuff I learned from school, beside reading and basic math, most are useless (Well, history is very important, if the teacher is good, you will learn the mistakes of your predcessors, if the teacher is bad, you learn the event and forget afterwards).

Well, that is pretty much how zoloFisher and zoloFighter are born. Wife still argos, but not as badly, most of the time I just need to setup the toon and check back once a while, and I am very proud of my work, so I decide to share it out. That was a hard process. If the product is just for you, you don't need to make it user friendly at all. Now it must be user friendly (that is good to me too, the initial row product is very very hard to use, even the waypoint has to be set 1 by 1). Also I found the EULA, and because the bot will be open for inspecting, proper hidden method must be used. To make the product flexiable, javascript engine from Mozilla is embedded so other engineer types can use it to customize the fisher/fighter to their own needs. Initially it is used to let people add their own whisper engine.

Well, I will stop here today, back to work now.