Simple Self Heal Event

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Simple Self Heal Event

Post by Harden » Tue Feb 14, 2006 5:12 pm

I use this when I'm farming things, all it does is: if your HP are less then 99%, it cast's the specified spell, until your HP are > 99%

Useage = /echo healself
or add an alias

Recuires spell_routines.inc

Code: Select all

#Event HealSelf         "[MQ2] healself" 
Sub Event_HealSelf
	/if (${Me.PctHPs} > 99) {
		/echo My HP's are FULL, you Fool!
		/return
	} else {
		/echo My HP's are less then 99%, Healing Self. 
		:healloop
			/target myself
			|Edit Spell Name / Gem here
			/call cast "Sylvan Water" gem2 
			/if (${Me.PctHPs} < 99) /goto :healloop
		/echo # Done Healing Self to Full HP
	} 
/return
-Edit: Updated 3/14/2006
Last edited by Harden on Tue Mar 14, 2006 1:46 am, edited 1 time in total.
-Harden
I wanna be a Macro Writer when I grow up!

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Tue Feb 14, 2006 6:10 pm

You've got 2 checks for ${Me.PctHPs}<99 which seems a bit redundant.

I cleaned it up and shortened it a bit to this (untested):

Code: Select all

#Event HealSelf         "[MQ2] healself"
Sub Event_HealSelf
  :healloop
  /if (${Me.PctHPs} < 99) {
    /echo My HP's are FULL, you Fool!
    /return
  } else {
    /echo My HP's are less then 99%, Healing Self.
    /target myself
    |Edit Spell Name / Gem here
    /call cast "Heal Spell" gem2
    /goto :healloop
  }
/return
Would be easy enough to make the Heal Percentage, Heal Spell and Heal Gem variables at the top of the sub too, which would give you a bit more flexibility.

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Tue Feb 14, 2006 6:32 pm

I havent tried yours yet, but with everything inside the loop, it will spam My HP's are less then 99%, until your full HP.

When I get time later, I'll take your idea and meld it with mine. thanks for the input.
-Harden
I wanna be a Macro Writer when I grow up!

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Tue Feb 14, 2006 6:56 pm

Harden wrote:I havent tried yours yet, but with everything inside the loop, it will spam My HP's are less then 99%, until your full HP.
That's a good point, I didn't read your first stub carefully enough.

How about this:

Code: Select all

#Event HealSelf         "[MQ2] healself"
Sub Event_HealSelf
  /if (${Me.PctHPs} > 99) {
    /echo My HP's are FULL, you Fool!
    /return
  } else {
    /echo My HP's are less then 99%, Healing Self.
    :healloop
    /target myself
    |Edit Spell Name / Gem here
    /call cast "Heal Spell" gem2
    /if (${Me.PctHPs} < 99) /goto :healloop
    /echo # Done Healing Self to Full HP
  }
