Author Topic: Trapped Chest Healing Trainer  (Read 11900 times)

0 Members and 1 Guest are viewing this topic.

Offline CervezaTopic starter

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Trapped Chest Healing Trainer
« on: August 25, 2010, 10:44:42 AM »
0
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 ;)
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #1 on: August 25, 2010, 11:06:07 AM »
0
Check for near by healers incase of accident.

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #2 on: August 25, 2010, 11:16:51 AM »
0
I'm hoping Josey Wales jumps in here with some inputs ;)
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

Offline CervezaTopic starter

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #3 on: August 26, 2010, 04:41:08 AM »
0
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.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #4 on: August 26, 2010, 11:43:17 AM »
0
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
« Last Edit: August 26, 2010, 11:47:22 AM by Outlaw Josey Wales »

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #5 on: August 26, 2010, 11:45:04 AM »
0
ive got this functioning but i need to increase the wait time before it tried to use another bandage

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 make changes to this line
return
You change wait 3s to 5s depending on what your dex is and the script will funtion as intended
« Last Edit: August 26, 2010, 11:55:47 AM by Outlaw Josey Wales »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Trapped Chest Healing Trainer
« Reply #6 on: August 26, 2010, 11:47:35 AM »
0
If you use journal scanning, then you can really optimize the delays.  The script can react exactly when the bandage is done.  Just a suggestion.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #7 on: August 26, 2010, 11:58:11 AM »
0
If you use journal scanning, then you can really optimize the delays.  The script can react exactly when the bandage is done.  Just a suggestion.
sugestions welcome sir but im noob when it comes to scripting and cerv is trying to teach me the basics.  I lerned alot from his chalange it realy made me examine his script and try and figure out what each thing does i guess u could say i have lerned basic flow of the script what each thing does

Offline CervezaTopic starter

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #8 on: August 26, 2010, 12:02:09 PM »
0
Event macro 22 0 is to target yourself, so thats where it's actually applying the bandage. Right after that is a wait... that would be the wait before continuing with the script.

Just look at what you have there, that's pretty much the entire bandage portion already complete!
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Trapped Chest Healing Trainer
« Reply #9 on: August 26, 2010, 12:03:07 PM »
0
Ah well it's definitely a good start.  First thing is just to get a script out there.  After that you can start addressing the other issues that come up as the script runs.  One of those is timing.  Scripts that are completely dependent on just waiting set times can be unstable as they are run from shard to shard.  But if you can make your scripts react to events, then you really open up the possibility for it to run more reliable in lots of different conditions.

Cerveza is a big advocate for the journal and a great resource to learn and grow your knowledge.  I was just stealing a bit of his thunder.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #10 on: August 26, 2010, 12:09:12 PM »
0
i added the wait from 3 seconds to 5 seconds have been running the script about 15 minutes know still going strong

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #11 on: August 26, 2010, 12:11:08 PM »
0
i edited some of my post to reflect the changes

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +121
  • Referrals: 2
    • View Profile
Re: Trapped Chest Healing Trainer
« Reply #12 on: August 26, 2010, 12:13:13 PM »
0
Ah well it's definitely a good start.  First thing is just to get a script out there.  After that you can start addressing the other issues that come up as the script runs.  One of those is timing.  Scripts that are completely dependent on just waiting set times can be unstable as they are run from shard to shard.  But if you can make your scripts react to events, then you really open up the possibility for it to run more reliable in lots of different conditions.

Cerveza is a big advocate for the journal and a great resource to learn and grow your knowledge.  I was just stealing a bit of his thunder.  ;)
looks at trails thunder and head starts to swim and gets worried hes going to get burned by playing with the new toys trail is offerning

Tags: Healing  training