Jump to content
AC Tool Forums


  • Content Count

  • Joined

  • Last visited

1 Follower

About The WABBIT

  • Rank
    Forum Master
  • Birthday 02/03/1966

Profile Information

  • Gender
    Not Telling
  • Location
    Denver, Colorado

Contact Methods

  • Yahoo

Recent Profile Visitors

15,847 profile views
  1. AFAIK there never was a AC Tool Macro Vault. All available macros for AC was released by the individual authors here in the forums. Most of the threads for such macros are still here in the forum. But, most of the attached files (macros) may no longer be available. Something happened many years ago that had caused quite a bit of the file attachments within all of the forums to become broken. I wasn't active in the forums when that took place. So, I can not say what or why it happened.
  2. Well, as you have described your question. You state that the person who wrote this script is reading the excel file, with the script and using the values that is in the constants block. But, you failed to state what kind of Excel file. But, that does not matter. Because in that whole script there is not a single line of code. That has anything to do with reading any file. So there is no way this script is reading a Excel file. Heck, I can even tell if this is a complete script or only part of a script. But as I had stated, it is not reading any file. Now, if you really want to know what this script is actually doing. Then I would suggest that you open up the AC Tool Help file. And look up each of the different commands and read what they actually do.
  3. Ego, the way you have it coded. It will only return the Integer value of a random number instead of the decimal value. So, it will always return a value of 2. All you need to do is change one line to the following: compute Number = ($HI-$LO+1)*rnd(1)+$LO
  4. Since you obviously didn't read the Help file. And since you obviously didn't even bother to try to create a simple test script to try and do this key combination. (For which if you had you would have posted it here so that we can help you know your mistake, if you had any. And you didn't even bother to to at least let us know what kind of script you are trying to create. Or even for what game, or application, that you are trying to create the script for. But, since you obviously expect to receive the answer despite all that. Here is an very simple script for the current release of Divide. That will show you what you need to do in Divide. And yet it should not be that hard for you to convert it for use in AC Tool. If that is what you are using. uses Divide; begin Keys('@{Tab}'); end;
  5. I assume that when you open the Help file, you do not see anything in the Right pane. If this is the case, the problem you are experiencing has nothing to do with the Help file stating that it was created with a unregistered version of WinCHM Pro. This is a Windows 8 & Windows 10 problem. To get the help file to display its contents, goto Why My CHM File is not Displayed Correctly. Then follow the instructions for 3. Your CHM is Blocked by Windows Security Policy. This should take care of the problem. But, if for some reason this does not fix the problem, or the Unblock checkbox is not present. Then follow the instructions for 4. Your CHM File is in a Restricted Internet Zone. And set the value to either 0 or 1. The main part of why the script is taking so long. Is because of the number of pixels AC Tool is having to check 1,980 pixels everytime you check for the Ink1 Object. That is why I mentioned the following: You should now be able to use the help file now. At which point you need to go and read the Object Primer in the AC Tool Help file. Now I need to help you to understand what I meant by "Reduce the Object definition to only have the pixel information for the work Ink." With dealing with objects that are checking for text. You will have a certain pixels that of a specific color on the screen. And all of the letters will be of the same colors. Now, AC Tool does not work with the actual value of the color. (Like you would see when working with a typical image editor or when creating a website.) Instead it uses the individual RGB (Red, Green, Blue) values that makes up a specific color. Even then, when checking for a Object on the screen AC Tool does not use all three of the RGB values. Instead it gets the RGB values for the specific pixel. Figures out when which of the RGB values is the largest. And uses that to check if the pixel matches. For example, if a specific pixel has the following RGB values: R=75 G=189 B=94 When AC Tool checks that specific value it will use the value 189 to do the comparison. And when creating a Object, whether by the AC Tool's own Object Mapper or by the Paodas Object Mapper, the Object Mapper looks at the specific pixel. Gets the RGB values for the pixel. And uses the RGB value that is the largest value. Now when dealing with objects that re checking for text in the game. That text is usually displayed in the save color. And as such if you were to look at the Object created for the. You will see that you will have certain pixel that will have the same RGB value. And if you will to look at those specific pixels that have the same value. You can see the text within your Object. What you want to do is, remove the Object definition all the pixel information that does not belong to the individual letters for the text that you are looking for. Now, some times you may have certain pixels that are part of a letter. But, the RGB value is not the same as the rest of the letter. This is caused by the Anti-Aliasing done by the game. And these values tend to fluctuate. Since for these pixels, the values are constantly changing. (I refer to this pixels as the Unstable pixels.) You need to also remove those pixel information's as well. In the following Object, I took your Ink1 Object definition and removed all pixel information that does not belong to the individual letters. Object INK // Test at coords 3459, 274 230=049,05| 230=036,06| 230=049,06| 230=036,07| 230=049,07| 230=036,08| 230=040,08| 207=042,08|227=043,08|207=044,08| 230=049,08| 192=053,08|211=054,08| 230=036,09| 230=040,09|191=041,09| 198=044,09|201=045,09| 230=049,09| 193=052,09|198=053,09| 230=036,10| 230=040,10| 229=045,10| 230=049,10| 200=051,10| 230=036,11| 230=040,11| 230=045,11| 230=049,11|209=050,11| 230=036,12| 230=040,12| 230=045,12| 230=049,12| 219=051,12| 230=036,13| 230=040,13| 230=045,13| 230=049,13| 220=052,13| 230=036,14| 230=040,14| 230=045,14| 230=049,14| 221=053,14| 230=036,15| 230=040,15| 230=045,15| 230=049,15| 223=054,15| End Now as you can see, by removing all of the pixels information. We have reduced the Object from 1,980 pixels that need to be checked to just 51. Also, if you look at the values for each of the letters. You will see that for the n and k there are quite a few pixels that do not have a value of 230. These pixels are the Unstable Pixels, as I mentioned earlier. And as such we need to remove them as well, see below. Object INK // Test at coords 3459, 274 230=049,05| 230=036,06| 230=049,06| 230=036,07| 230=049,07| 230=036,08| 230=040,08| 230=049,08| 230=036,09| 230=040,09| 230=049,09| 230=036,10| 230=040,10| 230=049,10| 230=036,11| 230=040,11| 230=045,11| 230=049,11| 230=036,12| 230=040,12| 230=045,12| 230=049,12| 230=036,13| 230=040,13| 230=045,13| 230=049,13| 230=036,14| 230=040,14| 230=045,14| 230=049,14| 230=036,15| 230=040,15| 230=045,15| 230=049,15| End And by doing that, we have reduced the Object definition to 34 pixels. Now at this point, you can go and does as Ego mentioned before. Just use the pixel information for the letter I as your Object definition. But, I prefer to use a Object definition that has pixel information for multiple of letters through out the text that you are searching for. And as such I would normally stop reducing the Object definition at this point. As this would make sure that when checking for a Object in the game. There is no mistake when searching for the text. What searching for only certain pixels in only one letter of the text. Could cause AC Tool to return a false positive under the right conditions. And in games, you can not leave that possibility to chance. So, I would recommend that you also use a Object definition that uses just a couple of pixels from just one letter. Now, Ego would bring up about speed of checking for that Object. And yes, there is the need to have AC Tool check for the Object as quickly as possible. But, in my use of AC Tool. I have found that going for speed tends to be more troublesome in games. Where the right conditions tend to happen more often that you think. Now, with the text that you are searching for. Checking 34 pixels is actually a very good balance between speed and making sure that AC Tools finds the word Ink. But, if you wanted to make is faster. Then all you have to do is remove those rows of pixel information that the offset coordinate has a Odd Y-axis. By doing this you will have further reduced Object definition to 16 pixels. This is the bare minimum that I would recommend for a Object searching for a text of this size and with these letters. Object INK // Test at coords 3459, 274 230=036,06| 230=049,06| 230=036,08| 230=040,08| 230=049,08| 230=036,10| 230=040,10| 230=049,10| 230=036,12| 230=040,12| 230=045,12| 230=049,12| 230=036,14| 230=040,14| 230=045,14| 230=049,14| End Now, I need to remove all of the Whites Space (extra spaces) between the pixel information. And your Ink Object definition will now look like this: Object INK // Test at coords 3459, 274 230=036,06|230=049,06| 230=036,08|230=040,08|230=049,08| 230=036,10|230=040,10|230=049,10| 230=036,12|230=040,12|230=045,12|230=049,12| 230=036,14|230=040,14|230=045,14|230=049,14| End Now, I also have a question to ask and a few things to mention. And most of them are the same as Ego's question in his post. 1. I assume that the following lines clicks on what ever button that opens the menu that has the six buttons that you are checking: // Select menu mousePos 3406, 713 LeftClick Delay 2000 2. Now, in the following code. What is the specific MousePos for? mousePos 3501, 256 <<<<<<------- Why are you moving the mouse at this point? IsObject INK at 3459, 274 // Check if Button1 has Ink // Click on Button1 mousePos 3502, 287 LeftClick The reason I ask, is because you have a similar line right before each IsObject command to check for the INK1 Object. What are you doing? And Why are you doing it? Please explain. 3. You need to place a SetActiveWindow command at the top of your script. Or sometime prior to you using the IsObject commands Then you need to add a Delay for about 1-2 seconds right after that. The SetActiveWindow command cause the window for the game you are playing to become the active window to receive commands from. And it will bring that window to the front of any other open window. The Delay command of 1-2 seconds is to allow your system to bring the game window to the front and to make it the active window. 4. When ever you move the mouse with the MousePos command. Then you need to use a Delay command right after MousePos command. The reason for this, is to allow your system, and/or the game, to move the mouse to the coordinates that you want. How much of a delay that you use with Delay command, really depends on your system and the game. The best thing to do, is to start with a Delay of 2 seconds (Delay 2 sec). And test the script to see if the mouse has moved to the correct place before the next command is executed. If the mouse has moved to the correct place, before the next command is executed. The lower the Delay and then retest the script. And keep this until you have found the shortest Delay amount that allows you to move the mouse to the correct place before the next command is executed. So, starting with a 2 second delay, drop down to a 1 second delay, then to a 900 millisecond delay (.9 seconds), then to 800 milliseconds (.8 seconds) and so on and so forth. 5. Now Ego mention to place a Delay after every command. For the most part, about 97% of the time, you do not need to do this. I. All that you really need to do as add a Daley after every SetActiveWindow command, every MousePos command, and DragTo command, or when using these commands within loops (as in Loop .. End and While .. End loop blocks). IsObject INK at 3703, 301 // Check if BUtton6 has Ink // Click on Button6 mousePos 3753, 308 Delay 1 sec LeftClick End II. When using loops to perform commands that check for Objects within the game or commands that interact with the game. (Such as the LeftClick, IsObject, Say, Keys, etc.) You need to add a short delay right at the end of the loop. That way the game will have enough to time to respond to what you may have done during the loop. And then to update the game display before AC Tool start going though the loop again. The amount of a delay at the end of a loop, again, is totally up to your system and/or game. While $FoundInk = False IsObject INK at 3703, 301 // Check if BUtton6 has Ink Set FoundInk = True // Click on Button6 mousePos 3753, 308 Delay 1 sec LeftClick End Delay 500 // Delay before starting next loop End III. And in rare instances, you may find that a certain section of your script is executing prior to the game doing what it needs to do. When this occurs, just find the specific command with in your script. That is being executed before the game is ready. And ether rewrite that section so that that section is only executed when it needs to be. Or add a Delay just before the command being executed too early. 6. Ego, also mention the MouseCommandDelay. You won't find this in the AC Tool Help file. What does this command do. This command set how long AC Tool holds the mouse button down when executing the LeftClick or RightClick commands. By default AC Tool holds the button down for 2 milliseconds when executing the LeftClick and the RightClick commands. (Just like what would happen when you physically click your mouse button. Now, for 99.99% of the games out there, there is no need for you to use this command. Now for very rare instances of games. Holding the mouse button down for 2 milliseconds, when clicking on the screen, is just to fast for the game to register that the mouse button has been clicked. The only time this command should be used. Is when the non of the LeftClicks/RightClicks being sent to the game is not taking place. Or when more than a few mouse clicks are not taking place in the game. Because 99% of the time, when mouse button clicks are not taking place. It is because you do not have a long enough delay between executing the MousePos command and LeftClick/RightClick commands. And the clicking of the mouse button is taking place before the mouse gets the location it needs to be at. 7. Since you have not mention if the bit of script is going to be apart of a larger script of not. I would hold off on mentioning anything about using/adding a While .. End loop to execute the current code. And the use of the Delay for 10 seconds at the end may seem like it is pointless to Ego. And maybe it is pointless. But, I'm assuming that it is there for you to make sure that the script has run its course before AC Tool finishes running the script. Now, until we have heard back about the additional MousePos statements just before the IsObject statements. I will show you how your script could look like:
  6. Well, I have already given you a example script to work with, along with all the information needed. All you need to do, is find the coordinates to the TOP LEFT corner of each button on the screen. And to create the Ink Object, as I outlined in my previous post. And then if you use the example script. You need to edit the script to use the Ink Object that you have created. And to use the correct coordinates, for the TOP LEFT corner of the buttons, with the IsObject commands. And to adjust the MousePos commands with the proper coordinates to place the Mouse cursor over the buttons. I've already done most of the work for you and I have also given you all the information that you need to do the rest. It is now up to you to do that little bit of work and/or to read the information that I directed you to within the AC Tool Help file.
  7. @Vanya1988 Since you gave very little information as to what is going on in the game. And you did not give any additional information as to the what is going on with the buttons. And you sure didn't tell us what the problem is with your script. As in, what is happening when you run the script. So for the purposes of this post, I'm going to assume the following: You have six buttons that are in the same place when the menu is displayed. And that the buttons are arranged as follows: Button1 Button2 Button3 Button4 Button5 Button6 The 6 buttons have six specific actions. What button performs what action is different each time you open the menu. (As in Ink could be Button1 or it could be Button6 or it could be anyone of the six buttons.) You are trying to find the button that currently has a specific action. Now, as the your script that you posted above. You stated in your 1 sentence post, that you are trying to find the button that has Ink as its action. And then click on that button. Well, from just looking at the with the script that you posted. I can see three things wrong with it. You are not using the correct command to move the Mouse pointer over the button that you wish to click on. The coordinates that you are using to check for which button has Ink is all over the place. You did not set the ObjVar. See: AC Tool Help > AC Tool Commands > ObjVar AC Tool Help > General Information > Object Primer In order for you to do as I ASSUME that you are trying to do. You have to do the following: Use the correct command to move the mouse. See: AC Tool Help file > AC Tool Commands > MousePos Use the ObjVar command. You need to find the Top Left corner of where each button is. Read the Object Primer: AC Tool Help > General Information > Object Primer Create an Object for the button that has the word Ink on it. (This Object needs to be created using the coordinates of the Top Left corner of the button. And it must have every pixel within the button defined.) Reduce the Object definition to only have the pixel information for the word Ink. (As shown in the AC Tool Help > General Information > Object Primer > IV. Defining an AC Tool Object) Check each button, using the coordinates for the Top Left corner, to find the correct button. It is very important that Object that you create is based on the TOP LEFT corner of the button. And that you check for your Object using the TOP LEFT corner of each button. Now, what do I mean by the TOP LEFT corner of the button. And why is it so important to use the coordinates for TOP LEFT corner of the button to create the Object and to check for the Object. To help with this, I created the following image using the PNG image from your post. Image 1: As you can see, I selected the section of the image that has Button5. And the TOP LEFT corner of the button is at coordinates 127, 37 (x,y) and that the size of the whole button is 90 pixels x 22 pixels (WxH). Now if you were to do the same for each button. You will find that the TOP LEFT corners of the button are at coordinates: Button1: 5, 10 Button2: 127, 10 Button3: 249, 10 Button4: 5, 37 Button5: 127, 37 Button6: 249, 37 And that for each button the button is the same size: 90 Pixels x 22 Pixels. As you can see, there is a pattern to where the buttons are. It is not like the buttons are all over the place, like in your script. Again, why is it so important to use the coordinates for TOP LEFT corner of the button to create the Object and to check for the Object? Well, if you create an Object based and the coordinates of a button and for the same size as the button. Then it does not matter at what coordinates you check for the Object. As long as the coordinates that you are using to check for the Object as the same as the button currently being checked. Then the Object will be found, provided that the current button being checked is the one with Ink. Another reason for using the button's coordinates and size to make your objects. Is that right now you are only looking for the Ink button. But, later on you may decide to look for the Cancel button. Then all you have to do is use the same coordinates, and button size, to create the Object for the Cancel button. (Like I outlined above.) At which point you can then use the same coordinates to find the new Object. Now, if I was to create a Example script using the PNG image you posted. Then my script would be the following: Example Script: NOTE: This example script is using coordinates based on the PNG image provide. It is using a Object that was created using the same PNG image. As such the script will not work with the live game. So, you will have to find the coordinates for the TOP LEFT corner of each button, and to create the Ink Object. From a screenshot of the live game, or from using a BMP image. UNLESS YOU ARE USING A BMP IMAGE FILE. DO NOT USE A IMAGE FILE TO HELP CREATE YOUR OBJECTS.
  8. The code that you posted above does not have anything that checks the time. But, it does execute the skill every 4 minutes, as coded with the Procedure..Every event. What do you mean by counters? Are you talking about keeping track of how much of something you have? How many of something that you are creating/getting? Please explain more. As for sounding a sound, as if for an alarm, you would use the Bell Command. Look at Help file > AC Tool Commands > Bell to learn more.
  9. @ArcherRojas Well, you added your post just as I had added mine. One thing I should mention, for the SetActiveWindow make sure to put a space between the Window name and your first / for your comment after it. Otherwise, AC Tool will think the comment is part of the window name. But, from what I can see. The code that you have there should work fine. But, remember what I mentioned about what can happen if you are using multiple Procedure..Every events. So, look at my newest post and see if any of that may help.
  10. @Ego The only way that I can think of to work around the problem I mention for Option 2 is this. Create a Constant that will be a flag for when the event can/should be executed. Then sometime in your script, you would need to set the flag to (dis)allow the event to execute as needed based on where at in your script you are. Example: As you can see from the Example, it is quite simple to work around the issue of the multiple of Events being triggered at the same time. But, still be careful. Even with doing this you may still have an issue with a Procedure..Every event executing at just the wrong time. For which you may need to use additional flags to check to make sure the Procedure..Every event does not execute at the wrong time. Now there addition problem with using Procedure..Every event(s). If you set the Procedure..Every event's every parameter for the event to only execute the event when you are able to re-cast a spell. (Like I did with the HealToon Procedure..Every event.) Then the only time that event will be triggered is when the character is able to re-cast the spell. At which you have to options. Change the time of the Procedure..Every event to execute the event more often. Which may, or may not, impact the performance of your script. Change the Procedure..Every event to a Procedure..When event. Then use the Flag as the When parameter. That way the Procedure..When event will only be executed when the flag has been "Turned ON". And you can use multiple flags as part of the When parameter, just like in a If..end statement. The following Example uses Options 1 & 2 from my first post, as well as the Procedure..When event. The script uses the Procedure..Every event (As mentioned in my previous post) to drink a MP potion. It uses a Procedure..When event to Heal the character. And yet, within the Procedure..When event, it uses the Time Constants (as mentioned in my previous post) to decide if we can cast a spell to heal the character or to drink a potion. Example: The examples shown above was created off the top of my head as I typed this post. The logic in them should be fine. If not, then it should only take a few minor changes/corrections to make the examples work as intended. There you have it. Code to use without code being given. Learn from it.
  11. @ArcherRojas Well, If I understand you correctly. You have two options to do this. Option 1: Look in the Help file General Information > Special Variables. You should see 8 special variables that you could use to help you. I would recommend that you use the Millisecond one if you go this route. You would then create three constants, One for when you are setting the start time of your event. One for when the next time the event should trigger. And last another for the current time. You would use these three constants to create when the next time you want your event to be triggered. And then to compare when it is time to trigger that event. If you plan to have multiple events to be executed. Then you will have to create addition constants to keep track of each events next execution time. Option 2: Use the Procedure ... Every ... End procedure and the ProcessMessages to create a event(s) that will be executed every millisecond/second/minute/hour/etc. Look in the Help file > AC Tool Commands > Procedure ... End & AC Tool Commands > ProcessMessages to learn more. A couple of things I need to mention. If you use this Option, place the ProcessMessages command where you would like your event to take place. Like someplace where it would not enter-fear with what you are doing with your script. Also, note that if you create more than one Procedure ... Every ... End procedure. Then keep in mind that the Process messages will check all such procedures at that time. And if more then one of them is able to be executed. Then it will execute them, in order that it finds them, at that time. So, keep this in mind as it could cause problems with what you are doing.
  12. @DigitekUpdated Tutorial to reword Step 7, nothing more. Although it should have been obvious from Step 8 "If using a custom database, you may need to update the schema for the emulator to operate correctly. If you're using the official release data, this step is not recommended." that you would be done. as for the acclient file, and the other files from the ac_updates.zip file. As stated in the tutorial above. Only two of the files are required if you are hosting a ACE server. This Tutorial is strictly about setting and hosting your own ACE server. Now, if you want a Tutorial about how to setup Asheron's Call game client to run on a emulated server. The I would fully suggest that you go to one of my oldest Tutorials How to setup Asheron's Call to play on a emulated server. Where you will find all the information on how to install and setup Asheron's Call to include the replacing of file in the C:\Turbine directory. (In fact that is Step 3 & 4 in that Tutorial.)
  13. @Digitek the current instructions, provided above in and on the project's GitHub Wiki, do not use Micro$ucks VisualStudio. If you are using that to compile the binaries. Then I would state that you need to stop using Micro$ucks VisualStudio and follow the instructions as given. You need to use the .Net Core 3.1.0 package, for Windows, or the .Net Core SDK for Linux (I believe that it should also be v3.1). I have personally used the same instructions to build the binaries and deployed the server. So, I know that they actually work. If you followed the instructions above to create the binaries and you are still having problems. Then I would suggest that you check the project's GitHub Wiki for possible new information. Or use the the project's Discord channel to get help with your problem. As for your trying to use WAMP I would suggest that you use the Discord channel to get help with that. I would ask that if you are able to get ACE running with WAMP, that you PM me with the instructions needed to setup WAMP for ACE. That way I can add it to the tutorial above.
  14. @Ego As I have stated, you can not get the window stats of a Window for a Game/App that is running in a VM. Because, all that AC Tool, and Divide for that matter, see is the VM's windows. Not what windows are being display in it. But, using GetColor, IsColor, and using Objects would still work. As that really does not work based on the Windows size and position. It is based on a specific Pixel, or set of pixels, that are being displayed on the Desktop. But, if you have the size and coordinates of the VM's window. then you can figure out the placement, just like E&B, of where to search. @alistair as a reminder, those special variables will only have a value set for the Window that you want to work with. Only after using the SetActiveWindow command. So, they are updated every time the SetActiveWindow command is executed, no before. As for the ScreenWidth and ScreenHeight Special Variables. The show the Desktop screen resolution's width & height. (In a Multi-Monitor system, this would be the current resolution of the monitor that is the Primary Monitor, or Monitor 1.) And just like the Window versions, these two will only be updated when the SetActiveWindow command is used. And I also, know of BlueStacks! I just have not used it in years. It is just to resource hungry for even my best laptop. And most things run slow, in some cases too slow. Don't have a Desktop. Also, remember, each and every BlueStacks Window needs to have a different Caption/Title in order for you to change between them. Or else this will never work.
  15. @alistair My first question to you is this. Are you actually running the game a multiple VMs? If that is the case, then there is no way of actually getting the coordinates of the game window being displayed in a VM's window. All that you can do, is get the coordinates of the VM's windows. Now if you are looking for a way to get the window coordinates of all the windows. All at once before doing so. Then the Answer to your question is NO. The only way AC Tool will know the coordinates of a window, or any window, is once it makes it the Active Window. In order to get the coordinates of the VM windows, you have to have each window have a different Title/Caption. (That bit of text at the top of the window.) Once you have done that I would Read your AC Tool Help file, and pay particular attention to the Special Variables portion of it. And then set the VM window as the active window before getting/using the windows coordinates.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.