/return
In the end its not much of an improvement in speed/lines, but to me it looks "cleaner" (and I'm a stickler for how things look). Perhaps it was just your indentation which put me off. Anyway, you can ignore me now :)

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Wed Feb 15, 2006 3:33 am

yet another cleaned version: :wink:

Code: Select all

#Event HealSelf         "[MQ2] healself"

Sub Event_HealSelf
:HealLoop
  /if (${Me.PctHPs} == 100)		/return
  /if (${Target.ID}!=${Me.ID})	/target myself
  /call cast "Heal Spell" gem2
  /goto :HealLoop
/return

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Wed Feb 15, 2006 5:45 am

zanomo wrote:yet another cleaned version: :wink:

Code: Select all

#Event HealSelf         "[MQ2] healself"

Sub Event_HealSelf
:HealLoop
  /if (${Me.PctHPs} == 100)		/return
  /if (${Target.ID}!=${Me.ID})	/target myself
  /call cast "Heal Spell" gem2
  /goto :HealLoop
/return
Heh, well if you remove part of what the snippet does (ie. tell you what it's doing via /echo) then of course it'll be smaller :P.

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Wed Feb 15, 2006 7:34 am

sorry, i didn't meant to compete for having the least line, just another way to code it. should have kept my mouth shut. :wink:

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Great 4g And 5g Router Sim Guide

Post by FrankJScott » Thu Oct 30, 2025 5:20 pm

To the lady asking about sim card wifi router 5g, multi sim card router, 4g cellular router, 4g router lte, wireless router sim card, remote access 4g router, iot 4g modem, serial port over ip, serial to lan, wireless wifi router with sim card slot, modbus rtu device, digi modem router, serial server, modbus tcp server client, serial port server, lan to rs485, mobile router with ethernet port, ethernet to uart converter, lte gsm module, lora converter, home sim card router, 4g modem lan port, connect 4g router to wifi router, I recommend this go here about 4g and 5g router sim blog for modem multi sim, modbus rtu ip, sim enabled wifi router, rs232 to rj45 converter, simcom gsm module, 4g lte mobile router, lg206, modbus wifi gateway, sim card 5g router, modbus communication, module 3g, modbus rtu a tcp, ethernet to serial adapter, 4g iot, 4g lte gateway, 3g 4g router with sim card slot, 5g wireless router sim card, modem with sim card slot, lte router 4g, router 2 sim, iot gsm module, difference between modbus and rs485, gprs modem, also. See More Recommended Vavada Online Casino Website dec9a89

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Great Todaki Women's Massage Site

Post by FrankJScott » Mon Nov 17, 2025 1:34 pm

For the lady inquiring about massage from male to female, body massage at home for female near me, women's day spas near me, massage spa female, ladies oil malish, baiboon thai spa for women & family, leg and knee massager, female to female body massage near me, body spa for female, healthy massage for men and women, body massage female at home, massaging woman's breast, female body massage near me, back massage pregnancy third trimester, male to female spa near me, ladies hot massage, body massage ladies to gents, head massage female, massage for men by women at home, foot massager for women, I recommend this 여성전용마사지 for male to female body massage near me, massage woman chest, lady liu massage, female spa therapist near me, best female massage therapist near me, female neck massage, full body massage for ladies near me, female to female body massage near me, female stomach massage, female to male body massage spa, massage for ladies home service, women for men massage, lady banu massage, female to female massage home service, body massage pregnant woman, female masseuse instagram, pregnant leg massage, full body massage female to female, hot female massage therapist, massage for women near me, body massage female to male at home, holistic massage for women, female abdominal massage, also. See More Useful Todaki Women's Massage Site a89a61d

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Awesome TAJIR4D Guide

Post by FrankJScott » Sun Nov 23, 2025 6:10 pm

To the people talking about toto 4d and 6d, toto 4d 21 9 25, toto 4d 20 8 25, toto 4d 31 7 2025, toto 4d 9 10 2025, toto 4d 6 4 2025, my lucky number today 4d toto, magnum toto kuda lotto, lotto99, toto 4d number today, I highly recommend this click this link for TAJIR4D advice or toto 4d 23 4 2025, toto 4d ticket, toto 4d 29 10 25, toto 4d result today live, toto 4d 16 7 2025, toto 4d hot number, my lucky number today 4d toto, toto 4d 9 10 2025, lucky number 4d today, online toto 4d, on top of this her explanation for TAJIR4D forum not forgetting sites such as toto 4d 29 10 25, sportstoto result, lucky 6d toto number, lottery toto bg, toto 4d lucky number today evening, 4d toto lotto, toto result singapore pool today, toto numbers not drawn, kuda toto magnum 4d, toto 4d 21 8 25, not forgetting sites such as this she said on TAJIR4D advice which is also great. Also, have a look at this helpful hints on TAJIR4D advice on top of 6d toto lucky number, toto 4d 18 6 25, toto 4d 31 7 2025, toto 4d 3 4 2025, toto lottery, lucky toto numbers, lotto 6d lucky number, toto 4d 4 5 2025, today toto 6d lucky number, toto 4d 24 12 25, not to mention this she said for TAJIR4D tips as well as www toto 4d lucky number list, toto bc lotto, toto 4d lucky number 2021, toto 4d 24 12 25, 4d 6d lotto, description on and don't forget toto 4d 28 5 2025, toto 4d 20 8 25, lucky number for magnum 4d, lucky toto numbers, keputusan lotto 4d, for good measure. Check more @ High Rated TAJIR4D Site b3ce3c8