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
Sign in to follow this  
jpbot

Destroy item script

Recommended Posts

some people ask for destroy item script, this is part of my EEB ahk script.

 

 

1.- make a directory named ahk (or whatever) in this directory make another directory named "images", save this image there.   post-6429-0-18598900-1391060385.png

 

2.- in ahk directory make a file named whatever.ahk and copy&paste this script: 

;--------------------------------------------------------------------------------------------------------------------;
; DExalt  v1 -    by jpbot (aka exalt destroyer)
;
;
;--------------------------------------------------------------------------------------------------------------------;
; Functionality:  
;			In town: Check for keep/destroy screen and press destroy.
;

;			
;--------------------------------------------------------------------------------------------------------------------;
;~ #MaxThreadsPerHotkey 2
CoordMode, Pixel, Relative
SetWorkingDir %A_ScriptDir%
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;----------------------------------- Each patch check/update this ---------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
_activeSkillInTown := 0x575757 ;pixel color for active skill in town
_activeSkillInMap := 0x507BA5 ;pixel color for active skill  out of town
_activeSkillInMapInactive := 0x374659 ;pixel color for active skill  out of town without mana
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;

_path_images := "C:\ahk\images"

;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;----------------------------------------  !!!!! Stop Here !!!!!  ---------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;
;--------------------------------------------------------------------------------------------------------------------;

;
;
;--------------------------------------  !!!!! Internal Variables !!!!!  --------------------------------------------;
;
;
_inTown := false ;
_mapRetry := 0

;-------------------------------------------------------------
;
; start
;
;-------------------------------------------------------------

Loop  ; Main
{
	
	if inTown()
		checkDestroy()
	
	Sleep 500

	if inMap()
	{		
		loop  ;in map loop		
		{
			if inMap()
			{				
				;~ if !inBattle()
					;~ TrayTip,, not in a battle, 1
					;~ checkQuickFlask()
					;~ gemLevel()
				sleep 10
			}
			else 
			{									
				if _mapRetry > 1
				{
					_mapRetry := 0					
					break ;not in game					
				}
				_mapRetry += 1
			} 

			;~ checkStuck()	
			Sleep 500			
			
		} ;end in game loop
		
		
	} ;end first pixel search active skill

} ;end loop



;-------------------------------------------------------------
;
; Functions
;
;-------------------------------------------------------------

; --check if we are in town !!!
inTown() 
{ 	
	global	
	PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInTown%, 0, Fast  ;check for active skill
	if !ErrorLevel 
		return true
	else
		return false		
}


; --check if we are in any map !!!
inMap() 
{ 
	global	
	PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInMap%, 0, Fast  ;check for active skill
	if !ErrorLevel 
		return true

	PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInMapInactive%, 0, Fast  ;check for active skill
	if !ErrorLevel 
		return true
	
	return false
	
}

;
; --check  for keep/destroy screen????
checkDestroy()
{
	global	
	ImageSearch, Px, Py, 275,290, 550, 370,*100 %_path_images%\destroy.png   ;search for keep/destroy screen????
	if !ErrorLevel
	{
		Click %Px%, %Py%        
		Sleep 200  
	}	
	Sleep 10	

}


;
;
;

End:: 
	exitapp
	

 

 3.- run the script

 

 

NOTE: Every patch you need manually check and maybe update 3 variables

 

_activeSkillInTown := 0x575757 ;pixel color for active skill in town
_activeSkillInMap := 0x507BA5 ;pixel color for active skill  out of town
_activeSkillInMapInactive := 0x374659 ;pixel color for active skill  out of town without mana 
use this script: 

#SingleInstance
CoordMode, Pixel, Relative
SetWorkingDir %A_ScriptDir%

;get pixel color for active skill
F3::
		
	Loop
    {
		PixelGetColor, color, 655, 582 		
		TrayTip,, %color%, 2
		Sleep 1000 
	}

return


;verify pixel color for active skill
F4:: 
	
	_activeSkillInTown := 0x575757 ;pixel color for active skill in town
	_activeSkillInMap := 0x507BA5 ;pixel color for active skill  out of town
	_activeSkillInMapInactive := 0x374659 ;pixel color for active skill  out of town without mana
	_inTown := 0
	
	
	Loop ;active skill
    {
		if inMap()
			TrayTip,, In Map, 2
		else
			if inTown()
				TrayTip,, In Town, 2
			else
				TrayTip,, Checking..., 2
		
		sleep 1000
	}

	; --check if we are in any map !!!
	inMap() 
	{ 
		global	
		IfWinExist, Path of Exile 
			WinActivate		

		PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInMap%, 0, Fast  ;check for active skill
		if !ErrorLevel 
			return true

		PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInMapInactive%, 0, Fast  ;check for active skill
		if !ErrorLevel 
			return true
		

		return false
		
	}
	
	; --check if we are in town !!!
	inTown() 
	{ 	
		global			
										
		PixelSearch, Px, Py, 655, 582, 655, 582, %_activeSkillInTown%, 0, Fast  ;check for active skill
		if !ErrorLevel 
			return true
		else
			return false

	}	
	
	return


F2::

			Send {F12} ;pausing the bot
			Sleep 250
			quitPoEtoLogin()
			Sleep 2000   
			Send {F12} ;un pausing the bot				
			Sleep 250

return
	
	

esc::
	msgbox script closed by user
exitapp
 

Check my EEB script post for more info about update town check variables

Edited by jpbot

Share this post


Link to post
Share on other sites

1st

quitPoEtoLogin() this line giving error msg. i delete it, changed coordinates for my main skill button, taking 3 different color code for it, put my coordinates in all coordinate lines in script (except the line with coord for destroy window search). Also i changed destroy pic, coz it different with mine (using texture quality10) and that bitch dont want to wirdk! Dont understand why. Also i dont understand how pixel check work. dammit im badly need that script :(

Edited by mbxnir

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...
Sign in to follow this  

×
×
  • Create New...