Friday, February 29, 2008

law and order

This is a post I did on the forge. Repost to here so I don't forget it.

It is freighting that our sociality are not controlled by lawyers and judges. The law became so complicated in areas that lawyers can use it to sue just any one no matter right or wrong. One story on 20/20 a few years ago is a lawyer suing a disabled businesses owner because his building didn’t have ramp access (I think it is in CA where they have a disability act that states each building must have ramp access for wheelchairs).

A good example of run away judges is Florida supreme court rules school voucher are “unconstitutional”. See http://en.wikipedia.org/wiki/School_voucher (by the same argument they can see public schools are also unconstitutional). Another big example is the Eminent domain, anyone with a brain should know it should not be a way for government to take your land away for pennies.

The big reason behind run away lawyers and judges are, we now live in a established world, and no one takes leadership. So judges/lawyers are now the aristocrats of the per-revolution French era. Back 200 years, with strong leaders, judges knows they are the weakest of the 3 branches and will not try to make laws (even though raw power takes over, it is still better than one man’s rule).

Remote view program simi release

The last release was bad (only a simple test prototype).
This one is much better, still no documents but at least it can now show/hid players, mobs and current game image upon select, continue showing them without need to click, and if you move your mouse over the the red and blue dots (red=>mob blue=>player) it will show their names.

I will temporarily stop development and have some fun, so next 2 weeks will be my vacation from bot development.

Thursday, February 28, 2008

zoloFighter 0.7.9.38b, with flying & mine support

Original idea is from John.bastos. He want to fly and mine in outland. zoloFighter can mine but because mines usually are on edges of cliffs, mining is not easy with a bot. John's idea (flying around and land for mine) solves the problem.

The implementation is easy. First I added a file fightermodes.txt, you can add any new modes in there and it will show up in the mode dropdown box. I added fly&mine.

So select that, flying around and set waypoints (bot will try to fly back to waypoing when done), and click fight it will go flying and mine.

When a mine within 30 yard is detected, bot will turn to it, slowly fly to top of it (you will see it does that step by step), slowly lands on top of mine, mine/mount/fly back to waypoint.

Right now it is only a beta, need more user to test it.

I tried it in Nagrand, because that place is full of Fel Iron and Adamantite deposits. Debugging is not easy. It is a slow process. First you need to find a mine and second you need enough time before it is looted by others.
While I was testing on the first mine, another player beat me to it while my toon is landing slowly...

Wednesday, February 27, 2008

Essays by Paul Graham

http://www.paulgraham.com/articles.html

The above link are essays by Paul Graham. I am posting the link here hoping more people can be influenced by his thinking.

People everywhere in the world should be more creative and independent, especially young people who has nothing to loss. God knows how many new wonderful things can be created, and in the process of benefiting others, they them selfs might became rich too :-)

Monday, February 25, 2008

Ban!!

Recently there are 2 banned user reports on the forum. When they first appear I feel the pain.

One guy farmed primal life and crashed server economy (He did get his account back though grats to him), the other simply bot for 2 weeks and get his char from 10+ to 50+. I think that is moderate... When I was rushing to level 70, I got impatient at the end and starting to run it full night, and my speed was about 1 month for 2 chars from 60-70 (and with me questing too, because it feels very slow to just grind).

Anyway, more steps will be build in to prevent banning. I will add back whisper auto reply (replaced by javascript but no one is implementing their own...), and add remote control so we can monitor/reply while at work or school.

Thursday, February 21, 2008

Guild drama

Well, recently our small Guild was rippled with tiny frictions between 2 of the more active members. Even though my wife still doesn't like WOW, she was draw to my email like fly over wet sugar.

For my own security I will not disclose the details, I just have to say the drama played out rivals that of Shakespeare quality. Quit amazing how tiny things can rapture relationships :-(

Wednesday, February 20, 2008

Wealth is created

Well, I have tried to figure out how the entire economic works (mainly try to profit from the stock market but failed). Yesterday I suddenly had an idea. Wealth is entirely created. Any wealth that is not part of our basic needs is totally imaginary.

Now here are the base of my theory:
1. When there are not enough for our basic needs, we must spend our entire time for those (gather food, find cover). However when our basic needs have been met, people will start to have extra demands. Mainly better living conditions and entertainment.
Both are CREATED. You need creative minds to give us better/cool things to live for and desired. Desire generates spending.

2. Money is only a media for us to get what we want. Money itself has no meaning. If there are enough people to create wealth (or items to be desired), Government can print a lot more money and still cause no inflation, because there are more items to be desired. An ultra simplified example will be, before there are $100 on the market and 100 items people want, so each cost $1. Now government prints $900 to balance its budget but people has created 900 items that other people want, so each item is still $1.

3. When we enter the industry world, machines start to take people's job away. Well, another way to see it is machines freed people to do other things! For example, a factory that produce cars need 1000 people to run before, and with machines it only needs 1. Now not only the car produced is cheaper, there will be 999 people who are free to invent/create other things.

So who lives better? An ultra rich guy 200 earlier or a poor guy in current US?
The rich guy might be rich but he doesn't have electricity, toilet and all the other convinces, how much gold will that rich guy willing to spend to get all the cool stuff we have today? So each of us are rather rich :-)

Tuesday, February 19, 2008

Fun of implementing a IMAP server (part 2)

So after my IMAP server works with Outlook Express, I tried it with Mozilla Thunderbird. Well, Thunderbird reported my IMAP server is not a IMAPv4 server. Scratch my head I can't figure out why, downloaded Thunderbird source (the power of opensource), and the source tree is HUGE!! Finally found where it is doing IMAP, and everything looks normal.

So I print out the request/responses of the IMAP connection from Thunderbird. the problem is when I reply the CAP request, I responded with:
* OK CAPABILITY .....
and Thunderbird think the response is for OK instead of CAPABILITY.

So that is solved. Now Thunderbird won't show any items in folders. Again the source! Well Thunderbird expects UID # in each response, even if the request didn't see UID in tags. And Thunderbird doesn't like RFC822.PEEK to return the full body (I was returning the entire thing to Outlook Express when I see RFC822.PEEK tag). So Thunderbird is more strict in compliance, where if they want header just return the header instead.

Anyway there were a lot of other problem alone the way, but those are boring ones :-)
Next week I will install my IMAP/SMTP service on our server, because wife doesn't like to risk it. The one big advantage of my own implementation is delete/move is ultra fast (because each email is a single file), where UWIMAP uses mbox format, delete/move is extremely slow.

