OnEvent

Zandros

Script Author: VGA
I am trying to write code that will check incoming text for the following: Your SPELL heals TARGETNAME for XXX points of health.

Searching for just the word "heals" does not register. Is there an Event I am unaware of? (See below code)

Code:
function main()
{
	;-------------------------------------------
	; Add in any events
	;-------------------------------------------
	Event[VG_OnIncomingText]:AttachAtom[ChatEvent]
	Event[VG_OnIncommingCombatText]:AttachAtom[CombatEvent]
	Event[VG_onAlert]:AttachAtom[CombatEvent]

	variable bool IsRunning = TRUE
	while ${IsRunning}
	{
		wait 20
		waitframe
	}
}

function atexit()
{
	;-------------------------------------------
	; Remove any events
	;-------------------------------------------
	Event[VG_OnIncomingText]:DetachAtom[ChatEvent]
	Event[VG_OnIncommingCombatText]:DetachAtom[CombatEvent]
	Event[VG_onAlert]:DetachAtom[CombatEvent]
}

;-------------------------------------------
; ChatEvent is used to monitor messages
;-------------------------------------------
atom(script) ChatEvent(string aText, string ChannelNumber, string ChannelName)
{
	if ${aText.Find[heals ${Me.Target.Name} for]}
		call DebugIt "${aText}"
}

;-------------------------------------------
; CombatEvent is used to monitor messages
;-------------------------------------------
atom(script) CombatEvent(string aText, int aType)
{
	if ${aText.Find[heals]}
		call DebugIt "${aText}"
}

;-------------------------------------------
; Echo our messages
;-------------------------------------------
function DebugIt(string aText)
{
      echo "${aText}"
      vgecho "${aText}"
}
 

Amadeus

The Maestro
Staff member
Have that event spew EVERY ${aText} for a while and make sure that what you're looking for is actually going through that event (and that it does have "heals" in it)
 

KrazyKel84

Active Member
I'm working on a DPS/Heal parser myself at the moment and I may just have the codes you want from OnIncommingCombatText event.

The codes that I have noticed that have heals in them from that event are

  1. Code 26
    Your <highlight>Devouring Shadows IV</color> heals you as you draw <highlight>811</color> points of Water Lord Zelbu's life from it.
  2. Code 28
    <green>The flesh of your abomination is healed for 307.
    and
    <blue>You heal your abomination for 637 points of life.
    and
    Your <highlight>Dark Rebuke III</color> heals Chittering Devourer for <highlight>1490</color> hit points.
    and
    Your <highlight>Drain Life IV</color> heals you as you draw <highlight>507</color> points of Chittering Devourer's life from it.
  3. Code 30
    Someone's <highlight>Concordant Palm I</color> heals you for <highlight>499</color> points of health.
  4. Code 32
    Someone's <highlight>Inner Light IV</color> heals you for <highlight>2</color> points of endurance.
    and
    Someone's <highlight>Inner Light IV</color> heals you for <highlight>220</color> hit points.
  5. Code 34
    Someone's <highlight>Blessed Wind V</color> heals Someone for <highlight>117</color> points of health.
  6. Code 36
    Someone's <highlight>Inner Light IV</color> heals Someone for <highlight>2</color> points of endurance.
    and
    Someone's <highlight>Inner Light IV</color> heals Someone for <highlight>220</color> hit points.
    and
    Someone successfully heals for 14 points.

These are just the codes that I have noticed, there maybe more but I haven't been collecting data on it that long. One I know I am missing the is the one where it lets you know what mob has healed another mob and for how much

The code btw is the numeric value that it returns other than the combat text. I do hope this helps you out any.
 
Last edited:

Zandros

Script Author: VGA
Sweet... thank you! This helps a lot.

Here is an idea I was working on... If one of my damage spells actually healed the mob then flag that spell not to be casted on the mob.
 
Top Bottom