Official ScriptUO EasyUO Scripts > Scripting Tutorials

Trapped Chest Healing Trainer

(1/3) > >>

Cerveza:
Goal: To use a dart trapped chest to sustain damage, and then use bandages to heal the damage. Must grab bandages from a secure or bank when the char runs out.

Flow:

Check for bandages, if not found then check the open containers, if not found then display a smart alec remark and halt
- drag bandages from container to backpack

Check hit points. If current hit points are less then maximum hit points - oh say 5 or so, then apply a bandage on self and wait for it to complete.
If hit points are greater then maximum - 5 then double click the trapped crate to take damage so you can heal it.

Setup:

Identify the trapped crate, Identify what bandages are.

I'm hoping Josey Wales jumps in here with some inputs ;)

Khameleon:
Check for near by healers incase of accident.

Outlaw Josey Wales:

--- Quote from: Cerveza on August 25, 2010, 10:44:42 AM ---I'm hoping Josey Wales jumps in here with some inputs ;)

--- End quote ---
Ruh Row he is calling me out i guess i must put the old brain nogin to work and try and to give some input

Cerveza:
Please note that this post is in the "Scripting Tutorials" section. It's not an evaluation of what training method works best or alternate methods.

It's about using a dart trapped box to lower your hit points, then use bandages to heal, dragging more bandages from a secure container or the bank when needed.

Outlaw Josey Wales:
Okay Cerv i used your script and rearanged how it functions This is not my script it was originaly written by cerveza all cudos and props goes to him i only modified it for tutitorial purposes all credit goes to cerv
=========================================;
; Script Name: traped box healing trainer;
; Author: Cerveza, modified by Outlaw,               ;
; Version: 1.0a                          ;
; Shard OSI/FS: OSI/FS                    ;
; Revision Date: 08/26/2010               ;
; Purpose: Train Healing Quickly          ;
;=========================================;
;    ____         _      _  __   _ ___    ;
;   / __/ ___ _ _(_)_ _ | |_\ \ / / _ \   ;
;   \__ \/  _| `_| | ` \|  _/ / \ \/ \ \  ;
;   __/  \ (_| | | | |) | | \ \_/ /\_/ /  ;
;   \____/\__|_| |_|  _/\__\ \___/\___/   ;
;                  |_|                    ;
;=========================================;
; Setup: SET %HITS to whatever value you  ;
; want to use the trapped crate. Normally ;
; lower level Tinker trapped crates do    ;
; around 30 hps to a 0 resist char        ;
;                                         ;
; Start script on the char who will be    ;
; training healing.                       ;
;                                         ;
; Ensure you have bandages VISIBLE in a   ;
; container (bank, secure) that the       ;
; training char can drag/drop from.       ;
;=========================================;
; Thanks:                                 ;
; Cerveza for trying to teach me how to script;
;=========================================;
; v1.0 - First SUO full release           ;
; v1.0a - Added delay in setup target     ;
;=========================================;


set %hits 50

Gosub GetChar TrainingChar
set %primary #Result
Gosub GetChar HealingTarget
set %secondary #Result

set %bandage ZLF

gosub SwapTo %secondary
display Target your Trapped Crate
  set #targCurs 1
    wait 5
  while #targCurs = 1
    wait 1
set %crateID #ltargetId
gosub SwapTo %primary

display ok Ready ; just gets the Trainer screen in play
repeat
gosub crate
gosub heal
until #false

sub crate
gosub SwapTo %secondary
if #hits > %hits
  {
    set #lobjectId %crateID
    event macro 17
    wait 10
  }
wait 10
gosub SwapTo %primary
return

sub heal
finditem %bandage C_ , #backpackID
if #findCnt = 0
  {
    finditem ZLF C_ ; , %storage
    if #findCnt = 0
      {
        msg Halt #time
        HALT
      }
    exevent drag #findID 500
    wait 10
    exevent dropC #backpackID
    wait 10
  }
set #lobjectId #findId
event macro 17
target 3s
set #ltargetId %secondary
event macro 22 0
wait 3s
return

; ****************************************
Sub GetChar
  display OK Target your %1 Character now
  set #targCurs 1
  while #targCurs = 1
    wait 1
  wait 10
Return #ltargetID

Navigation

[0] Message Index

[#] Next page

Go to full version