ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Wakiza on September 07, 2009, 07:20:42 PM

Title: Very new to this. Be gentle!
Post by: Wakiza on September 07, 2009, 07:20:42 PM
Ok i've used scripts for years, but never really took the time to make my own. Recently i've begun to take an interest in learning how to. So anyways be easy on me please.

It just so happens i'm training swords on EA's servers, so i decided to try to make something simple, that i could learn from. One thing i got stumped on looking through the commands, how can i make this script only cast when the NPC goes below 50% health?

Again. Sorry so newb!

Code: [Select]
Script Name: Wakiza's Jhelom Trainer
; Author: Wakiza
; Version: 1.0
; Shard: OSI / EA
; Purpose: Heals NPC fighters with chiv while you train on them.

;Set-up: Target the NPC you are training with and press go.

event Macro 15 202
wait 10
event Macro 22
wait 5
Title: Re: Very new to this. Be gentle!
Post by: _C2_ on September 07, 2009, 07:46:33 PM
you could do 2 things off the top of my head.

(1)  use #enemyhits under combat.. that goes by percent and not actual hits.  Thi scan be flaky but I use it in a golem training script just fine,

(2)  use pixel scans that save the color of the health bar that u want to start healing when it changes color which I use in my oaks/tamer farmer.
Ex of # 2

in set -up  set pixels
Code: [Select]
display Place Cursor Over Pet Bar Location To Heal At Wait 5 Seconds!
wait 5s
savePix #cursorX #cursorY 1

in code check it this way...
Code: [Select]
cmpPix 1 f      ;1= pixel saved as # 1   f= false  t= true  i set to false so if color of bar changed it healed
{
gosub healpet
}
Title: Re: Very new to this. Be gentle!
Post by: Wakiza on September 09, 2009, 03:05:26 PM
Thanks for the reply. I'll try it once this new gargoyle stuff settles down.  8)