Page 1 of 2

[EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Tue May 19, 2009 3:24 pm
by BlaZe
Introducing the Pet FightR, your new favorite tool for using those meatshields to their full potential. At the moment it supports 5 targets, but I will make a 10-target one in the future. Before then I want to be sure I have all the features I have in mind implemented.
Pet FightR Menu.JPG
Pet FightR Menu.JPG (24.88 KiB) Viewed 24771 times
This is what the menu looks like with 5 targets added. If you are using less than that there won't be as much clutter, of course. You'll notice I say 'targets' and not 'pets' because the script won't check if what you have targeted is actually a pet. This means you can add yourself or party members to the list. Don't expect me to react much if you say 'BlaZe stay', however. :P

What I especially like about the script is the ability to loop your spells easily. For example: if I click +Heal+ for Jim, I can click it again while the spell is casting and when it has healed him it will attempt to cast again. Now while this is happening Johnny gets poisoned, so I click +Cure+ under Johnny and when it has started casting Repurgo I can go back to +Heal+ Jim some more. The script assumes you have max (6) Faster Cast Recovery, but if you get a '..not recovered from casting' message it will add a short delay to your future casting. You can tweak this delay up a little by modifying %recov at the beginning.

Just Copy and Paste into EasyUO and hit play. Might want to click Save too.

Many thanks to RoadKill for his GetName sub, since I'm still a novice when it comes to some things. :)

Upcoming Features (The Wish List)
- Shrinking and Retargetting support
- Self-health watch with [bandself
- Up to 10-target support
- Misc. menu tweaking for best layout

Revision History
v1.2.1 (9/22) Added chivalry and magery support, adjusted the menu, more casting hangs fixed (big one was spell interruption).
v1.2 (7/17) Fixed hang when casting while paralyzed or when attempting to cast 2 spells at once; added a timeout as well, just in case. When the script bumps up the casting delay it will now inform you of what it is at, useful if you wish to preset the %recov delay.
v1.1 (5/21) Changed how the script finds bandies.

Code: Select all

; BlaZin' Pet FightR
; by BlaZe Budd of Excelsior's ßud ßrothers
set %version 1.2.1a ; Completed 9/22/09
;
; How to use: Hit play
;             Click Add
;             Choose a target (or 5)
;             The rest is self-explanitory
;
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %spells cleric
; Use Cleric, Chivalry or Magery spells
set %recov 0
; Preset casting delay, 20 = 1 second
; The script will automatically determine your
; delay if you don't wish to fiddle with this.
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
; No need to edit below here
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %pets 0
set #lpc 50
set #menuButton N/A
goSub menu %pets
menu hideEUO
menu show
loop:
  if #menuButton = closed
    halt
  if #menuButton = addPet 2
    set #menuButton N/A
    goSub addPet
  if #menuButton = allKill 2
    set #menuButton N/A
    event macro 1 0 all kill
  if #menuButton = allGuard 2
    set #menuButton N/A
    event macro 1 0 all guard
  if #menuButton = allFollow 2
    set #menuButton N/A
    event macro 1 0 all follow
  if #menuButton = allCome 2
    set #menuButton N/A
    event macro 1 0 all come
  if #menuButton = allStay 2
    set #menuButton N/A
    event macro 1 0 all stay
  if #menuButton = allStop 2
    set #menuButton N/A
    event macro 1 0 all stop
for %pet 1 %pets
  {
  if #menuButton = kill . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet kill
  if #menuButton = guard . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet guard
  if #menuButton = follow . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet follow
  if #menuButton = come . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet come
  if #menuButton = stay . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stay
  if #menuButton = stop . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stop
  if #menuButton = aids . %pet 2
    set #menuButton N/A
    goSub aids %petID . %pet
  if #scnt2 > %recov
    {
    if #menuButton = heal . %pet 2
      set #menuButton N/A
      goSub cast heal %petID . %pet
    if #menuButton = boon . %pet 2
      set #menuButton N/A
      goSub cast boon %petID . %pet
    if #menuButton = cure . %pet 2
      set #menuButton N/A
      goSub cast cure %petID . %pet
    }
  }
goto loop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub menu
  if %menu
    goto newPet
  menu clear
  menu window size 300 205
  menu window title BlaZin' Pet FightR v %version
  menu window color black
  menu font bgColor black
  menu font color red
  menu font size 9
  menu font style u
  menu text txt 5 4 ¤ ALL ¤
  menu font style b
  menu button addPet 0 150 50 50 Add
  menu font color purple
  menu button allKill 0 24 50 18 Kill
  menu button allGuard 0 42 50 18 Guard
  menu font color white
  menu button allFollow 0 60 50 18 Follow
  menu button allCome 0 78 50 18 Come
  menu font color purple
  menu button allStay 0 96 50 18 Stay
  menu button allStop 0 114 50 18 Stop
  set %menu #true
  if %1 = 0
    return
newPet:
  set %x ( 50 * ( %1 - 1 ) ) + 50
  menu font style b
  menu font color white
  menu button kill . %1 %x 24 50 18 Kill
  menu button guard . %1 %x 42 50 18 Guard
  menu font color purple
  menu button follow . %1 %x 60 50 18 Follow
  menu button come . %1 %x 78 50 18 Come
  menu font color white
  menu button stay . %1 %x 96 50 18 Stay
  menu button stop . %1 %x 114 50 18 Stop
  menu font color yellow
  menu button heal . %1 %x 132 50 18 +Heal+
  menu button cure . %1 %x 168 50 18 +Cure+
  menu font color green
  menu button boon . %1 %x 150 50 18 +Boon+
  menu button aids . %1 %x 186 50 18 +Aids+
  menu font style i
  menu edit name . %1 %x 0 50 +++++++
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub addPet
  if %pets = 5
    return
  set %pets %pets + 1
  goSub menu %pets
  set #targCurs 1
  targ:
  if #targCurs = 1
    goto targ
  set %petID . %pets #lTargetID
  goSub GetName #lTargetID name
  set %petName . %pets %name
  menu delete name . %pets
  menu font color red
  menu edit name . %pets %x 0 50 %petName . %pets
  menu font size 9
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub cast
  set #lTargetID %2
  set #lTargetKind 1
  deleteJournal
  if boon in %1
    event macro 1 0 [cs SacredBoon
  if heal in %1
    {
    if cleric in %spells
      event macro 1 0 [cs TouchOfLife
    if chiv in %spells
      event macro 1 0 [cs closewounds
    if mage in %spells
      event macro 1 0 [cs heal
    }
  if cure in %1
    {
    if cleric in %spells
      event macro 1 0 [cs Purge
    if chiv in %spells
      event macro 1 0 [cs CleanseByFire
    if mage in %spells
      event macro 1 0 [cs cure
    }
  set #targCurs 0
  goSub journal
  if pass in #result
    {
    target
    event macro 22 0
    set #scnt2 0
    return
    }
  if recov in #result
    {
    set %recov %recov + 5
    event ExMsg #charID 3 33 + Cast Delay: %recov +
    }
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub aids
  set #lTargetID %1
  deleteJournal
  event macro 1 0 [band
  gosub journal
  if fail in #result
    return
  aidsLoop:
  findItem %1 G_
  if #findKind = -1
    event exMsg #charID 3 33 Target not found!
  if #findDist > 1
    {
    event pathFind #findX #findY
    wait 5
    goto aidsLoop
    }
  if #findDist < 2
    event macro 22
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub journal
set #scnt 0
journalLoop:
  if #targCurs = 1
    return pass
  for %scan 1 3
    {
    scanJournal %scan
    if not_yet_recovered in #journal
      return recov
    if mana_required_for_this_spell in #journal
    + || spell_fizzles in #journal || Cannot_find_bandage in #journal
    + || spell_while_frozen in #journal || already_casting_a_spell in #journal
    + || Your_concentration_is_disturbed in #journal || that_spell_in_this_form in #journal
    + || Speak_to_invoke_this_prayer in #journal || spell_fizzles in #journal
    + || Piety_to_invoke_this_prayer in #journal || More_reagents_are_needed in #journal
    + || beneficial_acts_on_your in #journal || #scnt > 4
      return fail
    }
  wait 1
  goto journalLoop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
;**
;* @name GetName
;* @author Roadkill
;* @ver 1.0 24Jan04
;* @purpose get the name of a creature/vendor
;* @params %1= the id of the thing whose name you want, required
;*   @%2= variable name to return the ID in, required
;* @returns @%2 and #result
;* @changes #property, #strres, @%2, !strlength
;* @example call rksubs.txt GetName %beetle beetlename
;* @status: tested
sub GetName
  finditem %1
  if #findkind = -1
    return error-cant_find
  event property #findid
  str pos #property $
  set !strlength #strres - 2
  str left #property !strlength
  set % . %2 #strres
return % . %2
;===============================

Re: [EasyUO] BlaZin' Pet FightR

Posted: Tue May 19, 2009 6:55 pm
by Gumbi
this is awesome. will use

Re: [EasyUO] BlaZin' Pet FightR

Posted: Tue May 19, 2009 8:14 pm
by forced entry
nice work gonna be on when ever i go hunt

Re: [EasyUO] BlaZin' Pet FightR

Posted: Wed May 20, 2009 4:16 pm
by BlaZe
Thanks, please be sure to give me suggestions on what would make it better. I plan on adding a 'shrink' button and (if possible) something to track your pets HPs/Status on the menu.

Re: [EasyUO] BlaZin' Pet FightR

Posted: Wed May 20, 2009 4:21 pm
by Skyla
Okay this could actually come in useful since I tend to give my pets somewhat long names.. gets annoying typing them in sometimes lol. Thanks! :D

Re: [EasyUO] BlaZin' Pet FightR

Posted: Thu May 21, 2009 4:04 pm
by +Colibri
Great to see scripts that work on systems that i've built (at least in part, hehe). Well actually i just made the [cs but still great lol :)

Re: [EasyUO] BlaZin' Pet FightR

Posted: Tue Sep 22, 2009 8:15 pm
by BlaZe
Bump for v1.2.1 release.

Give me some input on what should be added to future revisions!

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Tue Sep 29, 2009 12:59 am
by Decidion
This is a pretty cool script!

Adding the shrink capability would rock, and so would a button that auto opens the selected pets backpack. Then I got 5 mules out, all standing on top of one another, trying to target the right one to shrink or open his backpack is pretty tough!

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Fri Nov 25, 2011 7:28 am
by anarchy
feeds them and does animal lore :P would be nice but all in all nice script :)

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Thu Dec 06, 2012 7:50 am
by Ninfa
thanks

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a - Modded

Posted: Thu Dec 06, 2012 8:53 am
by Xavian
NEW AND IMPROVED!

I saw this post necro'd so I figured I'd add to the script. It now includes shrinking and lore. Working on adding the feeding and pack things I saw requested as well.

EDIT:
Ok, this thing is done. Shrink, Lore, Feed and Pack added. Tested, works. Problem solved, problem staying solved

Code: Select all

; BlaZin' Pet FightR
; by BlaZe Budd of Excelsior's ßud ßrothers
set %version 1.2.1a ; Completed 9/22/09
;
; How to use: Hit play
;             Click Add
;             Choose a target (or 5)
;             The rest is self-explanitory
;
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %spells cleric
; Use Cleric, Chivalry or Magery spells
set %recov 0
; Preset casting delay, 20 = 1 second
; The script will automatically determine your
; delay if you don't wish to fiddle with this.
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
; No need to edit below here
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %pets 0
set #lpc 50
set #menuButton N/A
goSub menu %pets
menu hideEUO
menu show
loop:
  if #menuButton = closed
    halt
  if #menuButton = addPet 2
    set #menuButton N/A
    goSub addPet
  if #menuButton = allKill 2
    set #menuButton N/A
    event macro 1 0 all kill
  if #menuButton = allGuard 2
    set #menuButton N/A
    event macro 1 0 all guard
  if #menuButton = allFollow 2
    set #menuButton N/A
    event macro 1 0 all follow
  if #menuButton = allCome 2
    set #menuButton N/A
    event macro 1 0 all come
  if #menuButton = allStay 2
    set #menuButton N/A
    event macro 1 0 all stay
  if #menuButton = allStop 2
    set #menuButton N/A
    event macro 1 0 all stop
  if #menuButton = allshrink 2
    set #menuButton N/A
    gosub shrinkall
  if #menuButton = food 2
  {
    set #menuButton N/A
    set #TARGCURS 1
      while #TARGCURS = 1
        wait 10
      finditem #ltargetid
      set %food #findtype
      msg %food $
  }
for %pet 1 %pets
  {
  if #menuButton = kill . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet kill
  if #menuButton = guard . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet guard
  if #menuButton = follow . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet follow
  if #menuButton = come . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet come
  if #menuButton = stay . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stay
  if #menuButton = stop . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stop
  if #menuButton = aids . %pet 2
    set #menuButton N/A
    goSub aids %petID . %pet
  if #menuButton = shrink . %pet 2
    set #menuButton N/A
    goSub shrink %petID . %pet
  if #menuButton = lore . %pet 2
    set #menuButton N/A
    goSub lore %petID . %pet
  if #menuButton = feed . %pet 2
    set #menuButton N/A
    gosub feed %petID . %pet
  if #menuButton = pack . %pet 2
    set #menuButton N/A
    gosub pack %petID . %pet
  if #scnt2 > %recov
    {
    if #menuButton = heal . %pet 2
      set #menuButton N/A
      goSub cast heal %petID . %pet
    if #menuButton = boon . %pet 2
      set #menuButton N/A
      goSub cast boon %petID . %pet
    if #menuButton = cure . %pet 2
      set #menuButton N/A
      goSub cast cure %petID . %pet
    }
  }
goto loop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub menu
  if %menu
    goto newPet
  menu clear
  menu window size 300 277
  menu window title Modded BlaZin' Pet FightR v %version
  menu window color black
  menu font bgColor black
  menu font color red
  menu font size 9
  menu font style u
  menu text txt 15 4 ALL
  menu font style b
  menu button addPet 0 226 50 50 Add
  menu font color purple
  menu button allKill 0 24 50 18 Kill
  menu button allGuard 0 42 50 18 Guard
  menu font color white
  menu button allFollow 0 60 50 18 Follow
  menu button allCome 0 78 50 18 Come
  menu font color purple
  menu button allStay 0 96 50 18 Stay
  menu button allStop 0 114 50 18 Stop
;  menu button allshrink 0 132 50 18 Shrink
  menu button food 0 208 50 18 Set Food
  set %menu #true
  if %1 = 0
    return
newPet:
  set %x ( 50 * ( %1 - 1 ) ) + 50
  menu font style b
  menu font color white
  menu button kill . %1 %x 24 50 18 Kill
  menu button guard . %1 %x 42 50 18 Guard
  menu font color purple
  menu button follow . %1 %x 60 50 18 Follow
  menu button come . %1 %x 78 50 18 Come
  menu font color white
  menu button stay . %1 %x 96 50 18 Stay
  menu button stop . %1 %x 114 50 18 Stop
  menu font color yellow
  menu button heal . %1 %x 132 50 18 +Heal+
  menu button cure . %1 %x 168 50 18 +Cure+
  menu button shrink . %1 %x 204 50 18 Shrink
  menu button feed . %1 %x 240 50 18 Feed
  menu font color green
  menu button boon . %1 %x 150 50 18 +Boon+
  menu button aids . %1 %x 186 50 18 +Aids+
  menu button lore . %1 %x 222 50 18 Lore
  menu button pack . %1 %x 258 50 18 Pack
  menu font style i
  menu edit name . %1 %x 0 50 +++++++
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub addPet
  if %pets = 5
    return
  set %pets %pets + 1
  goSub menu %pets
  set #targCurs 1
  targ:
  if #targCurs = 1
    goto targ
  set %petID . %pets #lTargetID
  goSub GetName #lTargetID name
  set %petName . %pets %name
  menu delete name . %pets
  menu font color red
  menu edit name . %pets %x 0 50 %petName . %pets
  menu font size 9
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub cast
  set #lTargetID %2
  set #lTargetKind 1
  deleteJournal
  if boon in %1
    event macro 1 0 [cs SacredBoon
  if heal in %1
    {
    if cleric in %spells
      event macro 1 0 [cs TouchOfLife
    if chiv in %spells
      event macro 1 0 [cs closewounds
    if mage in %spells
      event macro 1 0 [cs heal
    }
  if cure in %1
    {
    if cleric in %spells
      event macro 1 0 [cs Purge
    if chiv in %spells
      event macro 1 0 [cs CleanseByFire
    if mage in %spells
      event macro 1 0 [cs cure
    }
  set #targCurs 0
  goSub journal
  if pass in #result
    {
    target
    event macro 22 0
    set #scnt2 0
    return
    }
  if recov in #result
    {
    set %recov %recov + 5
    event ExMsg #charID 3 33 + Cast Delay: %recov +
    }
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub Lore
  set #ltargetID %1
  event macro 13 2
  target 3s
  event macro 22 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub pack
  set #lobjectID %1
  if D in #charstatus
    event macro 6 0
  wait 5
  event macro 17 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub shrink
  set #ltargetID %1
  finditem GHH C
  if #findcnt < 1
  {
    msg No Leash found, pausing script$
    pause
  }
  set #lobjectID #findID
  event macro 17 0
  target 3s
  event macro 22 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub feed
  finditem %food
  exevent drag #findid 1
  wait 10
  exevent dropc %1
  wait 10
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub aids
  set #lTargetID %1
  deleteJournal
  event macro 1 0 [band
  gosub journal
  if fail in #result
    return
  aidsLoop:
  findItem %1 G_
  if #findKind = -1
    event exMsg #charID 3 33 Target not found!
  if #findDist > 1
    {
    event pathFind #findX #findY
    wait 5
    goto aidsLoop
    }
  if #findDist < 2
    event macro 22
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub journal
set #scnt 0
journalLoop:
  if #targCurs = 1
    return pass
  for %scan 1 3
    {
    scanJournal %scan
    if not_yet_recovered in #journal
      return recov
    if mana_required_for_this_spell in #journal
    + || spell_fizzles in #journal || Cannot_find_bandage in #journal
    + || spell_while_frozen in #journal || already_casting_a_spell in #journal
    + || Your_concentration_is_disturbed in #journal || that_spell_in_this_form in #journal
    + || Speak_to_invoke_this_prayer in #journal || spell_fizzles in #journal
    + || Piety_to_invoke_this_prayer in #journal || More_reagents_are_needed in #journal
    + || beneficial_acts_on_your in #journal || #scnt > 4
      return fail
    }
  wait 1
  goto journalLoop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
;**
;* @name GetName
;* @author Roadkill
;* @ver 1.0 24Jan04
;* @purpose get the name of a creature/vendor
;* @params %1= the id of the thing whose name you want, required
;*   @%2= variable name to return the ID in, required
;* @returns @%2 and #result
;* @changes #property, #strres, @%2, !strlength
;* @example call rksubs.txt GetName %beetle beetlename
;* @status: tested
sub GetName
  finditem %1
  if #findkind = -1
    return error-cant_find
  event property #findid
  str pos #property $
  set !strlength #strres - 2
  str left #property !strlength
  set % . %2 #strres
return % . %2
;===============================

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Fri Dec 07, 2012 4:48 am
by scuba
awesome +1

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Fri Dec 07, 2012 7:33 am
by Yoda
now if it worked for 6 slot packs Id even use it.. atm tops out at 5 heh great job v

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Fri Dec 07, 2012 12:23 pm
by Xavian
Ask and you shall receive. There is now a variable near the top called %numofpets. Put the number in for the amount of pets you are going to use and hit play. Window rezies to the correct size to show all pets, no more and no less.

Code: Select all

; BlaZin' Pet FightR
; by BlaZe Budd of Excelsior's ßud ßrothers
set %version 1.2.1a ; Completed 9/22/09
;
; How to use: Hit play
;             Click Add
;             Choose a target (or 5)
;             The rest is self-explanitory
;
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %spells cleric
set %numofpets 5
; Use Cleric, Chivalry or Magery spells
set %recov 0
; Preset casting delay, 20 = 1 second
; The script will automatically determine your
; delay if you don't wish to fiddle with this.
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
; No need to edit below here
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %size %numofpets * 50
set %size %size + 50
set %pets 0
set #lpc 50
set #menuButton N/A
goSub menu %pets
menu hideEUO
menu show
loop:
  if #menuButton = closed
    halt
  if #menuButton = addPet 2
    set #menuButton N/A
    goSub addPet
  if #menuButton = allKill 2
    set #menuButton N/A
    event macro 1 0 all kill
  if #menuButton = allGuard 2
    set #menuButton N/A
    event macro 1 0 all guard
  if #menuButton = allFollow 2
    set #menuButton N/A
    event macro 1 0 all follow
  if #menuButton = allCome 2
    set #menuButton N/A
    event macro 1 0 all come
  if #menuButton = allStay 2
    set #menuButton N/A
    event macro 1 0 all stay
  if #menuButton = allStop 2
    set #menuButton N/A
    event macro 1 0 all stop
  if #menuButton = allshrink 2
    set #menuButton N/A
    gosub shrinkall
  if #menuButton = food 2
  {
    set #menuButton N/A
    set #TARGCURS 1
      while #TARGCURS = 1
        wait 10
      finditem #ltargetid
      set %food #findtype
      msg %food $
  }
for %pet 1 %pets
  {
  if #menuButton = kill . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet kill
  if #menuButton = guard . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet guard
  if #menuButton = follow . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet follow
  if #menuButton = come . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet come
  if #menuButton = stay . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stay
  if #menuButton = stop . %pet 2
    set #menuButton N/A
    event macro 1 0 %petName . %pet stop
  if #menuButton = aids . %pet 2
    set #menuButton N/A
    goSub aids %petID . %pet
  if #menuButton = shrink . %pet 2
    set #menuButton N/A
    goSub shrink %petID . %pet
  if #menuButton = lore . %pet 2
    set #menuButton N/A
    goSub lore %petID . %pet
  if #menuButton = feed . %pet 2
    set #menuButton N/A
    gosub feed %petID . %pet
  if #menuButton = pack . %pet 2
    set #menuButton N/A
    gosub pack %petID . %pet
  if #scnt2 > %recov
    {
    if #menuButton = heal . %pet 2
      set #menuButton N/A
      goSub cast heal %petID . %pet
    if #menuButton = boon . %pet 2
      set #menuButton N/A
      goSub cast boon %petID . %pet
    if #menuButton = cure . %pet 2
      set #menuButton N/A
      goSub cast cure %petID . %pet
    }
  }
goto loop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub menu
  if %menu
    goto newPet
  menu clear
  menu window size %size 277
  menu window title Modded BlaZin' Pet FightR
  menu window color black
  menu font bgColor black
  menu font color red
  menu font size 9
  menu font style u
  menu text txt 15 4 ALL
  menu font style b
  menu button addPet 0 226 50 50 Add
  menu font color purple
  menu button allKill 0 24 50 18 Kill
  menu button allGuard 0 42 50 18 Guard
  menu font color white
  menu button allFollow 0 60 50 18 Follow
  menu button allCome 0 78 50 18 Come
  menu font color purple
  menu button allStay 0 96 50 18 Stay
  menu button allStop 0 114 50 18 Stop
;  menu button allshrink 0 132 50 18 Shrink
  menu button food 0 208 50 18 Set Food
  set %menu #true
  if %1 = 0
    return
newPet:
  set %x ( 50 * ( %1 - 1 ) ) + 50
  menu font style b
  menu font color white
  menu button kill . %1 %x 24 50 18 Kill
  menu button guard . %1 %x 42 50 18 Guard
  menu font color purple
  menu button follow . %1 %x 60 50 18 Follow
  menu button come . %1 %x 78 50 18 Come
  menu font color white
  menu button stay . %1 %x 96 50 18 Stay
  menu button stop . %1 %x 114 50 18 Stop
  menu font color yellow
  menu button heal . %1 %x 132 50 18 +Heal+
  menu button cure . %1 %x 168 50 18 +Cure+
  menu button shrink . %1 %x 204 50 18 Shrink
  menu button feed . %1 %x 240 50 18 Feed
  menu font color green
  menu button boon . %1 %x 150 50 18 +Boon+
  menu button aids . %1 %x 186 50 18 +Aids+
  menu button lore . %1 %x 222 50 18 Lore
  menu button pack . %1 %x 258 50 18 Pack
  menu font style i
  menu edit name . %1 %x 0 50 +++++++
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub addPet
  if %pets = %numofpets
    return
  set %pets %pets + 1
  goSub menu %pets
  set #targCurs 1
  targ:
  if #targCurs = 1
    goto targ
  set %petID . %pets #lTargetID
  goSub GetName #lTargetID name
  set %petName . %pets %name
  menu delete name . %pets
  menu font color red
  menu edit name . %pets %x 0 50 %petName . %pets
  menu font size 9
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub cast
  set #lTargetID %2
  set #lTargetKind 1
  deleteJournal
  if boon in %1
    event macro 1 0 [cs SacredBoon
  if heal in %1
    {
    if cleric in %spells
      event macro 1 0 [cs TouchOfLife
    if chiv in %spells
      event macro 1 0 [cs closewounds
    if mage in %spells
      event macro 1 0 [cs heal
    }
  if cure in %1
    {
    if cleric in %spells
      event macro 1 0 [cs Purge
    if chiv in %spells
      event macro 1 0 [cs CleanseByFire
    if mage in %spells
      event macro 1 0 [cs cure
    }
  set #targCurs 0
  goSub journal
  if pass in #result
    {
    target
    event macro 22 0
    set #scnt2 0
    return
    }
  if recov in #result
    {
    set %recov %recov + 5
    event ExMsg #charID 3 33 + Cast Delay: %recov +
    }
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub Lore
  set #ltargetID %1
  event macro 13 2
  target 3s
  event macro 22 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub pack
  set #lobjectID %1
  if D in #charstatus
    event macro 6 0
  wait 5
  event macro 17 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub shrink
  set #ltargetID %1
  finditem GHH C
  if #findcnt < 1
  {
    msg No Leash found, pausing script$
    pause
  }
  set #lobjectID #findID
  event macro 17 0
  target 3s
  event macro 22 0
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub feed
  finditem %food
  exevent drag #findid 1
  wait 10
  exevent dropc %1
  wait 10
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub aids
  set #lTargetID %1
  deleteJournal
  event macro 1 0 [band
  gosub journal
  if fail in #result
    return
  aidsLoop:
  findItem %1 G_
  if #findKind = -1
    event exMsg #charID 3 33 Target not found!
  if #findDist > 1
    {
    event pathFind #findX #findY
    wait 5
    goto aidsLoop
    }
  if #findDist < 2
    event macro 22
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub journal
set #scnt 0
journalLoop:
  if #targCurs = 1
    return pass
  for %scan 1 3
    {
    scanJournal %scan
    if not_yet_recovered in #journal
      return recov
    if mana_required_for_this_spell in #journal
    + || spell_fizzles in #journal || Cannot_find_bandage in #journal
    + || spell_while_frozen in #journal || already_casting_a_spell in #journal
    + || Your_concentration_is_disturbed in #journal || that_spell_in_this_form in #journal
    + || Speak_to_invoke_this_prayer in #journal || spell_fizzles in #journal
    + || Piety_to_invoke_this_prayer in #journal || More_reagents_are_needed in #journal
    + || beneficial_acts_on_your in #journal || #scnt > 4
      return fail
    }
  wait 1
  goto journalLoop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
;**
;* @name GetName
;* @author Roadkill
;* @ver 1.0 24Jan04
;* @purpose get the name of a creature/vendor
;* @params %1= the id of the thing whose name you want, required
;*   @%2= variable name to return the ID in, required
;* @returns @%2 and #result
;* @changes #property, #strres, @%2, !strlength
;* @example call rksubs.txt GetName %beetle beetlename
;* @status: tested
sub GetName
  finditem %1
  if #findkind = -1
    return error-cant_find
  event property #findid
  str pos #property $
  set !strlength #strres - 2
  str left #property !strlength
  set % . %2 #strres
return % . %2
;===============================

Re: [EasyUO] BlaZin' Pet FightR v1.2.1a

Posted: Fri Dec 07, 2012 10:22 pm
by Mikey
Awesome Tool. One thing I would change to make it better, is have the health of each animal below it's name. With the imp dogs it's hard to tell which animal is being damaged. It would be easier to heal if their Health appeared below their name in the box. Also, if we had the option to re-arrange the order of the buttons. (I know that would probably be hard to do. But, I'd settle with the health. Thanks a bunch though. I had been looking for something like this.