Jump to content

Join our Discord

Talk to other users and have a great time
Discord Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
PoEr

Unlimited City of Sarn without relogging

Recommended Posts

What this script does:

After the bot clears city of sarn, as soon as it sees the city gate the the end of the city, it will open a portal and take you to town, and start new instance from there. This way you won't relogin for each instance. You must have portal gem assigned to a key for this to work (detault T key)

Who can use it:

Everybody except pronoooob

How to use it:

1) Path of Exile game client must be in 800x600 window mode

2) Exiled bot must be working well otherwise

3) In Path of Exile game client, open options, go to UI and make sure "Show Corner Map" is selected.

4) Then move "Map Transparency" slider all the way to right. Make it max.

5) Now start Path of Exile game. Start bot program and take it to City of Sarn by waypoint manually.

6) Exile Bot settings: Change Max run time to a ridiculously high number like 99999. Change "Chicken after" to 100 seconds and 100% map explored.

6) Download and extract the attached file. Open sarn.ahk with text editor, and make sure you change the portal gem key to a key of your choice, if you have it set to anything other than T

7) Run the sarn.ahk file

Enjoy!

This is free service, no donations accepted. If you like my script, consider donating to Exile Bot developer team that gave us this wonderful bot.

It took me several days to get this implemented. It is likely to have bugs. Please let me know if you encounter any bugs. Thanks! :)

