Jump to content
AC Tool Forums

All Activity

This stream auto-updates     

  1. Yesterday
  2. Last week
  3. Earlier
  4. I stand corrected. As I stated before, it has been a very long time since I worked with Java. And I assumed that the JVM has gotten faster over the years. And it is great to hear that it has gotten a lot faster since v4. Well, we seem to be thinking the same thing here. (Note: I had not read your response prior to doing my second post.) But, you can see my concerns about the cached image and the using of the IsColor/RGBColor or your getColor in a tight loop. Yes, you can increase the speed to doing 100 checks within a few ns. But, if you are only updating the image cache once every 10-50ms. Then 1 time out of thousands of iterations, between cache updates, will the check be based on current, or semi-current, pixel data. Basically you'd be spinning your wheels for nothing. Basically, it does not matter of what we come up with to solve the problem. Using tight loops with the mentioned commands is no longer viable. All loops must include some form of delay between iterations. A delay of 5-10 ms is all that is needed. This will cut down on the performance hit. Or when using a image cache, it will cut down on the spinning your wheels for nothing. Maybe, you can come of with something that works. Because I really want to increase the speed of the IsColor and RGBColor commands in "Divide." So, I fully give you notice that when you do. I will be basing what is used by IsColor and RGBColor on what you have come up with.
  5. @mysticdrew Now as for the coming up with workaround for the getPixel problem. I will give you the following information that I learned many years ago. Roughly back in 2013 a AC Tool user had posted information about a problem he was seeing with AC Tool and using the various Color commands. (That post is still here somewhere. Oh wait that was you.) At that time, and many many times since then. I have looked into the problem and for a way to get around it. So, when it comes to the GetPixel being slow. It is a problem created by Micro$ucks adding advance display features, like Aero and transparent boarders, to Vista. They refer to such features as composition. Instead of going back and working on the code that does all the rendering of the display. And properly add in the required code to display these new display features, like Aero and the transparent borders, Micro$ucks decided to add a program that sits between the Windows display renderer and the display memory. It is called the Desktop Window Manager or DWM for short. What the DWM does is it intercepts all rendered display information going to, or being requested from, the display memory. Caches the rendered display information frame by frame. And through it's cached frame(s) performs it needs to for Windows to display the various advance display features. Then the DWM sends that new rendered display from its cache to the display memory to be displayed. But, here is the rub of the problem. In return, when requesting information about the display and/or its rendering, such as using the GetPixel. All of the requests have to do through DWM. And it is DWM that supplies the requested information back to the caller, based on what it has in its cache of display frames. This should be pretty fast but it is not. From what I have found, DWM converts the cached frame to something like a bmp and gets the information from that and then sends it back. It is during this conversion process that things become slow. And this cost is per call. So, using the GetPixel in a tight loop causes the times to execute the command to increase. All my research shows the only way to get around the cost comes to doing one of the following: Stop using commands such as GetPixel in tight loops. When scanning a display, like looking for a Object in AC Tool, use BitBlt and scanlines process (or something similar). Turn of Aero effects, or composition, threw the Windows Theme. By using the Classic theme. Use the DWM API to turn ofF DWM composition. With Windows 8 and newer, this is no longer an option. Create your own display driver that access the display memory directly. That's it, When it comes to AC Tool the only thing that can be done is to use the BitBlt and Sanline for the searching for a Object. But, there is nothing that can be done to speed up the IsColor or RGBColor commands. As they are checking a single pixel. I have already updated the CreateObject and IsObject commands in "Divide" with the BitBlt and scanlines option. Now, the BitBlt and scanline process uses BitBlt to capture the screen, or portion there of, into a image object. Then you use the ScanLines to scan through the image for the pixel information. I had already thought of doing something similar with the IsColor and RGBColor commands instead of using the GetPixel as AC Tool currently uses. Capture the screen, or a portion of it, into a image object, get the individual pixel information, then release the image object. But, you would have the overhead of having to capture the screen and placing it in a image object each time you use the any of the IsColor or RGBColor commands. This can cause the use of the IsColor and RGBColor commands to be slow if used in a tight loop. And isn't that what is happening when using the GetPixel through DWM? Now, I had thought about capturing the screen and placing it in a cached image object and then updating the cached image object every so often, like every so many ms. And then have the IsColor and RGBColor commands work with the cached image object. But, the problem comes down to how often do we update the cached image? Because when using the IsColor or RGBColor in a tight loop. The information those commands will be using will be old data until such time as the image object is updated. And then only the first call by a IsColor/RGBColor right after the image object is updated will be based on new, or current, data. So, how often do we need to update the image object. When will it start to effect the speed performance? I hope that you can come up with an idea for this. Because when it comes to using tight loops of GetPixel, or its equivalent when using a cached image, is going to have a performance hit or used old data. And maybe your programming skills is good enough to create a display driver. But if not then the only way to see speed in a tight loop of GetPixel commands is to turn off display composition through your desktop themes.
  6. Chrome is not written in Java, it is mostly C++ and Objective-C, On Android the Chrome UI bits are in java but the core is C++. Chrome OS, also C++. Andoid OS is mostly C++ but apps can be C++ or/and Java. It is widely thought that Android is pure java, it is not. The core is all C++ but the UI is a mix of java/c++. They expose the api through java, I think that is why most think it is a pure Java OS. While java has the perception from rumors of being slow it really is not. It probably was back in the 90's when it was first created. But on today's machines it can be as fast as native applications. I am using several libraries that give native system access without pulling the data from the JVM. All input /mouse/keys/pixel data are from the native system through C++ dlls. Yes there is a bit of slowness to startup in the IDE(havent tested the compiling), because I have to scan the classpath for annotations and build dynamic classes using ASM writing optcode instead of using reflection for my eventbus. Writing Optcode is a huge pain, but for speed, it's worth it. Many of the tools/macros/bots people have written in AcTool will be just as fast in Java. They are pretty small in the scope of things. At work our Enterprise systems are all java and they are blazing fast, huge applications, tons of threads, still extremely fast. I also plan on caching a lot to speed things up. For example, pixel detection is a heavy call for any language. My plan is when a getColor call is executed, it will take a small image around that pixel and store for maybe 10-50ms, then all calls in that area are done on that image. So if you want to scan maybe a healthbar, you loop through a getColor 100 times in a matter of nanoseconds. That can be a very heavy call if you check the pixel each time and it will take more than a few ns. The first getColor(x,y) call will check if that region has a living cache, if it does, it will scan cached image. If it does not, it will use a JNA call to create the region, toss it into cache and scan it. In theory it should be lighting fast. I have not implemented any of the color detection code yet, but that is my plan. If you want access to the github project, private message me your GH account name and I will add you. I think I can only add 3 people to free private GH projects.
  7. @mysticdrew Glad to see have something that you want to work on. And from what I see, it is a pretty good idea. I remember my Java days, I learned on v3.2 thru 4.0. I had even purchased a few Deitle & Deitle books back then to help me learn. I originally wanted to learn Java because of a game helper that I used for a OLD SCHOOL BBS game, turned multiplayer online game, that used Java for it's scripting engine. And I was dead set on learning Java to make sure that I could create the best scripts that I could for the game. Heck I even create a couple small, and minor, Java Web Applications. But, with the current version of Java I am completely lost. From what I remember, Java was notoriously slow. Yes, it is fast for a Interpretive Language. But, it was slow when compared to non-Interpretive Languages. And that does not include the even slower start up time of the Java Application for which requires the Java engine to be loaded and running, the Java engine to then load the Java Application opcode at which point the Application is run. I assume that over the years that Jave engine has gotten faster. But, I still see every day the signs of how slow Java still is. Examples: All android devices OS is Pure Java. Chrome books, the Chrome OS is also Pure Java. And then there is Chrome itself, it is a Java Application. I have not a thing against Java. It is a very wonderful language to work with. And it can do wonders when it comes to cross platform. Because it was made to be cross platform from the very beginning. (No other programming language can say that they are truly cross platform.) But, for certain applications where speed is critical. Java just does not have the ability to meet it. And as far as I know the there is only one thing slower than Java. And that is all Adobe programs/applications. I know a little bit about Python and Javascript, never heard of Typescript. And I know that for a webpage application that Python and Javascript work wonders. But, again they are a interpretive language. And dependent on the languages engine/renderer to be loaded and run the code. Beyond what is used in various web sites or web pages. I don't know how fast these two script languages are. And you are right about AC Tool and AutoIt being for Windows only. And as for "Divide" I have had plans on making it cross platform. The scripting engine being used is cross platform is already cross platform enabled, ie Linux, Android, MacOS, iOS, and a few others. And my programming environment can create cross platform programs/apps for all those operating systems as well. All I would have to do is create a cross platform GUI and take care of a few sections of code that is Windows specific. But, my problem is this. I do not have any systems, other than Windows 7/8/8.1 and Android (phone) to test my work on. Granted I could go to any local Pawn shop and get two or three computers and put different Linux Distro's on them. But, my knowledge of Linux is: how to download the various distro's, install the distro from a Live CD/DVD, and run it from the GUI. That's it. I can't even install a program/app on it. And as for my knowledge of MacOS: Turn on computer, and then use. OH, and I do know that it is a custom version of some Linux distro. But, buying a used Mac system just to be able to test on, is so not going to happen. Even a used system would cost more than my whole setup now. I like the Keyboard event and Mouse event idea. And the keyboard event is partially implemented in "Divide" already. And it would not take much to add what is missing. Plus, I was already been looking adding something quit similar, in another project that I have going. In that project you register Triggers, based on certain text being received from and being sent to the game within the data stream. This would include key presses being sent to the game. I had originally planed on expanding the keyboard portion and adding the mouse trigger. But, I have not worked on that project in years. But, I do expect you to continue to work on your project. Because I will more than likely have use for what you create.
  8. Disclaimer: This is not released yet! -> Pending licensing, due to some dependencies that I require. So one of the issues with AcTool, AutoIt, AutoHotkey, and likely even the new Divinity is that they are Windows specific. There are a few tools out there for MacOS and Linux but nothing that I have found works on all of them. Write one script/application and it is platform agnostic. I am in the process of writing a Java tool that will do just that! I am a java software engineer by trade so obviously it is language I am drawn too. I was thinking either java or python I went with java because I already had a basic project started for this tool. While there will be no "scripting engine" for this, it will be a dependency library of sorts with helpful methods, annotations, native tools to get the ball rolling right away. I may however write a scripting engine for this and it will use python or javascript/typescript. That is a long way off, if it ever happens. I will post updates here as I progress on the project. It will be open source when I get my licensing situation figured out. One of the main things I want to provide with this project, is I want to make it easy enough that non programmers can use it, like they can with ACTool. ACTool is simple, yet powerful scripting tool but the syntax is not complex. It is what got me into my software development career. My current phase is creating a dynamic annotation system for events. (key events, mouse click events, custom events) Actool has an event processor for calling procedures below: Procedure Foo when bar=foobar I currently have a working key event system. KeyEvent - KeyPressedEvent, KeyReleasedEvent that works like so. @SubscribeKeyEvent(key = "v", modifier = KeyModifier.CTRL_SHIFT, type=KeyEvent.Type.PRESSED) public static void onKeyPress() { // Fires on key press and key release // Fires when only the combination of CTRL+SHIFT+V is pressed/released (it is case agnostic) } @SubscribeKeyEvent(key = "b") public static void onKeyPressStatic(KeyEvent.KeyPressedEvent event) { // only fires when CTRL+SHIFT+V is pressed (it is case agnostic) } @SubscribeKeyEvent() public static void onKeyPressedEvent(KeyEvent.KeyReleasedEvent event) { // fires only when a key, any key, is released // validate it with if("a".equalsIgnoreCase(event.keyString)) { // a was pressed } } Any combinations of qualifiers in the annotation or specific method parameter type will work. It's pretty robust. I am traveling for work the next week, I am not sure how much time I will have to work on it. However, until it is open sourced I have a couple slots on my github repo that I can provide access to a few users who wish to tinker or help with this. Please respond or PM me and we can chat. Future plans: I will be adding a bunch of MouseEvents, the obvious click events, but also area events. When your mouse moves to an area, the event will execute and you can do stuff. Imaging tools, with workarounds for Windows10's slow getPixel garbage. Custom gradle plugin to make it easier to a project setup in Intellij or Eclipse Guides and Documentation. And anything else that I can think of to make life easier. Thoughts: I want to make it clear, I am not writing this to replace actool, divinity, autoit, or autohotkey. They all have their place, I just want something that is platform agnostic. This project is not new, I started it about 4 years ago and worked on it for a few days then got busy and forgot about it. I am picking it up again to hopefully get it workable and usable by a community.
  9. Thats what I remember using ages ago, thanks Mysticdrew
  10. Constantsrnd = 0EndProcedure RANDOM using LO, HICompute rnd = INT(($HI - $LO + 1) * rnd(1) + $LO)EndCall RANDOM 10,200 //could be any minimum and maximum number range you wish. loop $rnd // do stuff end
  11. There is/was something in the forums, Bear, I think, wrote a random loop generator script somewhere, I recall seeing it a while ago. I will see if I can find it
  12. Sorry if this is a stupid question but I havent found my answer yet. Im wondering if there is a way to set a random number of loops - say between 1 and 100 loops I have a script that clicks two buttons with a random delay between but im not sure how to apply that to the loop condition. This is what i have currently but would like to change to random loops as well loop 200 keys ` constants RandomInteger = 0 Maxval = 0 Minval = 0 End SetConst Maxval = 800 Setconst Minval = 150 Compute RandomInteger = int(($Maxval - $Minval + 1) * rnd(1)) + $Minval Delay $RandomInteger keys 1 end
  13. I have released Divide v0.4.2 beta. You can find it in the Downloads section. 01/03/2020 - 0.4.2 ISSUE: ACTVersion was not returning the program version. Fixed. ISSUE: Found another memory leak. This one with in the code to retrieve the program version from the executable file. Fixed ISSUE: In a Multi-Monitor setup. MousePos, and DragTo, was not moving the mouse to any monitor left of and/or above of the Primary monitor, as defined in Windows Screen Resolution. FIXED. ADDED: RandomTurn - This is a script command that I had missed. What this command does is it turns your game character from 90-400 degrees in a random direction. This helps to refresh your graphics display or keep the many pool active. Or help to keep the game thinking that you are active. Syntax: RandomTurn; ADDED: Started adding code necessary for Asheron's Call Decal/Companion. UPDATED: Updated the Help file to update the information on TWObject and TDivObject and how they are used. Make sure you read them.
  14. I'll add it to the list and see what I can do.
  15. Annunaki

    Beautify Option

    In ac-tool this option was used many many times, I would like to see it implemented in Divide please.
  16. Thank you very much for the explanation and I am really looking foward to seeing what i can do with Divide albeit with the limited free time I get, it is most certainly a major improvemnt compared to AC tool. I am having memory leak messeges at the moment but i will duly create a new thread for this when one pops up again.
  17. Yep, you posted that as I was typing in my response. but, you are correct.
  18. First, yes it is the correct place. And second, the problem you are experiencing is a very minor, and common, mistake. And it is easily fixed. You need to add Divide to the uses clause So your code, as pictured above, should be: Unit2 {$FORM TForm2, Unit2.sfm} uses Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Divide; procedure ButtonClick(Sender: TObject; var DragObject: TDragObject); begin Keys('d'); Delay(500); end; begin end; The uses clause is where you would INCLUDE libraries to used the various procedures/functions, global variables, etc they have for you to use in your script. The uses also includes script files so that you may use what procedures/functions, global variables, etc. that it may have. As such you would add to the uses clause those files or libraries that you are using procedures/functions, global variables, etc from. All of Divides commands and variables are part of the Divide library. In order for you to use any of the library's functions in the current script file. You need to add Divide to the uses clause. With that being said. Not all script files will use the Divide library, or even any one of the other available libraries or accessible script files.
  19. Ok I figured it out I needed to add Divide to the uses section.
  20. Not sure if this is the correct place to post but I'm trying to map a key to a button and not having much luck. Here is what i've got What am I missing here?
  21. Well, I have given it some time and I went and checked out the Asheron's Call emulator scene. And Although the server emulator PHAT is no longer being developed. ACEmulator is going strong and new emulator GDLEnhanced has come to the fold. With this I had spent some time testing AC Tool with ACEmulator. What I have found is that AC Tool v5.4.0 works with ACE. And yet AC Tool v5.4.0.4 and v5.5.1 do not work. The Companion in AC Tool v5.4.0.4 was updated by Phinus (I never received the source code for this version). The Companion in AC Tool v5.5.1 was updated with the last code that Phinus had sent to me (sometime prior to his releasing v5.4.04). There is another version of AC Tool that Phinus had released out into the wild. I do not have this version so I can not test it with ACEmulator. And I do not have the source code for it either. From my limited testing AC Tool v5.4.0 as originally released works with a ACEmulator compiled with from the source downloaded from GitHub on 12-13-2019. This is good news. For those that want to play Asheron's Call again. You can do so and use AC Tool v5.4.0 for all your scripting needs. With that in mind I have opened up a Tutorial section in the forums. It has a tutorial on how to set up Asheron's Call to connection to any emulator server. And if you want to, how to setup your own private ACEmulator server. I have also started adding the code needed to add Companion to Divide. But, this code is completely based on the AC Tool/Companion v5.4.0. And as such it may be outdated with regards to the currently available Decal, v2.9.7.5 a.k.a 3.0, for Asheron's Call. But, it is the only code that I have and that is working with Decal and ACEmulator. I hope to have a working version of Divide with Companion by the end of January 2020. I want to ask the AC players out there, old and new, to go and give AC Tool v5.4.0 a really good test on the ACE servers. And tell me what problems/bugs you find. Also, I really would like it if someone, anyone, that knows Phinus to contact him. And ask him to send to me the complete source code for the last working version of AC Tool/Companion that he has. I truly wish to add those changes he had made into AC Tool and add it to Divide. The last time I had heard from him, he had stated that he was going to send it to me. But, that was over 3 years ago. And I have not heard from him in my repeated attempts to contact him since. So, I am working on adding Companion to Divide. So, give me some time to work it out.
  22. How does an admin change their password for their ACE server? Use the ACE command console and type in set-accountpassword accountname newpassword Example: set-accountpassword Admin NewPassword!@#
  23. How does a player change their password on a public ACE server? Have the player log into the public server, enter world, type in the chat window @passwd oldpassword newpassword Example: @passwd Password123 NewPassword!@#
  24. How do players fix the DirectX error? Since DirectX 9 isn’t installed on original Windows 10 computers (meaning not upgraded from another version of Windows like Windows 7) you may have received a DirectX error message. This is because Asheron’s Call defaults to Full Screen mode when playing. There are a couple of workarounds for this issue. 1: When at the Character Selection screen, before clicking on Create Character or Enter World, Press and hold the Alt key, then press the Enter key. The game should switch from Full Screen to Windowed mode and continue to work correctly. Once you are in the world, you can adjust the game window to be higher resolution. OR 2: Navigate your computer and go to C:\Users\YOUR-USERNAME\Documents\Asheron’s Call and locate UserPreferences.ini file. Edit that file using notepad.exe and find the section- [Display] RefreshRate=Auto Resolution=800×600 FullScreen=True SyncToRefresh=False Change FullScreen=True to FullScreen=False and save the file. If the UserPreferences.ini file doesn’t exist you can download the one below, extract the file from the ZIP download, and place it in the Asheron’s Call folder in your Documents folder. Once you are in the world, you can adjust the game window to be higher resolution. UserPreferences.zip
  25. Compile ACEmu Server NOTE: You should have already downloaded the ACE-Master.zip file during step 2 (Setup & Import ACE Database) if not download ACE https://github.com/ACEmulator/ACE Extract the ACE-Master.zip file to your C:\ drive for ease of use. Open C:\ACE-master\Source\ACE.sln file (assuming you extracted the ACE-master directly to your C:\ drive. 1: By double clicking on the ACE.sln file this should open Visual Studio for you. Click “OK” and let it fully load. NOTE: You may be prompted to Sign in, Create an account, or click on Not now, maybe later. Using the community version you can create a free account. Pick a Visual Studio Theme 2: Scroll down the right “Solution Explorer” and find Config.js.example listed inside WorldObjects folder. 3: Double click on Config.js.example to open it in the left window. 4: Here you will want to specify your database username and password. Scroll down until you see “MySql”: { and replace “root” with the username you chose. ***If using MariaDB leave root as the username*** Place the password you picked in between the quotes for the Password lines. 5: Make sure all three sections have the updated database username and password. 6: Save your changes by clicking the File Menu at the top left and select Save Config.js.example As… 7: When the save window opens rename the save name to Config.js and click on “Save”. 8: Be sure to change the compile settings from Debug over to Release and make sure it’s set to x64. 9: Scroll the “Solution Explorer” back up to the top and right mouse click on Solution ‘ACE’ (x Projects) 10: Left mouse click on Build Solution or you can press CRTL+SHIFT+B at the same time to compile the code. 11: Once the compiling is finished you should see “========== Build: 9 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========” if not please reach out to the ACEmu Discord channel Running the compiled server LINK TO THE DAT FILES 1: Make a folder on your C:\ drive named ACE, copy the client_cell_1.dat, client_portal.dat, and client_local_English.dat into that folder C:\ACE. 2: Go into C:\ACE-master\Source\ACE.Server\bin\x64\Release and locate the netcoreapp2.2 folder. 3: Copy the netcoreapp2.2 folder to your desktop or other location of your liking. You may even rename this folder. 4: Now enter the folder netcoreapp2.2 (or whatever you renamed it to) and double click “start_server.bat” Done!
  26. Install .NET Core SDK & Runtime Both files found here https://dotnet.microsoft.com/download/visual-studio-sdks 1: Start the dontnet-sdk-2.2.109-win-x64.exe file that should be found in your downloads folder if that is your default download path. 2: Click “Install”. 3: When it’s installed click “Close”. 4: Start the donnet-runtime-2.2.7-win-x64.exe file that should be found in your downloads folder if that is your default download path. 5: Click “Install”. 6: When it’s installed click “Close”. Compile ACEmu Server
  27. Install Visual Studio Visual Studio Download https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15 1: Start the vs_community__version.numbers.msi file that should be found in your downloads folder if that is your default download path. 2: Allow Visual Studio Installer to install any required software. Click “Continue”. 3: Select Desktop Development scroll down and select .NET Core cross-platform development and click “Install”. 5: When all is finished Visual Studio will open. Close Visual Studio and the installer window behind it. Install .NET Core SDK & Runtime
  1. Load more activity

Announcements

×
×
  • Create New...

Important Information

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