Jump to content

Recommended Posts

Ok bascially a week ago I decided to look on the internet for way to create a program that would level my charater on The Realm Online without me having to be there. I had used somone elses program to do so in the past but all along I had wanted to create my own because I saw things in it that could use improvements. The program basically makes the character enter a cave and cast heal on himself one time and then cast a protection shield on himself. After doing that It would commence battle and automate the battle process. When the battle was finished it would leave the cave and then start the process again.But because it only healed once during the process it made it very difficult for lower level characters to complete the process for long because they would eventually die during the battle due to lack of sufficient health points.

So I decided I wanted to make my own program and add something so the user could adjust the amount of heals per run. I had never "coded" anything before except a few websites in HTML and PHP so I wasn't so confident about trying to code my own program. This is when I discovered AutoIt and decided to give it a try. I was surprised on how fast I caught on.

At first I was just going to change the value of the ammount of heals I wanted it to do and then recompile it when need be, but then I decided to add a GUI and make it changeable by the user every use without having to recompile it. I then had the idea of adding the amount of runs it did before terminating and added that to the GUI for the user aswell.

Because this game is rather old it has a few issue, one of which is the games runs out of "handles" and subsequently it will crash. So I added some code so that if the number of runs reached thirty that it should close the game, rerun the game, log back in and continue the process.

I was content with it for about a day and then I realized it lacked something, a way to have it repair my armor and weapon every so often so they wouldn't break and also eat food. If the armor and or weapon breaks it dissapears forever, unlike some newer online games such as World Of Warcraft in which you can repair a broken item and then it becomes usable again. Also in this game you have to periodically eat something or you will die, so I decided to add code to do this aswell during the same time as repairing armor.

If you go to The Realm Online website you will see that the game is 2D and traveling around in game involves clicking an area and it subsequently it will move your character there. When you want to leave an area you click near the edges of the screen and it will go to the next area. The game was made by Sierra back in the early 90's and is coded in mostly in SCI. SCI is the same code that the old Sierra games were made out of, such as Quest For Glory and Kings and Police Quest. Because of this it made doing almost anything code wise a little more challenging because the buttons in game are not controls they are just considered areas of the screen. Like when the time comes to click on the spells button and select a spell I have to have it just click an area on the screen rather then do a simple control click of that button.

The problems that I have run into are during the process in which it teleports from the cave to a town and then walks through the town untill going to the place of repair and then repairing. The process of teleporting makes the mouse cursor change from zero, which is the normal cursor, to a cursor of fifteen which is the loading hourglass. So I tried to use that in the code to determine if it was in town yet. This idea worked. But the problem I'm having now is that when its finished teleporting to the town it is told to click on the right side of the screen to start heading toward the area where its is going to repair. The problem lies in the fact that when you click the right side of the screen the screen the character has to walk from its current position to the edge of the screen and then it switches. But on some ocasions randomly it will do this instantly, so when you click the side of the screen to change the area it will start the process of changing screen instantaniously instead of waiting for the character to walk across the current screen.

I refuse to use the Sleep() in this situatuon because it wouldn't be accurate if it changed instantly. Ive tried to use the PixelChecksum(x, y, x, y) but if something else move in front of the window or somones characters walks in that area it will mess that up as well. Ive also tried a Do Sleep(100) Until MouseGetCursor() = 0, but some times while loading the next screen it will change from the loading cursor of fifteen to zero and then back again in a split second which also fouls up that idea too. Ive tried to get some sort of unique id from each screen and I have yet to find one.

Even if I can get it to switch the screens and repair, an even harder task awaits, the journey back to the cave. On the way back to the cave it is possible to get ambushed by monsters and subsequently it would need to flee from the fight. I tried making some code to watch for the window that pops up in combat, the combat action buttons, and if it sees that to click the flee button. But I have no idea how to get it to look for that window and then if it sees it click flee untill out of the battle while changing screens untill getting to the cave location at the same time.

Ive been working on the same bit of code for these two processes for about 3 days now and I have yet to find anything close to a solution for my problems.

Is there a way for it to do more than one thing at a time? Since I have been using AutoIt it seems that it always does things in steps and it can't do more than one thing at a time.

