Jump to content

Join our Slack

Talk to other users and have a great time
Slack Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
hamncheese

Suggestion / Ideas for Addon Based Community

Recommended Posts

i start this thread with some rough idea of an Addon Based Community

as you all know our current most popular way to 'Extend' the functionality of ExiledBot is through the use of AHK (Autohotkey)

a couple hours ago i was making a little script to handle Item Identification , i made this because of the Item Stuck on Cursor bug that has been happening more and more often for me since 0.17a 

this is the crude un-finished script 

F5::
{
	PixelSearch, wisdomx, wisdomy,  316, 292, 799, 499, 0x3b337a, 3, fast
	sleep 500
	MouseMove, 	462, 368 ;First block in bag
	sleep 500
	ImageSearch, unidx, unidy, 316, 292, 799, 499, *n *60 Z:\POE\Path Of Exile\Image\unid2.bmp
	unidyc := unidy + 30
	{
		if ErrorLevel = 0		
		{
			traytip,, found
			MouseMove, %wisdomx%, %wisdomy%
			sleep 200
			Click right %wisdomx%, %wisdomy%
			sleep 200
			MouseMove, %unidx%, %unidyc%
			sleep 200
			click, %unidx%, %unidyc%
			return
		}
		else if ErrorLevel = 1
		{
			MouseMove, 489, 365 ;Second block in bag
			sleep 500
			ImageSearch, unidx, unidy, 316, 292, 799, 499, *n *60 Z:\POE\Path Of Exile\Image\unid2.bmp
			unidyc := unidy + 30
			{
				if ErrorLevel = 0	
				{
					traytip,, found
					MouseMove, %wisdomx%, %wisdomy%
					sleep 200
					Click right %wisdomx%, %wisdomy%
					sleep 200
					MouseMove, %unidx%, %unidyc%
					sleep 200
					click, %unidx%, %unidyc%
					return
				}
				else if ErrorLevel = 1
				{
					MouseMove, 521, 365 ;Third block in bag
					sleep 500
					ImageSearch, unidx, unidy, 316, 292, 799, 499, *n *60 Z:\POE\Path Of Exile\Image\unid2.bmp
					unidyc := unidy + 30
					{
						if ErrorLevel = 0	
						{
							traytip,, found
							MouseMove, %wisdomx%, %wisdomy%
							sleep 200
							Click right %wisdomx%, %wisdomy%
							sleep 200
							MouseMove, %unidx%, %unidyc%
							sleep 200
							click, %unidx%, %unidyc%
							return
						}
					}
				}
			}
		}
	}
		
}

for ppl who used to AHK would see that if i continue this script to the end, it would end up ugly, bloated, and inefficient, but this is the only way i can come up with if i want to handle all item identification using AHK

and that brings a thought to me

 

"if only i could use / access the data / coordinates that are allready inside EB for all the un-identified item in my bag, that data would make the code much much more efficient"

 

so with that in mind

i have a suggestion for EB Developer

how about providing some of the memory/data/coord that EB has read, to some kind of text Feed / Log

something like the Last Item Found Log comes into mind

but more for the various item coordinates, Waypoint, etc

JjbiJvN.png

 

with the Data accessible, the community can easily and efficiently build a strong Addon for the EB

and this would ultimately lessen the burden for the Developer

 

tell me what u guys think 

 

ps : what im trying to do with the above script is pretty simple

scan for wisdom scroll

move mouse to first box 

s1ZAzKa.png

found un-id item ? identify

if not, move to second box 

PqEdjAi.png

found un-id item ? identify

if not, move to third box

.... and so on

 

pps: i use the red Unidentified text/image for my 'found un-id item' part

Edited by hamncheese

Share this post


Link to post
Share on other sites

on another note

i have some script in progress too for pure 1 Click Auto Level

example : 

- newly made toon lv 1

- go to Coast, farm here until lv 5

- lv 5 : go to Mudflats, Farm here until lv 10, open Waypoint

- lv 10 : go to submerged passage, Farm here until lv15, open waypoint

- and so on

 

and i manage to make the bot do this up to Ledge

the problem is if i were to continue the script progress up to act 3 it would get so bloated, and really in effective

IF i can somehow get the data mentioned above, the script would be so much simpler and shorter

Share this post


Link to post
Share on other sites

Nice suggestion, although i don't think Alk will hand out the api to anybody any time soon. He might possibly be able to convert and implement an AHK script if its good enough though.

 

I have some old 'unique chancer' code I started but didn't finish or even test it. If somebody wanted to continue (most likely doesnt work but it's a start):

 

