Author Topic: Healing Script  (Read 6516 times)

0 Members and 1 Guest are viewing this topic.

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Healing Script
« on: September 27, 2018, 06:46:49 AM »
0
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: [Select]
;===================================
;=====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





Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Healing Script
« Reply #1 on: September 27, 2018, 07:02:00 AM »
0
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.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Trigs

  • Jr. Member
  • **
  • Posts: 22
  • Activity:
    0%
  • Reputation Power: 1
  • Trigs has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #2 on: September 27, 2018, 07:07:13 AM »
0
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.

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.

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Healing Script
« Reply #3 on: September 27, 2018, 07:10:00 AM »
0
Sorry was a quick read and am at work.  You are correct Trigs :).
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #4 on: September 27, 2018, 07:11:28 AM »
0

Offline Trigs

  • Jr. Member
  • **
  • Posts: 22
  • Activity:
    0%
  • Reputation Power: 1
  • Trigs has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #5 on: September 27, 2018, 07:14:36 AM »
0

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #6 on: September 27, 2018, 07:15:57 AM »
0
Code: [Select]
;

if C in #charStatus
gosub cure

if #hits < #maxhits
gosub heal

repeat until #CharGhost = Yes


a repeat condition like this?

also, how do I make it target a mob? I think the mob type is TH (Artic Ogre Lord)
« Last Edit: September 27, 2018, 07:17:33 AM by chasemac140 »

Offline Trigs

  • Jr. Member
  • **
  • Posts: 22
  • Activity:
    0%
  • Reputation Power: 1
  • Trigs has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #7 on: September 27, 2018, 07:17:29 AM »
0
The stuff to repeat goes between the repeat and until

Code: [Select]
repeat
   if C in #charStatus
      gosub cure

   if #hits < #maxhits
      gosub heal

until #CharGhost = Yes

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #8 on: September 27, 2018, 07:18:27 AM »
0
ahh ok, changing it.

changes in the new one.

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Chase's Auto Healer.txt

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #9 on: September 27, 2018, 07:21:33 AM »
0
So lets say I want to use this to heal one of my other guys on a different account. So this guy just sits back and heals him while the other guy beats on something.

How do I pull the second character as the target?

Is there a way to make the script look for a name?

Can I also make this target mobs in a similar manner?

Offline Trigs

  • Jr. Member
  • **
  • Posts: 22
  • Activity:
    0%
  • Reputation Power: 1
  • Trigs has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #10 on: September 27, 2018, 09:03:31 AM »
+1
So lets say I want to use this to heal one of my other guys on a different account. So this guy just sits back and heals him while the other guy beats on something.

How do I pull the second character as the target?

Is there a way to make the script look for a name?

Can I also make this target mobs in a similar manner?

A quick / dirty implementation of healing a second person would be like:

Code: [Select]
set %otherChar SOME_ID

<mainloop same as before>

sub heal
   set #LTARGETID %otherChar
   event macro 15 3
   wait 12
   event macro 22 0 ; target last target
   wait 5
   return

<similar for cure>

Attacking is a little different, but similar to the above.

Code: [Select]
set #LTARGETID %monsterID
event macro 27 0 ;; attack last target

I don't think there is a built in way to find chars by name, but I think some combination of:

Code: [Select]
set %humanType IS ;; theres some other types too
finditem  %humanType G_6 ;; search all around you with in 6 tiles
for %ind 1 #FINDINDEX
   event property #FINDID
   if Trigs in #PROPERTY
      set %otherChar #FINDID

I haven't tested it, or even tried it but that should give you some ideas to get started on both fronts.

Offline chasemac140Topic starter

  • Jr. Member
  • **
  • Posts: 18
  • Activity:
    0%
  • Reputation Power: 1
  • chasemac140 has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Healing Script
« Reply #11 on: September 27, 2018, 01:55:32 PM »
0
ok, that gets me going in the right direction! Thanks so much

Tags: