Need some EUO help from better minds than mine!

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
TheWatcher
Elder Scribe
Posts: 164
Joined: Wed Nov 11, 2009 12:15 am

Need some EUO help from better minds than mine!

Post by TheWatcher »

I have been meesing around with easyuo for most of the day. Having done no coding in the past most of it went over my head. Main reason i wanted a script was one for my bees (to save carpal tunnel) and one for an all in one menu type deal so i dont need to keep pressing macros.

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 :P

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 :P

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


User avatar
Thorgal
Legendary Scribe
Posts: 238
Joined: Mon Aug 23, 2010 8:14 am

Re: Need some EUO help from better minds than mine!

Post by Thorgal »

I have one already made for beehives keeping, it will feed and harvest all your hives, it can also memorise a few set ups. All and all it works great! So thanks to the person who made it ^^

As soon as i get home i will post it on this tread!
User avatar
BlaZe
Legendary Scribe
Posts: 402
Joined: Thu Dec 25, 2008 12:54 am
Location: Ann Arbor, MI; USA

Re: Need some EUO help from better minds than mine!

Post by BlaZe »

Change these:
Make sure the 'New Targeting System' isn't disabled in the UO options, top-right page, for this one to work.

Code: Select all

sub button1
{
;target next, sometimes targets me? can i change this to target closest enemy?
Event macro 26
;attack last target
Event macro 27
}
to

Code: Select all

sub button1
{
;select nearest mobile (also sets the target to Last Target), this may include guildies though.. not sure
Event macro 52 5
finditem #lTargetID
if #findrep = 2 || #findrep = 7 ;just in case we select a guildie or invulnerable creature
  return
;attack selected target
Event macro 53
}
and this

Code: Select all

finditem GHH ;looks for a nearby leash
to this

Code: Select all

finditem GHH C_, #backpackID ;looks for a nearby leash, limited to the player's backpack
You're also missing Returns at the end of subs Div Fury and Next Targ (causes it to start back from the beginning, redrawing the menu), and I'd suggest changing any "msg$" commands to "event macro 1 0" (Say) so the script doesn't hijack your keyboard. :D
EasyUO Devotee
Download
My Popular ScripZ
Pet FightR | Doorman | TrainR: Lockpicking | HealR
Locked