[EasyUO] Backpack / bag opener

If you make a Client-side script you can publish it here for other players to use
Post Reply
Shindaril
Grandmaster Scribe
Posts: 96
Joined: Tue Jul 01, 2014 12:11 pm

[EasyUO] Backpack / bag opener

Post by Shindaril »

Hiya,

By a private inquiry, I decided to cut this sub off from my main scripts and publish it as a stand alone script. It still uses the same sub with just a simple mainloop, so integrating this into your other scripts is very easy as well. The script has all the comments and as this is a very simple cut off, I'm not giving any more instructions for setup.

Code: Select all

; Shindaril's mainloop cut #1
; No version info available for this one
;
; Backpack and bag opener sub from one of my main scripts
; with a very simple mainloop. That 1s delay shouldn't matter
; but can be easily adjusted.
; This script should be very straight forward, so I won't be
; Adding any better instructions how to set it up for you
; Remember the EasyUO's info area on the right, in the
; Container Info, you can easily find the coordinates of
; the currently active gump to set up the sub

set %CurrentFacet #CursKind    ; Save current facet
set %LBoH BGLWNPD              ; I have three containers...
set %BPouch1 MHAWWTD           ; which I wish to keep allways open...
set %SBoK WFXMOMD              ; along with my backpack, so IDs here

gosub OpenContainers           ; Call the sub at the start to open them all

while #True
{
    if #CursKind <> %CurrentFacet    ; Check if the player has changed facets
    {
        gosub OpenContainers         ; Open them again
        set %CurrentFacet #CursKind  ; Save current facet
    }
    wait 1s
}

sub OpenContainers
    wait 15
    set %LastObject #lObjectID        ; Let's save the #lObjectID
    set #NextCPosX 738                ; You have to change all these coordinates
    set #NextCPosY 610                ; to match your preferances on the locations
    event macro 8 7                   ; Open backpack
    wait 15
    set #NextCPosX 563
    set #NextCPosY 610
    set #LObjectID %LBoH
    event macro 17 0
    wait 15
    set #NextCPosX 389                ; You can add or remove containers
    set #NextCPosY 610                ; by adding or removing sections here
    set #LObjectID %BPouch1
    event macro 17 0
    wait 15
    set #NextCPosX 245
    set #NextCPosY 610
    set #LObjectID %SBoK
    event macro 17 0
    wait 15
    set #nextCPosX 656
    set #nextCPosY 388
    set #lObjectId %LastObject        ; So we can restore it in the end
    return
*EDIT* To those who haven't used EasyUO client to get variable values, here's a simple picture guide how to set this one up. Sorry for a slightly blurry image, best Paint could do when scaling.
Attachments
BackpackOpener.png
BackpackOpener.png (144.46 KiB) Viewed 1173 times
Post Reply