I would like it if anyone could give me an idea of some sort on how to accomplish these tasks.

If anyone wants to see the code I have so far, I will gladly post it apon request.

Thus far I love AutoIt and want to thank all those that contributed to make it! :lmao:

Contact Info:

Email: denied@deniedproject.net

AIM: DeniedProject


- Matt AKA Denied

Edited by Denied
Link to post
Share on other sites
  • Moderators

Ok bascially a week ago I

Thus far a love AutoIt and want to thank all those that contributed to make it! :lmao:

Reminds me of the days of my teachers complaining of Run On Sentences.... Above quote is all I caught or even bothered to read of that... Try to sum up what your looking for (and use the Enter button to seperate blocks of information).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
Share on other sites

Reminds me of the days of my teachers complaining of Run On Sentences.... Above quote is all I caught or even bothered to read of that... Try to sum up what your looking for (and use the Enter button to seperate blocks of information).

It would be hard to sum up what I need help with if you don't understand the situation. To understand the situation you must read what I said

Link to post
Share on other sites

Okay - I do not like a one line request for help and no code from the OP... but 1198 words in one paragraph must be a record first post...

...but welcome to the foums anyway :-)

LOL, I'm really tired and just sat here and typed it all out not realizing what it looked like. I'm sorry if it hurts your head to read it all. And thank you for welcoming me. :lmao:

Link to post
Share on other sites
  • Moderators

Is there a way for it to do more than one thing at a time?

You can run multiple scripts and use FileInstall() to include them in the original, and call them as needed. You can use AdlibEnable() to call to a specific function to do something at a specific interval of time.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
Share on other sites

I glanced over it and saw bold, and so I thought I'd address that.

First one I found on the topic:


My revelation:


Basically, I chose to use a3x files to run multiple scripts (which would do two things at once, but not within the same script). It works quite well for me, especially if little to no communication is required between the scripts. If communication is required, you can use command line parameters to start a subscript with certain features, and after that you're probably going to have to use StdOut and StdIn (which has varying degrees of effectiveness depending on who you ask) to send data back and forth.

Forgot to mention: you will need to FileInstall the a3x files, as with the other files, but this way you'll save a lot of space. Instead of having several compiled scripts (each about 150 kb .exe's), you'll have the main exe and several small a3x files, which tend to stay the same size as the script itself. The only difference is that you have to run() the a3x file like this:

Run (@AutoItExe & " /AutoIt3ExecuteScript " & $ScriptName)

Also, when you run an a3x file, it will have the same process name as the original script: therefore, you'll want to specify differences with PID.

Edited by greenmachine
Link to post
Share on other sites

umm this kinda hard but the bot you can only use that is created by thousand of people is uhh only 1 kind of enemy


Goblin - main color bluish green

then if there's no more goblin what will happen??

wait for hours so another goblin appear

and what about if you die hard to create a bot map solutions the x y z exis

you need to create a verrryyyy long script for this I tell you

New Owner of this AU account

Link to post
Share on other sites
  • 4 years later...

I know this is incredibly old lol. But i actually am too trying to make a macro with autoit for this same game, to do the same thing. Can someone point me in the right direction. Im a fast learner, not a comp noob at all. And ive done some coding before, just not with this program.

Link to post
Share on other sites

Also, this game has no rules against the use of macro's or bots. Its not frowned upon whatsoever. The game is from the 90's. So im hoping that it will cancel out the game bots announcement, seeing how bots and macros are allowed.

If a game's EULA or TOS explicitly mention bots are not allowed, discussing ways to automate that game is not allowed here. Likewise, if a game features an online multiplayer component and you are attempting to automate it, discussion of such bots is not allowed here

Seems very clear that the rules of the game do not matter in this subject. However this should eliminate any doubts.

Non-Automation Clause: You will not make use of any device or means to automate and/or to provide for unattended gameplay in The Realm Online. This includes all forms of macros and disability features present in any operating system. Exceptions for legally or medically qualified disabled persons will be granted upon receipt of proof of the individual's legal or medical status.

Edited by Tvern
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...