06 May 2018 Tagged: eulorac++

I’m posting some notes regarding my recent hacking activities on the Eulora client. This hacking has mainly been bot stuff: some fixes and enhancements. As a prelude to some detailed bot surgery posts, consider this the story of how I found myself on this road.

I read about this game called Eulora which purportedly sports a bitcoin economy. Intrigued, I set about to see this for myself. The Eulora wiki has an install guide for Windows so I decided to use a Windows machine I’ve used for previous games. The guide has instructions for compiling the Eulora client from source, but also points to a binary distribution which is what I went with. I have no comments about installing the binaries other than to say it was quick and problem free.

Having installed Eulora 0.1.2, I logged in and set about figuring what’s what. From what I saw, figuring things out seemed central to the game. I figured out how to do some digging quickly enough. But it took me a big longer to figure out how to actually extract anything from my dig. Once that puzzle was cracked, I set about walking the territory digging here and there to see what could be found.

A helpful player gave me a noob quest and after its completion offered to buy a quantity of some specific type of reed I may happen to dig up. It took me some time to find a good dig location for these reeds but once found, I did a large number of these digs manually. It seemed there was a bot built into the client that would grunt out those digs for me, but I decided to make sure I had a good grasp on the situations the bot would be required to handle before trying to activate that machinery. After all that clicky-clicky, I was well ready to test drive that bot.

Once I figured out the parameters to make Foxy’s Bot dig, I was off to the races. Except not quite. The bot would dig, but then immediately lock the claim and move on instead of extracting the resources. I spent a while trying different parameters and reading the help. In short order I decided to go to the source. The wiki helpfully had a link to download the client source code.

A little investigation revealed the following

botactivity.cpp
else if (text.StartsWith(CLAIM_PLACED))     (1)
{
        exploreFinished = true;
        noBuild = false;
        size_t end = text.FindLast('!');    (2)
        size_t start = CLAIM_PLACED.Length();
        csString thingName = text.Slice(start, end-start);
        if (thingName.StartsWith("Tiny"))
                claimType = csString("Tiny");
        else if (thingName.StartsWith("Small"))
                claimType = csString("Small");
        else claimType = csString("Unknown");
1 Parsing the beginning of the line (where CLAIM_PLACED = "You placed an ").
2 Parsing the end of the line.

The above code snippet is a chunk of the bot’s message parsing code. Below, the message being parsed:

Eulora Dig Message
You placed an Tiny Rickety Reeds Exploration Marker.

So then the problem was clearly that the bot was expecting the line to end with '!' when the actual server message end with a '.' That made the bot unable to recognize my tiny claim, instead falling though to the "Unknown" claimType. Since the bot didn’t know know how to deal with that type of claim, it just locked it and moved on.

Granted, I do not know C++. However, replacing a single character and re-compiling sounded trivial.

Thus began my Eulora hacking journey.

Sunset
Daniel P. Barron - 2018-05-19 01:54:18

Seriously?? It was a single punctuation!? Bleh.

Diana Coman - 2018-05-19 07:04:59

Ahaha, well done! That ! must have morphed into a . at some cleanup.

You might find the posts on Foxybot helpful to figure out a bit what goes on and how. This for instance: http://www.dianacoman.com/2017/04/13/bundling-with-foxybot/

As to C: you can certainly write the client in whatever you want. And for that matter Ada would make for a much cleaner and saner code for sure.

Mocky - 2018-05-19 12:34:58

Great link re bundling activity, thanks. OMG I wish I had seen it last week before I wrote a loot activity for all the keys / lbn I had been dropping.

I need to go though your archive more closely.


Add a Comment