Official ScriptUO EasyUO Scripts > Scripting Tutorials

Healing Script

(1/3) > >>

chasemac140:
So this is my first working script. I am working to alter another to use this script with target and attack subs so you can just destroy w/e mobs you would like :)


--- Code: ---;===================================
;=====Chase's Auto Mage Heals=============================================
;=========================================================================
;=========================================================================
; Script Name: Auto Mage Heals
; Author: Chase
; Version: 1.0
; Shard: OSI
; Revision Date: September 2018
; Purpose: To quickly heal and cure
; This is my first scrip, I am just playing with stuff at the moment.
; Its super simple but if there's a better way to do this please tell me.
;=========================================================================

Mainloop

repeat

if C in #charStatus
gosub cure

if #hits < #maxhits
gosub heal




;=========Cure Sub==================
Sub cure

event macro 15 10
wait 30
event macro 23 0
wait 10
return

;=========Heal Sub==================

Sub heal

event macro 15 3
wait 12
event macro 23 0
wait 5
return




--- End code ---

Tidus:
Few issues with your script.

You have Repeat but you do not tell it what to repeat and until when.  You need to always have Repeat with an Until statement.

Second issue is you will run out of bandages REALLY fast.  You have no way of telling it to wait until it has attempted the full heal or cure.  So it will spam your bandages.  You need to have it either read your journal or set up the timing so that after it uses the bandages it waits a bit to try another one.

Trigs:

--- Quote from: Tidus on September 27, 2018, 07:02:00 AM ---Few issues with your script.

You have Repeat but you do not tell it what to repeat and until when.  You need to always have Repeat with an Until statement.

Second issue is you will run out of bandages REALLY fast.  You have no way of telling it to wait until it has attempted the full heal or cure.  So it will spam your bandages.  You need to have it either read your journal or set up the timing so that after it uses the bandages it waits a bit to try another one.

--- End quote ---

This is using magery to heal, not bandages. Definitely agree with having a Until Statement though

I'm also not sure what "Mainloop" is doing there. It's one quirk with EUO that I'm not really a huge fan of... you can pretty much put gibberish in spots and it just moves on like nothing happened.

Tidus:
Sorry was a quick read and am at work.  You are correct Trigs :).

chasemac140:

Navigation

[0] Message Index

[#] Next page

Go to full version