%gold bonus gems work on chest?
%gold bonus gems work on chest?
getting error on line 1 GUIConstantsEX.au3. I'm guessing that I am missing that file, since I don't have it in my AHK directory. I don't have the windows.au3 either. Tried googling it, see lots of references to autoit3, but can't find the actual files.
Thanks for the help so far. Got the autoit3 script to log in, loot, and exit just fine. However, i'm getting an error during the inventory deletion process.
Line 44 (File "C:\Program Filex(x86)\AutoIt3\ImageSearch.au3"):
if $result[0]="0" then return 0
if $result^ ERROR
Error: Subscript used with non-Array variable
If anyone could help me, I'd appreciate it.
Thanks again, got rid of the error. Now I'm having trouble getting it to delete the unids. It just keeps highlighting the items but wont' pick them up to delete. I believe it tried deleting one time, but then it never bothered to. I've been playing around with the area coordinates with no luck. I also cropped the screenshot to just show the unidentified text. If you could post samples of your pictures, perhaps it could help. Also, if we had to edit the coordinates for our inventory, should we also have to edit the search area coordinates? I can see it highlight every inventory space that I want it to just fine. It's just not picking up the item to delete it.
After more fiddling with the coordinates, I made some progress. I got the mouse to drag the item out the window to cause the discard menu to pop up. Now the problem I'm having is that the script won't click on the discard confirmation.
Last edited by eddix; 05-17-2013 at 04:16 AM.
Try using a jpg instead ... for some reason they seem to work better for me.
Don't make it to large ... just need a crop of the letters "Disc" or so ...
Ok, i will try with a smaller picture of "Disc" with .jpg extension.
Btw i don't understand this line :
// $result = _ImageSearch("delete.jpg",1,$x,$y,100)
Why using a ImageSearch and not a image search area ? Are you sure about 1 & 100 since this discard button appear in the middle of the screen ?
edit : The picture i took is now working with .jpg, thanks for tip !
Last edited by Guts; 05-17-2013 at 05:23 AM.
I was able to compile it properly and then it didnt error with the loop, however, it wont drag any items that are unidentified. I used jpg format and png but it doesnt seem to notice them.
Can you tell me what the parameters mean for the following code?
$result = _ImageSearchArea("unidentified.jpg",1,920,500,1230,610,$x,$y,150)
$result = _ImageSearchArea("rank2.jpg",1,920,500,1230,610,$x,$y,150)
Thanks Arrakis for the script and help.
I've managed to get this working pretty well and I've made some additions to mine so I thought I would share the info.
For those asking about the ImageSearchArea parameters, here's a terribly detailed breakdown:
The "unidentified.jpg" is obviously the name of the image file you have created or saved - this is the image you want the script to look for.
The "1" is the function return value - if you don't understand this in the code, then leave it as a 1 for Arrakis's script.
The next 2 numbers (example from above: 920,500) are the X and Y coordinates of the top left of the area of the screen you want ImageSearchArea to search to find your "unidentified.jpg" image.
The following 2 numbers (example from above: 1230,610) are the X and Y coordinates of the bottom right of the area of the screen you want ImageSearchArea to search to find your "unidentified.jpg" image.
The $x and $y are variables used to store the coordinates of where the image is found - if you don't understand the use of this in the code, then leave it as is for Arrakis's script.
The last number, the 150, is the "accuracy" that you want to enforce on the image search. This number can be a number from 0 to 255. 0 Means you want a perfect match for the image - pixel by pixel, no variations. 255 would mean that you would want to allow the image match to be a little different than the image you created. Arrakis has used a sort of middle value of 150 and so far I find this to work well. Unless you begin having difficulties, I would leave this value as is.
********************************
Tips and modifications that I have made to mine:
* I have added an image search check to make sure that before the script enters username or password, that it is indeed on the login screen. I used the big "LOGIN" button as my image search. This way, if anything gets messed up and you end up outside the instance zone, you're not spamming the public areas with your username/password. In my script, it will exit if this happens.
* I have added an image search to make sure that the character is in "Wrathforge" zone. For this script, if my character is not in Wrathforge zone, something has gone wrong. If this is the case, my script will exit.
* If you loot a chest while your inventory is full, items will sometimes remain in the chest. If you log out and back in and loot the chest again, that same item is still there. I have added an image search to look for the big red text "Inventory Full" and I have added a counter to count how many times in a row I see "Inventory Full". If I see inventory full more than 2 times in a row, something has gone wrong with the "delete item" portion of the script. In my script, it will exit if this happens.
* I also do not run the inventory management every 8 turns. I only run the inventory management after the image search sees the red text "Inventory Full". When the script finds "Inventory Full" it with them manage the inventory and delete unidentified items. After deletes items, it will then re-click the "Take All" button that is still on the screen.
* NOTE: Arrakis's script also attempts to discard any "Rank 2" enchantments etc. Please note that if you discard a stack of items, the "Are you sure you want to discard" menu is slightly different size/shape/location than the window you see when discarding only 1 item. (it shows you the slider asking how many you want to discard). If you are using ImageSearch to search the entire screen for the Discard button, this does not apply to you. This only applies if you try to use ImageSearchArea to find the Discard button. I did this to speed things up slightly as ImageSearch is a bit slower on my computer.
* Finally, a work in progress note. I am considering changing my "inventory full" detection logic. I think I want to look at the bottom right bag slot. If the bottom right bag slot is not full, then my inventory is not full, right? So no need to manage inventory at that time? I find that the "Inventory Full" red text works fine right now, but as it is a "fade in" and "fade out" popup graphic, I worry that if something gets slowed down, the timing to detect the image may not work right. The bottom right bag slot is a static image that can be searched on easily.
Thanks again Arrakis - I have no rep to give, otherwise I would.
Last edited by ocnwo; 05-17-2013 at 08:57 AM.
Yes, I started to do the "pray" but it got late, needed sleep. I think I will do this with just ImageSearchArea on the pray window - if it's the empty graphic, it's time to pray. If it has countdown timer numbers, then it's not time to pray. I haven't used AutoIt before and I don't think I would even try to mess with the datetime logic to set a recurring hourly check, or anything elaborate. I'll likely just check the image each time the script loops.
I watch mine run also, so not necessarily any reason for me to get elaborate on login, area, and inventory checks - but I wanted to mess with the scripting to get used to it and practice. Also, lets me learn what I need to do any custom inventory management in the future. (ex: fusing enchants).
Cheers, and thanks again for sharing - you've given me a mentally-stimulating side project