Thursday, February 14, 2008

Fun of implementing a IMAP server (part 1)

IMAP is beautiful. Long time ago I don't like IMAP, I think it is bulky and slow. However after a couple of HD reformats (when I was young that comes often), the advantage of IMAP is obvious. All mails are on the server, no need to restore email after a reformat.

So after we moved our wonderful linux server to windows (well, the only reason is to run sqlserver on it so I don't need to let wife start her computer when I need the sql server),
I am having a hard time to find a simple IMAP server.
There are a lot on linux (I like dovcot) that works very well, but on windows is a different story.
The default windows IMAP server is Exchange, which is bulky and needs Active Directory?!! Forget that.

I am using cygwin with uwimap and exim. They are OK, the only problem is my wife keep complaining about some of her deleted mails coming back. And I don't like the mail stores, it is mbox format, big and hard to maintain.

So I wanted to implement my own IMAP server for sometime now (only need a easy to use one), haven't started on it till recently.

The first thing to do is find out the IMAP protocol. Plenty on the internet.
Then implement the easy ones, login, select... No problem.
Then comes the UID ones (FETCH/STORE), that was some job. It took me a while to figure out what you are supposed to return on RFC822.HEADER. I used to return everything.
Up till then it is always using a mock store. I decided to use my own mail store format. Files! I don't want to involve a database server.
My mail formats are: each email is in the format of eml_[uid].eml. And tags stored as eml_[uid].eml.[tag$]+.tag, for example eml_112.eml.Seen$Deleted.tag
This way the emails are easy to backup, and save me a lot of extra indexing work.

A simple SmtpServer is also needed. I wanted to use Microsoft's default one, but that one is not suitable, sometimes it locks the files in directories and I can't move them.

There are quit some bumps doing this, I will add them in when remembered.

Tuesday, February 12, 2008

Supporting pains

As zoloFighter got more and more popular (now way surpass zoloFisher), the pain of supporting is also getting bigger and bigger. Every day there are people asking the repeating questions such as how do I start, why can't it be started (even tough I have made the forum avaliable.

And also sometimes bot won't start on someone's computer even though they followed all steps. But you never know what was the user doing, sometimes they do things that are surprising to you. I remember one instance when I helped one of my friend's friend on his internet connection (he kept complaining about how slow his cable modem was), and eventually found out he was using someone else's open wireless connection (and his 1MG+ bandwidth was totally wasted).

Saturday, February 9, 2008

The locale problem is solved, I have posted on my forum. Basically MS set locale to "C" in C++/C programs, but use native locale in .Net apps. So I just set locale to en-us in .Net and now their outputs are compatible.

Friday, February 8, 2008

floating number format issues

It just come to my attention that in Europe and Russia, floating numbers are displayed differently. For example, 1.0 in US is 1,0 in Europe, and 10,000.00 is 10.000,00 is Europe. So basically my action delay of 1.5s (1 and a half seconds) could be parsed as 15 seconds!!

I am getting conflicting reports on this one. User reports says it is taking the '.', and a friend of my also told me Fortran and C++ libs uses '.'

Microsoft's website indicates other wise. It indicates to use locale independent atof,I need to use atof_l.

So I am really lost. And to write my own implementation means I need to find every place where printf, ostream, atof are used and replace them. Too much work.

And also my configuration utility, which is written in .Net, always print out in the format of the current locale.
This makes me sick!

Thursday, February 7, 2008

Set ACL

While searching for a way to open WOW's directory to guest access and protect bot's directory from been poked by guests, I found SetACL, by Helge klein's

So I reused his program, and wrote my own to generate scripts to add guest access to WOW's directory, and remove guest access to bot's directory.

http://www.zolohouse.com/wow/wowFighter/tutorials/troubleshoot.html

Monday, February 4, 2008

German guest account name

Today another user on mmowned posted about can't use zolofighter to start WOW.
Since there are quit a few people complaining about it, I decided to try it myself. Doing it over lunch, what I did is add a guest user named Gast, and set GUEST:guest in settings.txt to GUEST:gast.
Surely enough I got the "Can't start WOW" message.

What happened is, a few month ago I switch the entire program to UNICODE based, so Asian players can see the correct outputs. But since settings.txt is still ascii, I used a windows api to convert it to Unicode. The problem is I specified the type to be UTF8 instead of ascii. So while it converts all ordinary ascii chars correctly, Gast is not one of them. It got converted into "gst".

So, another release.

Friday, February 1, 2008

busy days

I was so busy recently that I had to do something I recommended my users not to do: bot AFK. Start from morning till I got home at noon, so 4 hours each day is not that bad, generate some extra cash :-).

I have been doing this for 2 weeks now, with some days I don't even have time to start the bot. Well that is not exactly bad, because it generate some randomness on my bot patterns.