Known issues: This script is unable to handle auras. So if you allow PoE bot to handle the auras, auras will be switched on and off in alternate games. If you disable all auras in PoE bot and cast them manually yourself, the auras will remain in effect until the bot chickens or logs out for stashing etc. I have done a lot of scripting in the last few days (I'm not even a programmer, I am still learning all this stuff as a hobby) and I want to take a break from scripting. Hopefully somebody else can write an aura handler for this?

Tips:

If you find that the bot is opening a portal in areas other than the end point of city of sarn, look at this line in the ahk file:

Imagesearch,,, 600, 0, 800, 200, *50 *transwhite sarnencampment.png
lower the number from *50 to *25 or something like that. The lower the number, the more "tight" will be the image matching. If you find that the bot is not opening portal even after it has reached the gate, increase the number from *50 to *75 or even *100. Try different settings and see which one works for you the best.

sarn.zip

  • Upvote 1

Share this post


Link to post
Share on other sites

works good, my only problem is that each time I go back to city of sarn i take off all my auras any tip how to solve that?

Share this post


Link to post
Share on other sites

works good, my only problem is that each time I go back to city of sarn i take off all my auras any tip how to solve that?

In the Exiled Bot settings, disable all your auras. Cast them manually once.

Share this post


Link to post
Share on other sites

What happens when the chicken fails (unique boss) and the toon dies? How are the auras being cast again?

Trivial; but I'm curious... As my toon doesn't get through everytime..

Share this post


Link to post
Share on other sites

What happens when the chicken fails (unique boss) and the toon dies? How are the auras being cast again?

Trivial; but I'm curious... As my toon doesn't get through everytime..

In case of a chicken / death, unfortunately this script will be unable to cast auras. I'm a busy with real life at this time, hopefully somebody can write an aura script to go with this script?

Share this post


Link to post
Share on other sites

Does using your script prevent the bot to stash?

Not at all.

This is how it works:

When it is time to stash, the bot will simply exit game and relogin. After relogin when it's in town, it will stash everything and then start new intance. Of course, it is going to mess up your auras too.

The only time this script activates is when it sees that sarn encampment gate at the end of City of Sarn. Otherwise the script just lies in wait, for the gate to show up.

Share this post


Link to post
Share on other sites

great script bro...just that sometimes my guy will stop and do nth or randomly try to make a portal -> though he can still chicken...

Had same trouble, here's the solution:

In 4 line of script change *50 to some lower number, for example i set it to *25.

Before:

Imagesearch,,, 600, 0, 800, 200, *50 *transwhite sarnencampment.png
After:

Imagesearch,,, 600, 0, 800, 200, *25 *transwhite sarnencampment.png

Share this post


Link to post
Share on other sites

great script bro...just that sometimes my guy will stop and do nth or randomly try to make a portal -> though he can still chicken...

Had same trouble, here's the solution:

In 4 line of script change *50 to some lower number, for example i set it to *25.

Before:

Imagesearch,,, 600, 0, 800, 200, *50 *transwhite sarnencampment.png
After:

Imagesearch,,, 600, 0, 800, 200, *25 *transwhite sarnencampment.png
This may have happened because you did not change map transparency to 100%. Anyway the fix is simple. I also included it in original post. Thanks.

Share this post


Link to post
Share on other sites

portalkey = T

Loop

{

Imagesearch,,, 600, 0, 800, 200, *25 *transwhite sarnencampment.png

If Errorlevel = 1

{

Sleep 100

Continue

}

Else

{

Send {F12}

Sleep 500

MouseClick, right, 33, 50

Sleep, 100

MouseClick, right, 33, 50

Sleep, 100

MouseClick, right, 33, 50

Sleep, 100

MouseClick, right, 33, 50

Sleep, 100

Send %portalkey%

Sleep 4000

Mousemove 400, 300

Sleep 100

Click

Sleep 5000

Send {F12}

Sleep 10000

}

}

was supposed to cancel the aura before jumping into the city, this example is 4 aura

Share this post


Link to post
Share on other sites

This script is unable to handle auras at this time. I won't write any more scripts this week, taking a break. Maybe next week I'll add aura support.

Share this post


Link to post
Share on other sites

this is a great script. found a portal gem so I might try it out. The only bad thing is that I use 5 auras and enduring cry, so I guess I will either have to get rid of an aura or get rid of enduring cry. I guess get rid of enduring cry since I can farm city of sarn in my sleep :D

Share this post


Link to post
Share on other sites

So, I finally did make quite a few changes.

Now you have a global timer that you can set after which the portal is cast and the toon goes through it. Be sure to make a high enough value because it's not safe to try to cast a portal inside bunch of mobs that hit on you.

Also since you cast portals to go back to town, the auras won't be activated. So I used the previous aura script to cast auras with it. They don't need to be cast by the bot right now. It does image search on the auras. You can easily configure what auras you want to cast and on which key they lay. NOTICE: If you use Eldritch Battery or something to boost your mana (with determination aura for example) then put that on the first aura key that you want to use.

Also, I cut down the previous portal image to a 2x2 px image that is then being looked on in the minimap. I tested it in City of Sarn and The Forest and Mud Flats and it found the entrance properly. If it finds the entrance, it'll cast a portal and transport back to town.

So this part is useful for Zones where you start at one point and move your way accross to another one where the entrance is at the opposite end.

In the docks for example it isn't useful and you'll be better off setting zoneEntrance to 'n'. That way it won't cast a portal when a zone entrance appears. Then just limit the run time to something you desire and let the bot explore.

Anyway, here's the current code:

; Define below what keys represent your lower skill bar (from left to right, 5 keys)
; Comment out keys that don't have an aura or an aura you don't wish to use by adding a ; in front of the line
; Set the key with the portal gem is set to the middle button

;aHK1 = q
aHK2 = w
aHK3 = e
aHK4 = r
aHK5 = t


; Set the timeout in milliseconds after which a portal will be casted automatically
portalTimeout = 240000


; Set to 'y' if you want to cast a portal and use it when a zone entrance comes into range
zoneEntrance = y



;
; BELOW BE DRAGONS
;




; Load Direct3DWindow class
WinActivate, ahk_class Direct3DWindow Class



; Function to check if a variable exists
varExist(ByRef v)
{
    ; Requires 1.0.46+
    return &v = &n ? 0 : v = "" ? 2 : 1 
}



#Persistent
SetTimer, castAuras, 100
SetTimer, usePortal, %portalTimeout%
return



usePortal:
; Get active window title
WinGetActiveTitle, Title
if (Title = "Path of Exile")
{
    Send {F12}
    Sleep 500
    MouseClick, Middle,,
    Sleep 4000
    Mousemove 400, 300
    Sleep 100
    Click
    Sleep 5000
    Send {F12}
    Sleep 10000
}
return




castAuras:
; Get active window title
WinGetActiveTitle, Title
if (Title = "Path of Exile")
{
    if varExist("aHK1") = 1
    {
        CoordMode, Pixel, Relative
        PixelSearch, FoundX, FoundY, 526, 599, 549, 622, 0xffffff, 0, Fast RGB
        if ErrorLevel = 0
        {
            Send {%aHK1%} ;
        }
    }

    if varExist("aHK2") = 1
    {
        CoordMode, Pixel, Relative
        PixelSearch, FoundX, FoundY, 556, 599, 580, 622, 0xffffff, 0, Fast RGB
        if ErrorLevel = 0
        {
            Send {%aHK2%} ;
        }
    }

    if varExist("aHK3") = 1
    {
        CoordMode, Pixel, Relative
        PixelSearch, FoundX, FoundY, 587, 599, 611, 622, 0xffffff, 0, Fast RGB
        if ErrorLevel = 0
        {
            Send {%aHK3%} ;
        }
    }

    if varExist("aHK4") = 1
    {
        CoordMode, Pixel, Relative
        PixelSearch, FoundX, FoundY, 618, 599, 641, 622, 0xffffff, 0, Fast RGB
        if ErrorLevel = 0
        {
            Send {%aHK4%} ;
        }
    }

    if varExist("aHK5") = 1
    {
        CoordMode, Pixel, Relative
        PixelSearch, FoundX, FoundY, 649, 599, 672, 622, 0xffffff, 0, Fast RGB
        if ErrorLevel = 0
        {
            Send {%aHK5%} ;
        }
    }

    if (zoneEntrance = "y")
    {
        Imagesearch,,, 650, 20, 800, 180, *50 *TransBlack portal.png
        If Errorlevel = 0
        {
            SetTimer, usePortal, Off
            Send {F12}
            Sleep 500
            MouseClick, Middle,,
            Sleep 4000
            Mousemove 400, 300
            Sleep 100
            Click
            Sleep 5000
            Send {F12}
            ; after going through the portal, make a 30 second timeout so bot can do stashing and stuff... adjust number to your desired result
            Sleep 30000
            SetTimer, usePortal, %portalTimeout%
        }
    }
}
return

Don't forget to download the attached portal.png image and put it into the same folder as your ahk script.

post-153-138501023574_thumb.png

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...