I have made a menu with the 10 things i use most and it seems to be working. Only issue i am having is Event macro 26, which sometimes targets me? Is there a way to only target mobs? Not good when i get hit with curse and corpse skin

I usually use target first which targets then attacks, then use the boost button, which cast curse, corpse skin and consecrete weapon, disco and if they are still alive primary and secondary abilities.
One other thing sometimes if there is a leash say on a vendor it will target that first for the shrink button....
Also i have no idea whether then script is messy or incorrect, apologies if i offend anyone with the unstructed maddness. Im not sure if there is an easier way to use leash either? Also couldnt for the life of me figure out how after i had targeted my leash, do i then target a specific pet, or if you can even do that?
Anyhoo
If anyone with more than my 5 hours experience scripting could have a look and let me know what you think or how to improve, I would appreciate it greatly. Any help no matter how small would be appreciated.
Thanks in advance.... Or alternatively tell me to go jump

The Watcher
Code: Select all
INITEVENTS
menu clear
menu show 535 597
menu window size 300 40
menu window title Things i Need!
Menu Font Bgcolor black
menu font color red
menu button button1 0 0 60 20 Targ Next
menu font color red
menu button button2 60 0 60 20 Boost
menu font color red
menu button button3 120 0 60 20 Disco
menu font color red
menu button button4 180 0 60 20 Primar
menu font color red
menu button button5 240 0 60 20 Secondary
menu font color red
Menu button button6 0 20 60 20 Div Fury
menu font color red
Menu button button7 60 20 60 20 Claim
menu font color red
Menu button button8 120 20 60 20 Claimall
menu font color red
Menu button button9 180 20 60 20 Shrink
menu font color red
Menu button button10 240 20 60 20 Res
set #menubutton n/a
loop:
if #menubutton <> n/a
{
gosub #menubutton
set #menubutton n/a
}
goto loop
sub button1
{
;target next, sometimes targets me? can i change this to target closest enemy?
Event macro 26
;attack last target
Event macro 27
}
sub button2
;boosts
{ setup
beginning:
gosub 1
gosub 2
gosub 3
sub 1
; Curse
event macro 15 26
target 100
Event macro 22
return
sub 2
;corpse skin
event macro 15 103
target 100
event macro 22
return
sub 3
; consecrete weapon
event macro 15 203
return
sub button3
;Disco
event macro 13 15
target 100
event macro 22
return
sub button4
; Primary ability
event macro 35
return
sub button5
; Secondary ability
event macro 36
return
sub button6
; Divine Fury
event macro 15 205
sub button7
;claim
msg [claim$
target 10
return
sub button8
;claimall
msg [claimall$
target 10
return
sub button9
;shrink
finditem GHH
set #lobjectid #findid
event macro 17 0
return
sub button10
;Res
msg [cs restoration$
target 10
return