Loop {
 
IfWinActive Path of Exile
 
; search if Stash Tab open
ImageSearch,Px, Py, 40, 40, 1000, 800, C:\Users\Home\Scripts\stashtab.bmp
 
; if stash tab open
if ErrorLevel = 0   {
 
     Send Keys {F12}    ; pause bot
     Sleep, 500
 
     MouseGetPos,x1,y1    ; double check bot is paused
     Sleep,2000
     MouseGetPos,x2,y2
     If ((x1<>x2) or (y1<>y2)) {    ; if bot is paused
 
; search for items
ImageSearch,i1x, i1y, 40, 40, 1000, 800, C:\Users\Home\Scripts\item1.bmp
ImageSearch,i2x, i2y, 40, 40, 1000, 800, C:\Users\Home\Scripts\item2.bmp
ImageSearch,i3x, i3y, 40, 40, 1000, 800, C:\Users\Home\Scripts\item3.bmp
 
if ErrorLevel = 0   {    ; if item found
 
; search for chance orbs
ImageSearch,cx, cy, 40, 40, 1000, 800, C:\Users\Home\Scripts\chanceorb.bmp
if ErrorLevel = 0   {    ; if orb found
 
     MouseMove, %cx%, %cy%    ; right click orbs
     MouseClick, right 
     Sleep, 100 ; 
 
     MouseMove, %ix%, %iy%    ; left click item
     MouseClick, left 
     Sleep, 100 ;
}
 
ImageSearch,ux, uy, 40, 40, 1000, 800, C:\Users\Home\Scripts\unique.bmp
if ErrorLevel = 0   {    ; if unique found
 
       MouseMove, %ux%, %uy%
      MouseClick, left 
     }
 
ImageSearch,sx, sy, 40, 40, 1000, 800, C:\Users\Home\Scripts\stashspace.bmp
if ErrorLevel = 0   {    ; if stash space found
 
       MouseMove, %sx%, %sy%    ; move unique  to stash
      MouseClick, left 
 
} else {
 
ImageSearch,jx, jy, 40, 40, 1000, 800, C:\Users\Home\Scripts\junkitem.bmp
if ErrorLevel = 0   {    ; if junk item found
 
       MouseMove, %jx%, %jy%    ; destroy junk item
      MouseClick, left 
}
 
ImageSearch,jx, jy, 40, 40, 1000, 800, C:\Users\Home\Scripts\destroyitem.bmp
if ErrorLevel = 0   {    ; check for destroy item area
 
       MouseMove, %dx%, %dy%    ; destroy item
      MouseClick, left
  }
 
ImageSearch,jx, jy, 40, 40, 1000, 800, C:\Users\Home\destroyitemyes\Scripts.bmp
if ErrorLevel = 0   {    ; check for destroy item ui option
 
       MouseMove, %d2x%, %d2y%    ; check if item destroyed
      MouseClick, left 
}
}
}
}
}
}
 
sleep, 1000

Edited by hatshacker

Share this post


Link to post
Share on other sites

thats the thing, im not asking about about the API

a simple coords would suffice imo

im going to add some screenshot from the Shoutbox, so maybe other can read and maybe have some idea about this

vhVPMDL.png

Edited by hamncheese

Share this post


Link to post
Share on other sites

Yeah, 100% agree, that would be awesome.

 

However I still didn't fight a good and easy way to convert my code to something modulable.

I found some potential solution (lua, c++ modules, ..) but would need a loooot of code and function prototype rewriting..

 

If anybody has any good solution, I'm open, especially with ahk !

Share this post


Link to post
Share on other sites

nice to know than Alk respoded positively for this 

on a side note

ive never read any disscussion about AHK in here, as in how create a script,  what are those parameters means, etc

seeing as more and more script in AHK are being used by the community i think its not such a bad idea to host discussions in here for EB usage specifics, what do u guys think ? 

 

to start

 

i have this small questions im hoping someone with more knowledge than me can help

		Loop
			{
				offsetmove := %A_Index% * 29 
				box1x := 460 + offsetmove
				mousemove, %box1x%, 365
				sleep 500
				If A_Index = 12
				Break
				else
				Sleep, 1000
			}

what im trying to achieve : 

a simple MouseMove from the First Box in Bag to the Second Box, Third box, and so on

a screenshot to make my mean clearer

v9GsON1.png

wndX5ZO.png

 

from what i understand 

A_Index inside a loop will contain number 1  for the first pass of the loop, on the second pass of the loop will contain 2, and so on

so in my hope 

my variable

OffsetMove := %A_Index% * 29

will contain the number 29 on first pass, 58 on second pass, 87 on third pass

 

Box1x := 460 + OffsetMove

will contain the number 489 on first pass, 518 on second pass, and so on

 

and then the Loop will stop or Break after 12 pass

 

i cant see what im doing wrong here, but the script just wont work

i have tried using A_Index instead %A_Index% and offsetmove instead %offsetmove%

 

hopefully anyone can help me with this

Share this post


Link to post
Share on other sites

