Jump to content

pulse323

Elite+
  • Content Count

    14
  • Joined

  • Last visited

Posts posted by pulse323


  1. here's the script that im using, the bot wont change zones when timer runs out nor would it change tabs

    ;   ,---------------------------------------------------------.
    ;  | ExiledBot.Zone.Changer [incl. stashTab changing] by immo! |
    ;   `---------------------------------------------------------´
    ;
    ; This script can be found here:
    ; http://exiled-bot.net/community/index.php/topic/814-upd-v16-automatic-zone-changer-incl-stashtab-changing/
    ; If you have any questions or comments please post them there as well. I wont do any support via PM! Use the Thread.
    ; If you think you can help improve this project - I am looking for contributors! So PM me if you think you can help.
    ;
    ; Version: v1.7
    ;
    
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    #Warn  ; Enable warnings to assist with detecting common errors.
    #Persistent ; Only the user can kill the application
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    StringCaseSense, On ; Match strings with case.
    SetWorkingDir %A_ScriptDir%
    CoordMode, ToolTip, Relative
    #MaxThreadsPerHotkey 2
    
    ; User Config
    ; Edit the following variables according to your needs.
    
    _timeZoneChange = 15							; Time in minutes until zoneChange will be initialized.
    
    _numberOfZones = 2								; enter your desired number of different zones you want to use. If using less then 5 zones the unnecessary variables will get skipped ("_zone_to_cleanX", "_zone_to_clean_actX" and "_zone_to_clean_difficultyX").
    
    _zone_to_clean1 = the_city_of_sarn					; enter desired Zone 1 [see coordinates.ini (Exiled Bot) to get the exact writings for the different zones!]
    _zone_to_clean_act1 = 3						; enter desired act for Zone 1
    _zone_to_clean_difficulty1 = 1					; enter desired difficulty for Zone 1 [1=normal, 2=cruel, 3=merciless]
    
    _zone_to_clean2 = waterfall_cave				; enter desired Zone 2 [see coordinates.ini (Exiled Bot) to get the exact writings for the different zones!]
    _zone_to_clean_act2 = 2					; enter desired act for Zone 2
    _zone_to_clean_difficulty2 = 1					; enter desired difficulty for Zone 2 [1=normal, 2=cruel, 3=merciless]
    
    _zone_to_clean3 = the_city_of_sarn						; enter desired Zone 3 [see coordinates.ini (Exiled Bot) to get the exact writings for the different zones!]
    _zone_to_clean_act3 = 3						; enter desired act for Zone 3
    _zone_to_clean_difficulty3 = 1					; enter desired difficulty for Zone 3 [1=normal, 2=cruel, 3=merciless]
    
    _zone_to_clean4 = the_city_of_sarn			; enter desired Zone 4 [see coordinates.ini (Exiled Bot) to get the exact writings for the different zones!]
    _zone_to_clean_act4 = 3					; enter desired act for Zone 4
    _zone_to_clean_difficulty4 = 1				; enter desired difficulty for Zone 4 [1=normal, 2=cruel, 3=merciless]
    
    _zone_to_clean5 = the_city_of_sarn					; enter desired Zone 5 [see coordinates.ini (Exiled Bot) to get the exact writings for the different zones!]
    _zone_to_clean_act5 = 3							; enter desired act for Zone 5
    _zone_to_clean_difficulty5 = 1					; enter desired difficulty for Zone 5 [1=normal, 2=cruel, 3=merciless]
    
    _numberOfStashTabs = 4						; enter your desired number of different stashTabs you want to use. If using less then 5 stashTabs the unnecessary variables will get skipped.
    
    _stash_tab_to_use1 = 1				; Number of stashTab 1 you want to use. [No specific order needed]
    _stash_tab_to_use2 = 2				; Number of stashTab 1 you want to use. [No specific order needed]
    _stash_tab_to_use3 = 3				; Number of stashTab 1 you want to use. [No specific order needed]
    _stash_tab_to_use4 = 4				; Number of stashTab 1 you want to use. [No specific order needed]
    _stash_tab_to_use5 = 						; Number of stashTab 1 you want to use. [No specific order needed]
    
    _path_bot = C:\Users\secnd\Desktop\exiledbot\bot\Exiled Bot Beta v0.13e\	; Path to your Exiled.Bot
    _path_poe = \\vmware-host\Shared Folders\Grinding Gear Games\Path of Exile\					; Path where to where you installed PoE. [don't include game.exe]
    _name_poe = PathOfExile.exe						; Name of the game exe [normally: PathOfExile.exe]
    _name_bot = ExiledBot GUI.exe					; Name of the ExiledBot exe [normally: ExiledBot GUI.exe]
    _name_poe_win = Path of Exile					; Name of the window when you run game exe [normally: Path of Exile]
    _name_bot_win = Exiled Bot (Elite)				; Name of the window when you run exilebot exe [for elites normally: Exiled Bot (Elite)]
    
    _profile_bot = default!								; Name of the Exiled Bot profile used. If you didnt created a new profile use: default!
    
    _ZCPause = F10									; Hotkey to pause/unpause script
    _EBReload = F11									; EB Hotkey to reload ini
    _EBPause = F12									; EB Hotkey to pause/unpause the bot
    
    ;   ,-----------------------------------------------------------------.
    ;  | DO NOT EDIT BELOW THIS LINE - UNLESS YOU KNOW WHAT YOU'RE DOING!  |
    ;   `-----------------------------------------------------------------´
    
    ; some needed calculations
    _timeZoneChangeUser := (((_timeZoneChange * 1000) * 60) + 2000)
    _timeZoneChangeSec := ((_timeZoneChange * 60) + 1)
    
    IniRead, currZone, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    IniRead, currStashTab, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    
    Hotkey, %_ZCPause%, MyPause
    
    ; Font size for the tooltip, leave empty for default
    FontSize := 8
     
    ; Create font for later use
    FixedFont := CreateFont()
     
    ; Creates a font for later use
    CreateFont()
    {
    	global FontSize
    	Options :=
    	If (!(FontSize = ""))
    	{
    		Options = s%FontSize%
    	}
    	Gui Font, %Options%, Courier New
    	Gui Font, %Options%, Consolas
    	Gui Add, Text, HwndHidden, 
    	SendMessage, 0x31,,,, ahk_id %Hidden%
    	return ErrorLevel
    }
    
    ; Sets the font for a created ahk tooltip
    SetFont(Font)
    {
    	SendMessage, 0x30, Font, 1,, ahk_class tooltips_class32 ahk_exe autohotkey.exe
    }
    
    ; getting the difficulty names
    if (_zone_to_clean_difficulty1=1)
    {
    	difficulty1 = Normal
    }
    	else if (_zone_to_clean_difficulty1=2)	
    {
    	difficulty1 = Cruel
    }
    	else
    {
    	difficulty1 = Merciless
    }
    	
    if (_zone_to_clean_difficulty2=1)
    {
    	difficulty2 = Normal
    }
    	else if (_zone_to_clean_difficulty2=2)
    {
    	difficulty2 = Cruel
    }
    	else
    {
    	difficulty2 = Merciless
    }
    	
    ; Menu Entries
    Menu1 = ExiledBot.Zone.Changer.
    ver = v1.6c
    EBVer = Exiled Bot Beta v0.13e
    Menu2 = UserConfig:
    Menu3 = zonechanging every: %_timeZoneChange% Minutes
    Menu4 = Zone 1: %_zone_to_clean1% - Act%_zone_to_clean_act1%/%difficulty1%
    Menu5 = Zone 2: %_zone_to_clean2% - Act%_zone_to_clean_act2%/%difficulty2%
    Menu6 = Zone 3: %_zone_to_clean3% - Act%_zone_to_clean_act2%/%difficulty2%
    Menu7 = Zone 4: %_zone_to_clean4% - Act%_zone_to_clean_act2%/%difficulty2%
    Menu8 = Zone 5: %_zone_to_clean5% - Act%_zone_to_clean_act2%/%difficulty2%
    Menu9 = Stating Zone was: %currZone%
    
    ; Some various fancy tray icon stuff.
    	Menu, tray, Tip, %Menu1%%ver%`nchanging zones since 2013
    	Menu, tray, NoStandard
    	Menu, tray, add, %Menu1%%ver%, RemoveTooltip
    	Menu, tray, disable, %Menu1%%ver%
    	Menu, tray, add, for %EBVer%, RemoveTooltip
    	Menu, tray, disable, for %EBVer%
    	Menu, tray, add
    	Menu, tray, add, %Menu2%, RemoveTooltip
    	Menu, tray, disable, %Menu2%
    	Menu, tray, add, %Menu3%, RemoveTooltip
    	Menu, tray, disable, %Menu3%
    	Menu, tray, add, %Menu4%, RemoveTooltip
    	Menu, tray, disable, %Menu4%
    	Menu, tray, add, %Menu5%, RemoveTooltip
    	Menu, tray, disable, %Menu5%
    	Menu, tray, add, %Menu6%, RemoveTooltip
    	Menu, tray, disable, %Menu6%
    	Menu, tray, add, %Menu7%, RemoveTooltip
    	Menu, tray, disable, %Menu7%
    	Menu, tray, add, %Menu8%, RemoveTooltip
    	Menu, tray, disable, %Menu8%
    	Menu, tray, add
    	Menu, tray, add, %Menu9%, RemoveTooltip
    	Menu, tray, disable, %Menu9%
    	Menu, tray, add
    	Menu, tray, add, Pause (F8), MyPause
    	Menu, tray, add, Exit (F9), ExitSub
    	
    WinMinimizeAll
    Sleep 1000
    
    ; autostart Path of Exile on Scriptstart
    IfWinNotExist, %_name_poe_win%
    {
    	TrayTip, , Starting Path of Exile , 1
    	Sleep 200
    	Run, %_name_poe%, %_path_poe%, , PoE_PID
    	if ErrorLevel = ERROR
    	{
    		MsgBox Cant open %_path_poe%\%_name_poe%
    		exitapp	
    	}
    	WinWait, ahk_pid %PoE_PID%,,3	
    	WinMove, ahk_pid %PoE_PID%, 1, 1 
    	sleep 10000
    }
    else
    {
    	TrayTip, , Path of Exile already running , 1
    	Sleep 200
    	WinGet, PoE_PID, PID, %_name_poe_win%
    	WinWait, ahk_pid %PoE_PID%,,3	
    	WinMove, ahk_pid %PoE_PID%, 1, 1 
    	sleep 200
    }
    
    
    ; autostart Exiled Bot on Scriptstart
    IfWinNotExist, %_name_bot_win%
    {
    	TrayTip, , Starting Exiled Bot , 1
    	Sleep 200
    	Run, %_name_bot%, %_path_bot%, , EB_PID
    	if ErrorLevel = ERROR
    	{
    		MsgBox Cant open %_path_bot%\%_name_bot%
    		exitapp
    	}
    	Sleep 5000
    	WinActivate, %_name_bot_win%
    	ControlClick, ComboBox1, %_name_bot_win%,, Left, 1,  NA
    	sleep 200
    	SendInput, %_profile_bot%
    	sleep 200
    	SendInput, {Enter}
    	sleep 200
    	ControlClick, Button2, %_name_bot_win%,, Left, 1,  NA
    	sleep 200
    	ControlClick, Button3, %_name_bot_win%,, Left, 1,  NA
    	TrayTip, , Starting to bot! , 1
    	WinActivate, %_name_poe_win%
    	Sleep 5000
    }
    else
    {
    	TrayTip, , Exiled Bot already running , 1
    	Sleep 500
    	WinActivate, %_name_bot_win%
    	ControlClick, ComboBox1, %_name_bot_win%,, Left, 1,  NA
    	sleep 200
    	SendInput, %_profile_bot%
    	sleep 200
    	SendInput, {Enter}
    	sleep 200
    	ControlClick, Button2, %_name_bot_win%,, Left, 1,  NA
    	sleep 200
    	ControlClick, Button3, %_name_bot_win%,, Left, 1,  NA
    	TrayTip, , Starting to bot! , 1
    	WinActivate, %_name_poe_win%
    	Sleep 1000
    }
    
    ; Main zone- & stashTab-Changing loop
    TMP := Random(1,_numberOfZones)
    TMPStash := Random(1,_numberOfStashTabs)
    SetTimer, ZC, %_timeZoneChangeUser%
    ZC:
    	; randomizing stash tab switching
    	currStashTab := Random(1,_numberOfStashTabs)
    	if (TMPStash = currStashTab)
    	{
    		currStashTab := Random(1,_numberOfStashTabs)
    	}
    	else
    	{
    		GoSub, STC%currStashTab%
    	}
    	return
    	
    	STC1:
    		IniWrite, %_stash_tab_to_use1%, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    		currStashTab = %_stash_tab_to_use1%
    		GoSub, transfer
    	return
    		
    	STC2:
    		IniWrite, %_stash_tab_to_use2%, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    		currStashTab = %_stash_tab_to_use2%
    		GoSub, transfer
    	return
    		
    	STC3:
    		IniWrite, %_stash_tab_to_use3%, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    		currStashTab = %_stash_tab_to_use3%
    		GoSub, transfer
    	return
    		
    	STC4:
    		IniWrite, %_stash_tab_to_use4%, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    		currStashTab = %_stash_tab_to_use4%
    		GoSub, transfer
    	return
    		
    	STC5:
    		IniWrite, %_stash_tab_to_use5%, %_path_bot%\Configuration\%_profile_bot%\config.ini, stashing, stash_tab_to_use
    		currStashTab = %_stash_tab_to_use5%
    		GoSub, transfer
    	return
    	
    	transfer:
    	sleep 200
    	
    	; trying to randomize the zones	
    	RND := Random(1,_numberOfZones)
    	
    	if (TMP = RND)
    	{
    		RND := Random(1,_numberOfZones)
    	}
    	else
    	{
    		GoSub, ZTC%RND%
    	}
    	return
    	
    	; changing the zone to Zone1
    	ZTC1:
    		IfWinExist, %_name_bot_win%
    		{
    			IniWrite, %_zone_to_clean_act1%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_act
    			IniWrite, %_zone_to_clean_difficulty1%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_difficulty
    			IniWrite, %_zone_to_clean1%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    			currZone = %_zone_to_clean1%
    			TMP = 1
    			GoSub, finalizing
    		}
    	return
    
    	; changing the zone to Zone2
    	ZTC2:
    		IfWinExist, %_name_bot_win%
    		{
    			IniWrite, %_zone_to_clean_act2%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_act
    			IniWrite, %_zone_to_clean_difficulty2%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_difficulty
    			IniWrite, %_zone_to_clean2%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    			currZone = %_zone_to_clean2%
    			TMP = 2
    			GoSub, finalizing
    		}
    	return
    
    	; changing the zone to Zone3
    	ZTC3:
    		IfWinExist, %_name_bot_win%
    		{
    			IniWrite, %_zone_to_clean_act3%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_act
    			IniWrite, %_zone_to_clean_difficulty3%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_difficulty
    			IniWrite, %_zone_to_clean3%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    			currZone = %_zone_to_clean3%
    			TMP = 3
    			GoSub, finalizing
    		}
    	return
    	
    	; changing the zone to Zone4
    	ZTC4:
    		IfWinExist, %_name_bot_win%
    		{
    			IniWrite, %_zone_to_clean_act4%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_act
    			IniWrite, %_zone_to_clean_difficulty4%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_difficulty
    			IniWrite, %_zone_to_clean4%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    			currZone = %_zone_to_clean4%
    			TMP = 4
    			GoSub, finalizing
    		}
    	return
    	
    	; changing the zone to Zone5
    	ZTC5:
    		IfWinExist, %_name_bot_win%
    		{
    			IniWrite, %_zone_to_clean_act5%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_act
    			IniWrite, %_zone_to_clean_difficulty5%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean_difficulty
    			IniWrite, %_zone_to_clean5%, %_path_bot%\Configuration\%_profile_bot%\config.ini, general, zone_to_clean
    			currZone = %_zone_to_clean5%
    			TMP = 5
    			GoSub, finalizing
    		}
    	return
    	
    	finalizing:
    		sleep 200
    		Send {%_EBReload%}
    		TrayTip, , Zone & stashTab changed! , 2
    		SetTimer, RemoveTT, 1000 
    		_timeZoneChangeSec := (_timeZoneChange * 60)
    	return
    return
    
    MyReload:
        Reload
    Return
    
    MyEdit:
        Edit
    Return
    
    ; Simple Pause/Unpause Function
    MyPause:
    	if A_IsPaused
    	{
    		Pause off
    		TrayTip, resuming %Menu1%%ver%!, `nPress %_ZCPause% to pause Script again... , 1, 2
    	}
    	else
    	{
    		TrayTip, %Menu1%%ver% paused!, `nPress %_ZCPause% to resume script... , 1, 2
    		Pause On
    	}
    return
    
    RemoveTooltip:
    	ToolTip
    return
    
    ; inGame overlay for countdown until zoneChange
    RemoveTT:
    	ToolTip, % (_timeZoneChangeSec--<1) ? "" : "   " Menu1 Ver "`n**********************************`nZone & stashTab change in..: " FormatSeconds(_timeZoneChangeSec)"`nsTab.: "currStashTab " | Zone.: " currZone, 590, 30
    	global FixedFont
    	SetFont(FixedFont)
    	If (_timeZoneChangeSec = 0)
    		SetTimer, RemoveTT, Off
    return
    
    ; formating timeDisplay for the inGame overlay to hh:mm:ss format
    FormatSeconds(_timeZoneChangeSec)
    {
    	time = 19990101
    	if _timeZoneChangeSec < 0
    		_timeZoneChangeSec := -_timeZoneChangeSec
    	time += %_timeZoneChangeSec%, seconds
    	FormatTime, mmss, %time%, mm:ss
    	return mmss
    }
    
    ; randomization
    Random(min,max) {
    	Random, out, %min%, %max%
    	return out
    }
    
    ; simple exit routine
    ExitSub:
    	F9::
    	TrayTip, %Menu1%%ver% terminaetd! ,`n, 5
    	sleep 4000
    	ExitApp
    return
    
    
×
×
  • Create New...