;================================== ; Script Name: CEOAnimalLore ; Author: CEO ; Version: 1.7 ; Client Tested with: 4.0.0p ; EUO version tested with: 1.4 (0056) ; Shard OSI / FS: ; Revision Date: 09-20-03 ; Public Release: 07-25-03 ; Purpose: This script will train your Animal Lore to 120 with only 1 Pet and NO Vet required ;================================== ;==================================================================== ;Requirements: ;==================================================================== ; ; ; 1. A boat ; 2. A Cow or other pet, Yes just ONE PET! (Needs to be on the boat) :-) ; Can't get a cow on the boat? If so, this script is probably ; to complex for you. Also, while I used a cow, it's weakness ; is such that a Magic Arrow followed up with a few HP of unintentional ; wrestling sometimes killed it. I tested with GM magery/eval ; and killed it a few times with one hit. You can replace %initcow ; with a stronger animal if you like. ; This script is "RoadKill Healthwatch" compliant, I strongly ; suggest you run that to save your butt while macroing. ; If you want to use RKHW, run RKHW FIRST before starting this script. ; 3. NO Veterinary Skill required. I took a char to 110 with 0 Vet! ; I have no doubt the gains would have continued higher. Infact ; having 0 Vet works best because you get more 'barely help' messages ; so get in more heals. A 'barely help' message is just as good for gain. ; More gain, less regs. I went from 107-110 with 31 Ash, 165 Heals, ; and 17 Peace attempts (Peace no longer needed) in 30 minutes. (using a walrus) ; Veterinary MUST be in the locked position. The script does that for you. ; 4. You of course need available skill points to gain anything. ; 5. Bandaids, 500-750 is a good start, should GM in under 2000. ; 6. Sulfurous Ash, amount varies depending on Vet skill. With 0 Vet you'll ; use about 1/4th as much as bandaids. IE 100 bandaids, 25 ash. ; 7. Do not have a weapon in hand or the secondary hit will likely be ; fatal to the cow. A spell channeling shield would be great and may give ; some secondary gains. ; 8. You must be in a Guild or in Felucca. (I suggest the Guild) ; ; Instructions: ; ; Tame your pet, get it on your boat, and run the script. It'll find everything ; it needs and tell you what's missing. See Requirements above. Bandaids ; and Ash must be visible. ; ; If you run UOA make sure you have the 'Display stat/skill changes' OFF or ; the script may not catch the heal result in #sysmsg. ; ;Warning: Do not use this program for unattended macroing! Not responsible for banned accounts. ; ; Acknowledgements: ; ; Cheffe and the gang, for making UO fun again and something different to do. ; ; Thanks goes to Roadkill, I write and learn by example. His ; code makes good examples and I used a couple of lines of it. :) ; ; Quintok, mostly for the inspiration after watching one of my 2 pets ; die (again) because I didn't have the Vet and I was on a gain. :( So I ; discovered you could gain with one pet. (I manually worked it ; for another 5.0+ gain and then decided it's time to write my first ; useful script.) Used bits of his anti-block code too. (thx) ; ; History: ; ; 07-25-03 Version 1.0 - initial release ; ; 07-25-03 Version 1.1 - removed the requirement for peace by replacing with 'all stop') ; ; 07-26-03 Version 1.2 - :Won't say extra 'all stop's unless health goes below approx. 90% of max ; :Script will now pause itself if health goes below approx. 50% of max, I ; doubt it'll be a cow causing that kind of damage, so best to pause. ; :Removed all the "Display OK" commands and put the error message into the menu window, ; then goes into pause mode, allowing you to fix problem and resume where you left off. ; ; 08-03-03 Version 1.3 - added coded to open backpack incase it gets closed from a server line or not opened to start ; ; 08-05-04 Version 1.4 - Adjusted healtimer to 4 secs (pub 19). ; Checkgain also stays the full time so menu updates catch multple gains on one heal ; ; 09-20-03 Version 1.5 - Added %slowconnection (Values:#false/#true, defaults to #false) to adjust wait times longer ; for modems/slow connections ; 10-02-03 Version 1.6 - Fixed possible problem with MA logic. ; Added code to make sure StatusBar is up all the time instead of just at the beginning of the script. ; Added 'all stay' in a few spots to keep pet closer. ; 10-03-03 Verison 1.7 - Approved! Simpified an if statement in MA. ;------------------------------------------------------------------- initevents ;==================================================================== ;Configuration Section ;==================================================================== ; There are only a few things you need to change, if any. I suggest trying as is with the cow first. ; set %initcow IG_NG ;If you don't wanna use a cow see item 2 above. ;set %initcow YG ; a bull ; ; Others to try if you have high eval/magery and your Magic Arrow kills the cow alot. ; DG - Walrus, about the same as a cow, hits you for about 6-10 HP ; M - snow leopard, 3x more HP, hits you for about 10-14 HP ; AH - Great Hart, 3x more HP, hits about 6-12 HP ; set %lrcsuit #false ;If you got a suit and want to wear it set this to #true, but do you really need to use this? ; You only need Sulfuric Ash. Probably less then 1000. Not worth wearing a suit. set %menuposx 540 ;You can adjust these two numbers to fit your set %menuposy 440 ;setup and position of your windows. ; set %healtimer 40 ;Adjusted for pub 19, increase this if heals take longer (10 = 1 sec) ; set %slowconnection #false ; set to #true if you have a slow connection (modem, etc) ;==================================================================== ;End Configuration Section - Changing anything below this line voids your warranty ;==================================================================== set %version 1.7 chooseskill anil set %scriptstart #scnt set %castarrow #true set %boatongain #false set %maxhits #maxHits - ( #maxHits / 10 ) set %forcepause #maxHits / 2 set %LoreSkillStart #skill set %boaty #charposy set %cow %initcow set %retries 0 set %petaids 0 set %petaidssuccess 0 set %tarrows 0 set #menubutton N/A set *20 ok ;for RK's HealthWatch script, tells if poisoned, hurt, ok set *21 free gosub StatusBarUp if %slowconnection { set %wait1 20 set %wait2 20 set %wait3 20 set %wait4 30 } else { set %wait1 5 set %wait2 10 set %wait3 15 set %wait4 20 } Event SkillLock vete locked wait %wait1 Event SkillLock anil up gosub InitMenu gosub CheckRequirements 9 Event Macro 3 0 raise anchor wait %wait2 Event Macro 3 0 slow forward wait %wait4 gosub AntiBlock ; make sure we're moving before we try our first gain ; ; THE MAIN LOOP ; mainloop: gosub CheckForPause gosub CheckWarMode gosub MagicArrow gosub HealCow gosub AntiBlock gosub RKHealthwatchCheck goto mainloop halt ; ; sub CheckRequirements ;purpose - Make sure we have everything needed to run this script ; 1 = cow, 2 = aids, 3 = sulfurous ash, 9 = all ; if %1 = 1 || %1 = 9 { set %cnt 0 findcow: set *21 busy finditem %cow IF #findkind = -1 { if %cnt <> 3 { set %cnt %cnt + 1 Event Macro 3 0 all follow me wait %wait4 goto findcow } else { if %cow = %initcow { set #menubutton doPause menu font color btnface menu Font BGColor red menu text scriptpause 50 66 Dude, don't have a cow! gosub CheckForPause menu delete scriptpause menu font bgcolor BLACK menu font color red menu font style n set %cnt 0 goto findcow } else { set #menubutton doPause menu font color btnface menu Font BGColor red menu text scriptpause 50 66 Dude you killed your cow! gosub CheckForPause menu delete scriptpause menu font bgcolor BLACK menu font color red menu font style n set %cow %initcow set %cnt 0 goto findcow } } } if %cow = %initcow set %cow #FINDID } set *21 free set %bagcheck #true findaids: if %1 = 2 || %1 = 9 { finditem ZLF C if #findkind = -1 { if %bagcheck { Event Macro 8 7 wait %wait4 set %bagcheck #false goto findaids } set #menubutton doPause menu font color btnface menu Font BGColor red menu text scriptpause 25 66 You need more bandaids! Visible? gosub CheckForPause menu delete scriptpause menu font bgcolor BLACK menu font color red menu font style n set %bagcheck #true goto findaids } set %aids #FINDID } set %bagcheck #true findash: if ( %1 = 3 || %1 = 9 ) && ! %lrcsuit { finditem SZF C if #findkind = -1 { if %bagcheck { Event Macro 8 7 wait %wait4 set %bagcheck #false goto findash } set #menubutton doPause menu font color btnface menu Font BGColor red menu text scriptpause 25 66 You need more Sulfuric Ash! Visible? gosub CheckForPause menu delete scriptpause menu font bgcolor BLACK menu font color red menu font style n set %bagcheck #true goto findash } } return sub HealCow ;purpose - heal your pet and get your gains here. gosub CheckRequirements 1 tryagain: set %boaty #charposy gosub CheckRequirements 2 gosub CheckHealth gosub CheckForPause gosub GuardMe gosub FollowMe set #lobjectid %aids deletejournal set #ltargetid %cow set #ltargetkind 1 set *21 pause Event Macro 17 0 target 5s Event Macro 22 0 wait %wait2 set *21 free if not_damaged in #sysmsg { set %castarrow #true deletejournal return } if too_far_away in #sysmsg || cannot_see_that in #sysmsg { Event Macro 3 0 all follow me wait %wait3 %wait2 Event Macro 3 0 all stay wait %wait1 %wait2 goto tryagain } set %petaids %petaids + 1 gosub CheckForGain if little_damage in #sysmsg || finish_apply in #sysmsg { set %castarrow #true set %petaidssuccess %petaidssuccess + 1 deletejournal gosub UpdateMenuStats 1 return } gosub UpdateMenuStats 1 if barely_help in #sysmsg { goto tryagain } if did_not_stay in #sysmsg { Event Macro 3 0 all follow me wait %wait3 Event Macro 3 0 all stay wait %wait1 %wait2 goto tryagain } return sub GuardMe ;purpose - make sure the status bar is green finditem %cow if #findrep <> 2 && #findrep <> 3 { Event Macro 3 0 all guard me wait %wait2 %wait2 } return sub FollowMe ;purpose - call the pet if it gets out of range finditem %cow if #finddist > 2 { Event Macro 3 0 all follow me wait %wait4 %wait4 Event Macro 3 0 all stay wait %wait1 %wait2 } return sub MagicArrow ;purpose - damage the pet so you have something to heal if ! %castarrow return gosub CheckRequirements 3 set #ltargetid %cow set #ltargetkind 1 if #finddist > 8 { Event Macro 3 0 all follow me wait %wait1 %wait2 Event Macro 3 0 all follow me wait %wait1 %wait2 Event Macro 3 0 all stay wait %wait1 %wait2 } set *21 pause Event Macro 15 4 target 5s Event Macro 22 0 wait %wait3 Event Macro 3 0 all stop wait %wait1 Event Macro 6 0 wait %wait1 Event Macro 6 0 wait %wait1 Event Macro 3 0 all stop wait %wait1 Event Macro 3 0 all follow me set *21 free set %tarrows %tarrows + 1 gosub UpdateMenuStats 2 set %castarrow #false gosub CheckRequirements 1 gosub RKHealthwatchCheck return sub CheckForGain ;purpose - check for gains and stop the boat on the gain spot. if %boatongain set %retries %retries + 1 set %currentskill #skill set %scnt2 #scnt2 + %healtimer CheckGain: if #skill > %currentskill { if ! %boatongain { Event Macro 3 0 stop set %boatongain #true } set %retries 0 gosub UpdateMenuStats 3 set %currentskill #skill goto CheckGain } if %scnt2 < #scnt2 { if %retries = 10 { set %retries 0 set %boaty #charposy Event Macro 3 0 slow forward wait 1s set %boatongain #false } return } goto CheckGain return ; not really needed but it bugs me not to see one sub AntiBlock ;purpose - get the boat out of a jam if %boaty <> #charposy || %boatongain return set %boatx #charposx set %boaty #charposy UnBlock: gosub CheckHealth Event Macro 3 0 left wait 2s 1s if %boatx = #charposx { Event Macro 3 0 right wait 2s 1s } gosub CheckHealth if %boatx = #charposx { Event Macro 3 0 back wait 4s goto UnBlock } Event Macro 3 0 slow forward set %boatx #charposx set %boaty #charposy wait 3s 1s if #charposx = %boatx && #charposy = %boaty goto UnBlock return sub CheckHealth ;purpose - check our health and tell the pet to stop it or use RKHealthwatch gosub StatusBarUp if #hits < %maxhits { Event Macro 3 0 all stop wait %wait1 if #hits < %forcepause { set #menubutton doPause menu font color btnface menu Font BGColor red menu text scriptpause 30 66 Script paused for health reasons! gosub CheckForPause menu font bgcolor BLACK menu font color red menu font style n menu delete scriptpause } } gosub RKHealthwatchCheck return SUB RKHealthwatchCheck ;purpose - pause CEOAnimalLore so RK's Healthwatch can save your butt ; PauseMe: if *20 = ok return wait 5 gotoPauseMe return sub CheckWarMode ;purpose - try and keep us outta war mode so we don't kill our pet if G in #charStatus { set *21 pause Event Macro 6 0 wait 5 set *21 free } return sub InitMenu ;purpose - draw the inital menu window and put it up ;***main window setup*** menu clear menu window size 240 150 menu window title CEO Animal Lore Version %version menu window color black ;***set font color*** menu font bgcolor BLACK menu font color red menu font size 9 menu font style bu ;***display Titles*** menu text railtitle 40 0 CEOAnimalLore Statistics menu font size 8 menu font style n menu text txt 100 15 success/attempts menu font size 9 menu text stattxt 58 30 Heals , #spc , : menu text stattxt 25 45 Magic Arrow , #spc , : ;***skillgain section*** menu font style bu menu font size 9 menu text sktxt 55 85 (tenths) skill gains rate/hr menu font style n menu text sktxt 10 100 Animal Lore gosub UpdateMenuStats 9 menu button doPause 70 120 100 20 Press to Pause set #menubutton N/A menu show %menuposx %menuposy menu hideeuo wait 20 menu show %menuposx %menuposy return sub UpdateMenuStats ;purpose - update the menu stats ; 1=petaids, 2=magicarrows, 3=statgain, 9=all if %1 = 1 || %1 = 9 { menu delete shealtxt menu text shealtxt 115 30 %petaidssuccess / %petaids } if %1 = 2 || %1 = 9 { menu delete smagictxt menu text smagictxt 115 45 %tarrows } if %1 = 3 || %1 = 9 { menu delete loretxt set %anilgain #skill - %LoreSkillStart set %rate %anilgain * 3600 / ( #SCNT - %scriptstart ) menu text loretxt 84 100 #skill ---- %anilgain ---- %rate } return sub StatusBarUp ;purpose - make sure the status bar is up on the char IF #charname = N/A { Event Macro 8 2 wait %wait1 } return sub CheckForPause ;purpose - pause CEOAnimalLore if #menubutton = N/A return doPause: set *21 free ; Make sure RK HealthWatch can save you sitting on a boat doing nothing IF #menubutton = doPause { Event Macro 3 0 all stop wait 5 Event Macro 3 0 stop wait 5 set #menubutton N/A menu delete doPause menu button doResume 70 120 110 20 Press to Resume goto doPause } IF #menubutton = doResume { set #menubutton N/A menu delete doResume menu button doPause 70 120 100 20 Press to Pause if ! %boatongain Event Macro 3 0 slow forward wait 5 return } wait 2s goto doPause return ; not really needed but it bugs me not to see one ;========End of CEOAnimalLore=====