-
Contributor
Originally Posted by
BossManAdrostos
ok thank you for the response.
im trying to currently get an ahk script to work via screen capturing for the buff icon of 6 charged bladeflurry that then very quickly releases the RMB . im running into a lot of errors when i try to update old codes that are no longer working. i just lack the knowledge to make stuff function properly i think.
i really appreciate your work on this.
All the tools you would need to create a standalone script are actually already within this script! There is an entire FindText GUI for making standalone scripts. Open the file called Library.ahk in the data folder. It will show you the findtext interface and you can capture any icon from the game. Set up a screenshot hotkey by double clicking on the binding box, and then hold down the keys you want to set. Once you have that done, you can minimize the window while yo go into the game. Charge up your bladeflurry, get it to max stacks. Then hit your screenshot binding, you will see a box show up on the screen saying "sucess". You can now go back into findtext interface, adjust the size of the capture window to something like 20x20 and press capture from screenshot. Now you can sample the buff icon, which should also contain the stacks text. Then use on of the color tools, black/white or color to make a string from the icon. Now you have the string, its simply searching for it. If it finds it, then you are at full stacks and time to release.
You will notice that when you captured the icon, it also built a script for you! You can use that to get started. Adjust the area of the search box, so that its just the buff area. Thats about it!
Here is a small script I made using the FindText GUI, its rather easy to use and can be very handy for making stuff like this. Place it inside the wingman folder, it will include the library from the wingman data folder. I have put the keybind for your blade flurry at the top so you can adjust what key you are using to press it. So you can see the FindText library is pretty useful :P
Code:
KeyBind := "RButton"
Text:="|<Blade Flurry Max>F7F7F7-2A692F$36.0E0000100000000000400000M00000k00000U0000300000700000C00000Q00000w00001k00003k0000Lk0000DU0000jk000000000000000000001k00002000006000004000006k00004M00004M00004M00006E00003U00U"
Loop
{
if FindText(0, 0, 1000, 200, 0, 0, Text)
{
If GetKeyState(KeyBind,"P") {
Send {%Keybind% up}
Sleep, 10
Send {%Keybind% down}
}
}
}
#Include %A_ScriptDir%/data/Library.ahk
But this method uses around 2% processing power for just searching that small area. :P When I integrate this into the main script it will be very minimal since the screenshots are already being done, and it will be on a slower loop.
Last edited by thebbandit; 01-04-2020 at 05:22 PM.
-
Post Thanks / Like - 1 Thanks
-
Contributor
Originally Posted by
brightsidecz
I got a bit of a problem, the wingman disconnexts me everytime I pick up azurite in delve saying "ohb not found"
when I try to calibrate OHB in delve it says
Attachment 70462 and
Attachment 70463 in game.
I have OHB tho
Attachment 70464
these are my settings
Attachment 70465
Attachment 70466 this one doesn't seem to make any difference, the script disconects me everytime I try to pick up azurite with this option on/off
I forgot to mention this, but I fixed the issue with Azurite in delve. It no longer stops checking the healthbar at the first time it doesnt find a matching color. It just keeps checking and seeing if others are matching. This will allow the azurite text to float past the healthbar without causing a false positive for low health. I think this is something they changed recently, because the floating text did not do that before. I think it used to start out behind the healthbar just like everything else. The healthbar is usually on top of most screen objects.
-
Member
Originally Posted by
thebbandit
Code:
KeyBind := "RButton"
Text:="|<Blade Flurry Max>F7F7F7-2A692F$36.0E0000100000000000400000M00000k00000U0000300000700000C00000Q00000w00001k00003k0000Lk0000DU0000jk000000000000000000001k00002000006000004000006k00004M00004M00004M00006E00003U00U"
Loop
{
if FindText(0, 0, 1000, 200, 0, 0, Text)
{
If GetKeyState(KeyBind,"P") {
Send {%Keybind% up}
Sleep, 10
Send {%Keybind% down}
}
}
}
#Include %A_ScriptDir%/data/Library.ahk
.
thank you for the info. and the code you supplied is working great. however in that code, what are the numbers that i can edit to widen the search area for the buff icon? when my flasks buffs get popped the icon for bladeflurry moves around and it falls outside of the search range. once the blade flurry icon moves around, the script stops working until my bladeflurry moves closer to the top left corner of the screen. i dont mind sacrificing processing power, if i can make my search area wider in general for it. can you point out how i widen the coordinates for the script to search for?
Last edited by BossManAdrostos; 01-04-2020 at 08:25 PM.
-
Contributor
Originally Posted by
BossManAdrostos
thank you for the info. and the code you supplied is working great. however in that code, what are the numbers that i can edit to widen the search area for the buff icon? when my flasks buffs get popped the icon for bladeflurry moves around and it falls outside of the search range. once the blade flurry icon moves around, the script stops working until my bladeflurry moves closer to the top left corner of the screen. i dont mind sacrificing processing power, if i can make my search area wider in general for it. can you point out how i widen the coordinates for the script to search for?
0,0 is the top left of the search box. 1000,200 is the bottom right of the search box. Use window spy to determine what cord to use as the bottom right corner. (Or just make the 1000 higher)
-
Member
Originally Posted by thebbandit
Ok, that is something that will need to be in the troubleshooting guide, what was the method of resolving the issue? Change your keybindings? or just change back to the regular english keyboard?
I choose easy/lazy way and just switch back to english keyboard.
Your dialogue above prompted the question. Icons in Utility Management section - script trying to look for them, not in the entire line of buffs? Only in those coordinates in which this sample image was captured? Now I understand why what I was doing did not work stably - the buff that interests me is not always in the same place.
-
Contributor
Originally Posted by
LongJohnDude
I choose easy/lazy way and just switch back to english keyboard.
Your dialogue above prompted the question. Icons in Utility Management section - script trying to look for them, not in the entire line of buffs? Only in those coordinates in which this sample image was captured? Now I understand why what I was doing did not work stably - the buff that interests me is not always in the same place.
The utility buffs are detected across the entire screen. But maybe you have another resolution and the area is not high enough?
Code:
FindText(GameX
, GameY
, GameX + GameW
, GameY + Round(GameH / ( 1080 / 75 ))
, 0, 0, IconStringUtility%A_Index%,0)
So in this example (1920x1080) it would be 0,0 top left corner, and 1920,75 bottom right corner
So here you can see the area its searching. Its the width of the game window, and the height is Game height / (1080/75) pixels
Maybe the height is not enough?
While we are on the topic of x,y locations of the script, one of the other things I have left for later, is adjusting all the pixel locations to not offset based on the coordinates of the game window. I changed the screenshot to only grab the game screen. But it is still using all the old sample locations that are adjusted. (This will affect anyone that is not using their primary monitor to play the game, and their primary monitor is not located at 0,0) Essentially, if lets say, they are playing on their second monitor that is offset from the center by one screen to the left. That monitor will actually be located in the -1920,0 position. and all the coordinates will be offset -1920 on the X axis. But when I am taking the screenshot of the game, everything becomes standardized to start at position 0,0. This is something that will just take time to go through everything and adjust, but it has no impact other than fixing it for those special circumstances. Its fairly low priority, but eventually its something I want to fix.
-
Member
Originally Posted by
thebbandit
0,0 is the top left of the search box. 1000,200 is the bottom right of the search box. Use window spy to determine what cord to use as the bottom right corner. (Or just make the 1000 higher)
the issue im experiencing is that across the top of my screen the script stops working when the buff icon is in the x coordinates of about 500-750
whats strange is if i make the search area much more wide than that, and i activate many aura's and buff icons and push the bladeflurry symbol to the right side of the screen the script works normally. however as my flasks and buffs fall off, the script again stops working while the blade flurry icon is around the 500-700+ range. then when most of my buffs are down and the blade flurry icon moves to the left side of the screen around xcoordinates 250-450 the script starts working again.
i have no idea why the script is specifically not working for me around the 500-700~ range. but thats where my blade flurry icon normally is, so its handicapping the script for me.
i can take a video of whats happening if that would help?
Last edited by BossManAdrostos; 01-04-2020 at 11:53 PM.
-
Member
The utility buffs are detected across the entire screen. But maybe you have another resolution and the area is not high enough?
Nope. Just regular 1920 x 1080
About 2 monitor systems - yes I have 2. 2nd one 1280 x1024 but it secondary and I play on first one. Checked coordinate game top-left corner: 0,0 and 2nd monitor top-left: -1280,54
So here you can see the area its searching. Its the width of the game window, and the height is Game height / (1080/75) pixels
Maybe the height is not enough?
Check this too - 75 is enough.
Maybe I capturing icon in a wrong way? Using default capture sample size (35x16 it a bit less in height then icon) and not trying capture area where something can change. Just tested again - captured icon of Stone Golem buff not actual Golem (which with HP bar, just this greenboarded icon)
Code:
<>*79$71.zzzzzzzzzzzzzzzzzzzzzzzzzvzzzzzzzvzzzY00DzU00Xzzy7zU000DzLzzwVsA0007XjzztW3zzzz13DzzqQTzzzzlaTzzA1zzzzzUAzzyC7zzzzzstzzwSzzzzzzzXzzsTztVnTzzDzzszzk7UDzwTzzkzzUz2DzkzzzUzwVz0Dz1zzzUzkkz0by7zzz1zVls3bsDzzz7y9U0DDsTzzyDwTEByDlzzzsDsxzzwTXzzzoTXvzzszDzzzcz7bzztwTzzzUyCDzzlszzzz1wMTzzXkzzzz3nUzyS7Zzzzy7DUzsQD7zzzyCT0zU0QzzzzwRy0y0CNzzzzszw0s0wnzzzzlzkBc3xbzzzzXTUsMDzDzzzz6z0ksTyTzzzzAw1kkzwzzw"
ImageToText Test Clipboard pass positive. Not in combat work fine, for example if I enter any non-town area w/o golem script summon it. But if buff move left/right script start constantly re-summon golem. As soon as the icon returns to its position, everything returns to normal and loop ended.
-
Contributor
Originally Posted by
BossManAdrostos
the issue im experiencing is that across the top of my screen the script stops working when the buff icon is in the x coordinates of about 500-750
whats strange is if i make the search area much more wide than that, and i activate many aura's and buff icons and push the bladeflurry symbol to the right side of the screen the script works normally. however as my flasks and buffs fall off, the script again stops working while the blade flurry icon is around the 500-700+ range. then when most of my buffs are down and the blade flurry icon moves to the left side of the screen around xcoordinates 250-450 the script starts working again.
i have no idea why the script is specifically not working for me around the 500-700~ range. but thats where my blade flurry icon normally is, so its handicapping the script for me.
i can take a video of whats happening if that would help?
Maybe it needs some leniency when it comes to the individual pixels matching. Adjust the variation within the 0's and 1's by changing the Err0 and Err1 values.
Code:
; X1, Y1 --> the search scope's upper left corner coordinates
; X2, Y2 --> the search scope's lower right corner coordinates
; err1, err0 --> Fault tolerance percentage of text and background (0.1=10%)
the function itself:
Code:
FindText( x1, y1, x2, y2, err1, err0, text, ScreenShot:=1
, FindAll:=1, JoinText:=0, offsetX:=20, offsetY:=10 )
so err1 and err0 are in the 5th and 6th position. In the example I gave you, it would be the two 0's before the word Text. adjust them by putting a decimal. start at .1 and see if there is a difference, try only changing one of them at a time. Start by adjusting the background fault tollerance (err0)
Here is an alternate way of doing it
Code:
KeyBind := "RButton"
IconStr:="|<Blade Flurry Icon>[email protected]$39.000008001k00US0y0071zzU00E0zs00303zk00A0znw00kTk0S06Tw00Tsvz0003fTk0003Tw0000Lz0000Dzk0001zy0000zrs000DznU003zoQ000zy1k007zUD001zw0s00Tz07U03zk0Q00zw4"
BuffCount:="|<6>[email protected]$8.01kUM41gFYN6N3U0U"
Loop
{
if (buff:=FindText(0, 0, 1000, 75, 0, 0, IconStr))
{
If FindText(buff.1.1,buff.1.2 + buff.1.4 + 2,buff.1.1 + buff.1.3,buff.1.2 + buff.1.4 + 15, 0, 0, BuffCount,0)
{
If GetKeyState(KeyBind,"P")
{
Send {%Keybind% up}
Sleep, 10
Send {%Keybind% down}
}
}
}
}
#Include %A_ScriptDir%/data/Library.ahk
Last edited by thebbandit; 01-05-2020 at 01:14 AM.
-
Contributor
Originally Posted by
LongJohnDude
Nope. Just regular 1920 x 1080
About 2 monitor systems - yes I have 2. 2nd one 1280 x1024 but it secondary and I play on first one. Checked coordinate game top-left corner: 0,0 and 2nd monitor top-left: -1280,54
Check this too - 75 is enough.
Maybe I capturing icon in a wrong way? Using default capture sample size (35x16 it a bit less in height then icon) and not trying capture area where something can change. Just tested again - captured icon of Stone Golem buff not actual Golem (which with HP bar, just this greenboarded icon)
Code:
<>*79$71.zzzzzzzzzzzzzzzzzzzzzzzzzvzzzzzzzvzzzY00DzU00Xzzy7zU000DzLzzwVsA0007XjzztW3zzzz13DzzqQTzzzzlaTzzA1zzzzzUAzzyC7zzzzzstzzwSzzzzzzzXzzsTztVnTzzDzzszzk7UDzwTzzkzzUz2DzkzzzUzwVz0Dz1zzzUzkkz0by7zzz1zVls3bsDzzz7y9U0DDsTzzyDwTEByDlzzzsDsxzzwTXzzzoTXvzzszDzzzcz7bzztwTzzzUyCDzzlszzzz1wMTzzXkzzzz3nUzyS7Zzzzy7DUzsQD7zzzyCT0zU0QzzzzwRy0y0CNzzzzszw0s0wnzzzzlzkBc3xbzzzzXTUsMDzDzzzz6z0ksTyTzzzzAw1kkzwzzw"
ImageToText Test Clipboard pass positive. Not in combat work fine, for example if I enter any non-town area w/o golem script summon it. But if buff move left/right script start constantly re-summon golem. As soon as the icon returns to its position, everything returns to normal and loop ended.
when you are capturing the icon, its often best to trim down the majority of the icon itself so that you remain with just the icon within its border.
If you look at the representation of your captured icon, we can see all sorts of area that is required to match.
It can be a bit confusing to realize that the 0's in this image is actually the Err1 and the _'s are Err0
So the 0's are the text that needs to match, and the _'s are the background.
Code:
00000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000
00000000000_00000000000000000000000000000000000000000000000_00000000000
0000000000__0________________00000000000_________________0___0000000000
000000000____0000000000_________________________0000000000_0_0000000000
000000000__0____0000_____00_______________________0000___000_0000000000
000000000__00___0_____00000000000000000000000000_____0____00__000000000
000000000_00__000___0000000000000000000000000000000___00__00__000000000
00000000__00_______00000000000000000000000000000000_______00__000000000
00000000___000____000000000000000000000000000000000000___000__000000000
00000000___0000_0000000000000000000000000000000000000000000___000000000
00000000____00000000000000__00____000__00_00000000000000000__0000000000
000000000___00000000000000_______0000_______00000000000000___0000000000
000000000____0000000000000_____000000____0___000000000000____0000000000
000000000_____0000000000__0____0000000________0000000000_____0000000000
0000000000_____00000000____00____000000______0__00000000____00000000000
0000000000_____00000000____000___0000_______000__000000_____00000000000
00000000000___00000000___0__00_____________0000__0000000____00000000000
00000000000___00000000___00000_0______00_000000___000000___000000000000
0000000000_____0000000___0000_00000000000000000___000000___000000000000
0000000000_0___000000___00000_00000000000000000___000000__0000000000000
0000000000_0___000000___0000__000000000000000000__00000___0000000000000
00000000000_____00000___000___000000000000000000___0000___0000000000000
00000000000_____00000___00____000000000000000000___0000____000000000000
000000000000____0000__000_____00000000000__0000____0000__0_000000000000
000000000000____000__00000_____000000000____000____0000___0000000000000
0000000000000___000__00000______0000000____________000__000000000000000
0000000000000___000_000000_______00000_________000__00__000000000000000
0000000000000___0000000000________000_________0000__00__000000000000000
0000000000000___000000000______00_00_0_______000000_00__000000000000000
0000000000000___00_000000_____000____00_____0000000000__000000000000000
0000000000000___00_000000______00____000____0000000000__000000000000000
00000000000000__00__0000_______000____00____0000000000__000000000000000
Look at this example of my capture of the chaos golem, you can see that I do not have much more than an outline of the golem and I only have the very center area of the icon:
Code:
____________________0__________
______000___________0__________
__000000____________0__________
__000000_____________0_________
__0000000____________000_______
_0000_000___________0000_______
_00000______________00000______
_0000_____0_________00___0_____
00000______________________0___
_0000______________________00__
_000________________________0__
000______0_________________00__
_0_________________________00__
__0_______________________0000_
__00_____________________00000_
___0__________000_______000000_
___000_______0_0_0__00__000000_
____00__0000000000000____00000_
_________000000000000_____0000_
__________00000000000_____0000_
______0___00000000000______000_
__________00000000000__00___00_
___________0000000000__00___00_
___________0000000000_______00_
___________000000_00________0__
___________000000___________0__
___________00000____________0__
____________0000_______________
______________00_______________
______________0________________
_______________0_______________
Code:
"|<C Gol>[email protected]$31.000800Q0403w0201y00U0zU0Q0xk0S0T00DUD1068DU0013k000lk0009k800AE000640007X0007kU1k7sQ1Inw6Tzky07zsD01zw7U8zy1k0TzAM07zaA03zk601yk200z0100T00U07U0000k0000E0000400E"
This icon will always match the icon because thats the only thing its trying to find. I am also using color mode instead of grey diff
Last edited by thebbandit; 01-05-2020 at 12:36 AM.
-
Post Thanks / Like - 1 Thanks
LongJohnDude (1 members gave Thanks to thebbandit for this useful post)
-
Member
thebbandit thanks! I didn’t use your sample, I tried to create something similar myself and it works
Honestly, I did not quite understand, especially regarding the use of "using color mode instead of grey diff" (I was used simple Gray mode?), but I tried to experimentally achieve the similarity of the “picture” and minimize the number of 0, but retaining the recognition of the original (as I understand it, you need to experimentally tune a threshold, and choose the main color according to the situation - it can be as background, and the main image). Definitely, this info is sorely lacking in the wiki.
-
Member
so i tried playing around with the err0. eventually i couldnt really get any combination to work.
however Bandit i followed the steps you provided to use the library.ahk to take capture a new picture of the bladeflurry icon. i used the color mode to generate the code. even still i had to fiddle with the err1 and err0, but got it working. so far it seems perfect now.
so TY so very much for helping me get this figured out. it took a while, my ignorance definitely slowed down my progress, but finally i got it figured out.
for anyone else that wants to try it out, this is the ahk code that worked the best for me so far.
ty again bandit
Code:
KeyBind := "RButton"
Text:="<bladeflurry>#[email protected]$48.7zzzlzXMC000000QQ000000Ss000001bU00010D3U0000Vw3U0000zk3U0000z03U0003w03U000Dw03U000zq03U003z703U00Dy3U3U00zs3s3bU1zk1w3rzrz00yHrzzy00znqTzw00Tnq7zzk0TnzDzzzkDqzzz7zyDwTzw0DzzwTzs00zzwDzU003zwTz0002Tqzy0006zqrw000Dzvzw000Tznjy000Tzmjy001zzWjz001zzWDDU07zzWCDk07zz207k0Dzy207s0Dzw203w0Tzs300000003U0000003U0000003U007k003U00CE003k00A0003k00B0007k00Tk004000Qk000000Qk000000Qk000000Ak000000DU00000020000U"
Loop
{
if FindText(0, 0, 1000, 75, 0.2, 0.1, Text)
{
If GetKeyState(KeyBind,"P") {
Send {%Keybind% up}
Sleep, 10
Send {%Keybind% down}
}
}
}
#Include %A_ScriptDir%/data/Library.ahk
Last edited by BossManAdrostos; 01-05-2020 at 08:23 PM.
-
Member
Is there any ETA for Loot Vacuum fix?
-
Contributor
Originally Posted by
Ozzie11
Is there any ETA for Loot Vacuum fix?
? its working fine, either ask for help configuring, or if you think its an actual bug, then make a bug report.
Originally Posted by
LongJohnDude
thebbanditDefinitely, this info is sorely lacking in the wiki.
I will be adding a wiki page about taking the icon samples when i get some spare time.
-
Member
so maybe I am overly paranoid but you are not worried about bans? I came from the botting side of things and loosing and entire account hurts real bad lol