How do you read the character level for the leveling script you made?

Cuz i made a leveling script, but that required your character to log out of the account, in order to check the character level.

 

Please do share.

Share this post


Link to post
Share on other sites

oh press C
search image
i made the image in 5 lv increment, that wya theres only 12 image
Zemagic, can u help me with my MouseMove script ?
im desperate here .. 
Item Stuck on Cursor
this bug is killing me :(
atm this is my main priority, how to workaround this bug

i dont know if this will help or not but heres my complete code block of what im trying to do

F5::
{

	ImageSearch, keepx, keepy, 234, 246, 549, 371, *n *30 Z:\POE\Path Of Exile\Image\keep.bmp
	{	
		if ErrorLevel = 0
		{
			send {F12}
			TrayTip,, Keep Item
			click, %keepx%, %keepy%
			sleep 200
			send, i
			sleep 200
			Loop
			{
				offsetmove := %A_Index% * 29
				box1x := 460 + offsetmove
				mousemove, %box1x%, 365
				sleep 500
				PixelSearch, emptyx, emptyy, 442, 349, 781, 492, 0x061e06, 3, fast
				emptysetx := + 30
				emptysety := + 30
				{
					if ErrorLevel = 0
					{
						click %emptysetx%, %emptysety%
						sleep 1000
						send {f12}
						sleep 500
						exitapp
					}
				}
				If A_Index = 12
				Break
				else
				Sleep, 200
			}
		}
	}
}

ps: how do we use Spoiler tag in here ? i tried [spoiler=spoiler]

and didnt worked for me

 

dOh nvm found it

Edited by hamncheese

Share this post


Link to post
Share on other sites

Immo thank you so much for trying to help me, i have tried your code and read all i can about arrays, but i cant wrap my head around it, i dont really understand how to use Arrays

This is what i have tried to do with your code, do u mind taking a look 

F5::
{

_xi := 460 				        	; x-center of first column of inventory
_yi := 370 					        ; y-center of first column of inventory
_countCell := 0

for j, ele in Array
{
	for k, ele in Array[j]
	{
		if (Array[j, k] = 0)
		{
			mousemove, %_xi%, %_yi%
			Sleep 150
		}
		_xi := _xi + 29 	                ; Moves mouse forward 29 pixels
		_countCell += 1 		        ; counter of inventory cells
		if _countCell = 12 
		{
			_yi := _yi + 29 	        ; next inventory row
			_xi := 460 		        ; Reset to first Column of inventory
			_countCell := 0
		}
	}
}

}
Edited by hamncheese

Share this post


Link to post
Share on other sites

i manage to get the script working

this is the script

{
	ImageSearch, keepx, keepy, 234, 246, 549, 371, *n *30 Z:\POE\Path Of Exile\Image\keep.bmp
	{	
		if ErrorLevel = 0
		{
			send {F12}
			TrayTip,, Keep Item
			click, %keepx%, %keepy%
			sleep 200
			send {space}
			sleep 500
			send, i
			sleep 200
			Loop
			{
				ix := ((A_Index - 1) * 29) + 460
				;ix := ((A_Index - 1) * 29) + 365
				mousemove, %ix%, 365
				sleep 500
				PixelSearch, emptyx, emptyy, 442, 349, 781, 492, 0x061e06, 3, fast
				emptysetx := emptyx + 30
				emptysety := emptyy + 30
				{
					if ErrorLevel = 0
					{	
						sleep 500
						click %emptysetx%, %emptysety%
						sleep 500
						send {f12}
						sleep 500
						break
					}
				}
				If A_Index = 12
				Break
				else
				Sleep, 200
			}
		}
	}
} 

 

 

atm the script will do this : 

1. scan if theres "You cant drop items in town" window pops up

bUO7fuK.png

 

2. Window found > click the Kepp buton > Close all window using space > press i to open Bag

 

3. Scan Bag for empty space (judging by green colour on empty space)

 

4. Empty space found > click it

break loop

 

so far its running good

BUT i can only cover 1 instance of when this bug is happening 

there are 2 more instance this that i dont know yet how to handle, maybe someone can help me ?

this is all 3 of the instances that this bug will produce

 

- EB tries to move while holding Item

result : "You cant destroy Item window pops up" , Infinite loop <--- the script manage to handle this one

 

- EB tries open Bag and click Wisdom while holding item <---- mouse is moving all the time quite hard to catch it even with Save Coords method

result : spamming open - close - open -close Bag , infinite loop

 

- EB tries to stash item with Ctrl+click other item while holding item <--- mouse stays in 1 place, can catch with Save Coords, but not sure how to apply the script

result : spamming those 2 item, infinite loop

 

Edit : streamlined the code a bit

ps: im thinking on to block/pause EB while in town and use script to identify (like in my earlier post)

Edited by hamncheese

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...