Author
Topic: Assist UO/ Steam UO (Read 6059 times)

Little light on the tutorials around here so here is a nice heal / over watch for you're pet...

You can use this script in two ways....

1.] Map it to a hot key. 2.] Loop the script.

Lets look at the code a little...

if not @findalias! 'pet'

So your like what?!?...

Don't get scared now all this line is doing in English "Hey, program to you have this in your list? If you don't then..."and your asking yourself whats this... well... its the unique id of your Pet in this case...one thing you have to remember is IF is stating a CONDITION. ( example: IF a ball hits your toe... Scream in pain...)

Now that little @ symbol is so that your screen does not get a system message saying HEY I didn't find this or HEY i found this.and ! is so the program does not queue up the command and slow down the macro... on to line two...

sysmsg " Please select the pet you would like to have watched over?!"

This just sends a system message to you so you know it is OK to pick your pet... (note: use "," and not ',' for a sentence that way you don't just get the first word...)

promptalias 'pet'

Now this line is cool... Now that Steam/Assist UO has found out there is NOT an ID assigned to 'pet'. it ask you to select one by just clicking one in game and adds it to the list...

endif

Here ends the CONDITION...

if not @findtype 0xe21 'any' 'backpack'

We have now started a new CONDITION. In English "Hey, if you don not find any bandages in your back pack then do this..."if not means you do not find this type (example: if the ball did not hit your toe... point and laugh... say dumb ball...)

@unsetalias 'pet'

OK, this removes the pet id from the list so you can start over...

stop

Stops the macro in its tracks...

endif

End of CONDITION

It is time to get into the meaty goodness of this code :')

if hits 'pet' !=maxhits 'pet' and @distance 'pet' <= 2

In plain English " If the pets health is anything but full and within 2 game tiles of you then..."IF starts the CONDITION tell the program hey look here then HITS tell it to look at the healthof 'pet' and != compare it to its max health MAXHITS and is the @DISTANCE of 'pet' less than or equal too <= 2 tilesthen do the the following...

bandage 'pet'

That one i don't need to explain do I? (note: you can also use the pets unique id in place of pet it will look something like 0xf54885)

pause 3000

Just telling the script to hold up for 3 seconds 3000 is in milliseconds so 3.5 sec. is 3500 mill. Why so that is the delay between bandages being used might be faster but this seems to work great you can tweak all you want...

endif

end of CONDITION.

if hits 'pet' != maxhits 'pet' and @distance 'pet' > 2

Again like the start of the other condition but this time we are looking for the pet to be more that 2 tiles away.

cast "Greater Heal" 'pet' pause 3000 else

The code is self explanatory but 2 notes >>>> "Spell Name" <<<< use quotes and Capitalize each word in the spell and else means well since the pet is poisoned do this.

cast 'Cure' 'pet' pause 3000 endif

cure it and wait for 3 sec. and end CONDITION.

if @counttype 0xe21 'any' 'backpack' < 10 sysmsg "YOU ARE ALL MOST OUT OF BANDAGES!!!" endif endif

here we are just checking if there are less than < 10 Bandages in are backpack and if there are less than 10 to give you a warning...

Now if you read the whole thing you would realize that that last CONDITION had two CONDITIONS in it. why did i put them inside the other you ask think of each if and end if as a block. the program reads the top of the blockthe first line if the condition is or is not met what ever the case may be it jump to the next if or proceeds trough the block what ever the case may be.