[EasyUO] Shindaril's Bracelet of Binding Helper

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

[EasyUO] Shindaril's Bracelet of Binding Helper

Post by Shindaril »

Hiya,

Here's a simple script to allow you to change from your bracelet between any pre-set bracelets to help using those Bracelets of Binding. The interface is only menu based, but I do think it makes using the script a lot easier and you ( hopefully ) aren't switching bracelets all the time, anyway. I sized it to 5 bracelets total, but read the instructions in the script to easily modify it to your own needs.
BoBHelper.png
BoBHelper.png (9.29 KiB) Viewed 2997 times
It should be pretty failsafe, but naturally, as it's quickly made script, changing bracelets manually without changing it back manually will cause problems.

Code: Select all

; Shindaril's Bracelet of Binding Menu system
; Version 1.0
; Date: 15.11.2015
; First version created on 15.11.2015

; Addind more bracelets is simple and I've marked all the spots you need to change
; to do so by commening the words: Add more here


; Set-up:

; Set your Item IDs here
set %MainBracelet XXXXXXX  ; This should be the bracelet you usually use
set %Reciever     XXXXXXX  ; This is the bracelet other player's bracelets are linked to
set %Bracelet1    XXXXXXX  ; 1st friend
set %Bracelet2    XXXXXXX  ; 2nd friend
set %Bracelet3    XXXXXXX  ; 3rd friend
; Add more here

; Here you can change the names shown in the menu
; You might need to change the menu size
; Remember the correct syntax for strings
set %MainBraceletName Main
set %RecieverName Reciever
set %Bracelet1Name N/A
set %Bracelet2Name N/A
set %Bracelet3Name N/A
; Add more here

set %Container #BackPackID    ; Set the container where the bracelets are stored
set %Pause 6                  ; Increase this if you're laggy or having trouble with changing bracelets


; Do not change below unless you're adding more bracelets

set MenuButton #False
set %Equipped #False
    
gosub ScanForEquipped
gosub DrawMenu

while #True
{
    gosub CheckMenu
    if #Result = 1
    {
        event ExMsg #CharID 2 13 Bracelet not Found! Halting...
        halt
    }
    wait 5
}

sub CheckMenu
    if #MenuButton = MainB
    {
        set #MenuButton #False
        gosub Change %MainBracelet
    }
    if #MenuButton = Reciever
    {
        set #MenuButton #False
        gosub Change %Reciever
    }
    if #MenuButton = Bracelet1
    {
        set #MenuButton #False
        gosub Change %Bracelet1
    }
    if #MenuButton = Bracelet2
    {
        set #MenuButton #False
        gosub Change %Bracelet2
    }
    if #MenuButton = Bracelet3
    {
        set #MenuButton #False
        gosub Change %Bracelet3
    }
    ; Add more here
    if #MenuButton = B0Use
    {
        set #MenuButton #False
        gosub Use %Reciever
    }
    if #MenuButton = B1Use
    {
        set #MenuButton #False
        gosub Use %Bracelet1
    }
    if #MenuButton = B2Use
    {
        set #MenuButton #False
        gosub Use %Bracelet2
    }
    if #MenuButton = B3Use
    {
        set #MenuButton #False
        gosub Use %Bracelet2
    }
    ; Add more here
    return
    
sub DrawMenu
    menu clear                                                 ;
    set #menubutton none
    menu show
    menu Window Title Shindaril's BoB Helper
    menu window color $FF99FF
    menu window transparent 95
    menu window size 140 100  ; Add more here - Change the size of the window if you add more bracelets
    menu Font Name Gautami
    menu Font Size 8
    menu Font Style b
    menu Font BGColor $FF99FF
    menu Font Color $0000DD
    menu button MainB 0 0 140 20 %MainBraceletName
    menu button Reciever 0 20 100 20 %RecieverName
    menu button Bracelet1 0 40 100 20 %Bracelet1Name
    menu button Bracelet2 0 60 100 20 %Bracelet2Name
    menu button Bracelet3 0 80 100 20 %Bracelet3Name
    ; Add more here
    menu button B0Use 100 20 40 20 Use
    menu button B1Use 100 40 40 20 Use
    menu button B2Use 100 60 40 20 Use
    menu button B3Use 100 80 40 20 Use
    ; Add more here
    menu show
    return
    
sub ScanForEquipped
    set %Scan %MainBracelet , _ , %Reciever , _ , %Bracelet1 , _ , %Bracelet2 , _ , %Bracelet3 , _   ; Add more here - Add to the list for the search
    finditem %Scan C_ , #CharID
    if #FindKind = -1
    {
        return 1
    }
    set %Equipped #FindID
    return
    
sub Change
    gosub ScanForEquipped
    if %1 = %Equipped
    {
        return
    }
    exevent drag %Equipped
    wait %Pause
    exevent dropc %Container
    wait %Pause
    exevent drag %1
    wait %Pause
    exevent droppd
    wait %Pause
    set %Equipped %1
    return

sub Use
    finditem %1 C_ , #Charid
    if #FindKind = -1
    {
        return 1
    }
    set #LObjectID %1
    event macro 17 0
    return
Hope you like it.
-Shindaril
Corn
Apprentice Scribe
Posts: 13
Joined: Tue Feb 10, 2015 1:03 pm

Re: [EasyUO] Shindaril's Bracelet of Binding Helper

Post by Corn »

I did :DD great job!!
Widmo
Novice Scribe
Posts: 9
Joined: Tue Jan 26, 2016 2:51 pm

Re: [EasyUO] Shindaril's Bracelet of Binding Helper

Post by Widmo »

Hello,
Grat script, but how I can know IDs of barcelets? I have all barcelets in second backpack should I change ID of this countener too?
Annachie
Elysium Beta Tester
Posts: 487
Joined: Thu Aug 22, 2013 8:21 pm

Re: [EasyUO] Shindaril's Bracelet of Binding Helper

Post by Annachie »

Widmo wrote:Hello,
Grat script, but how I can know IDs of barcelets? I have all barcelets in second backpack should I change ID of this countener too?
What you do is start easyuo, go back to the game, pick up and move the bracelet, then go to easyUO and look for #LLIFTEDID in the Last Action section.

That should show the id of the last thing you moved, in this case the bracelet.

As for the containers, Yes I think so. You can get the ID of the container the same way.
The bag containing them will probably need to be open too
Character name: Ebony
Shindaril
Grandmaster Scribe
Posts: 96
Joined: Tue Jul 01, 2014 12:11 pm

Re: [EasyUO] Shindaril's Bracelet of Binding Helper

Post by Shindaril »

Hiya Widmo,

You can also use one of the scripts made to find the ItemID/ItemType or objects published on the PSL, like this one:

http://www.easyuo.com/forum/viewtopic.php?t=528

-Shindaril
Locked