I have written a small external script that will catch whenever FURIOUS is up. It will set the variable FURIOUS to TRUE/FALSE which you can check within your script.
Code:
/*
FURIOUS v1.0
by: Zandros, 21 June 2009
Description:
Runs in the background and sets the global variable FURIOUS to TRUE/FALSE
Parameters: None
Example Code:
; If FURIOUS is down the Attack
if !${FURIOUS}
call Attack
; If FURIOUS is up then Heal
if ${FURIOUS}
call Heal
External Routines that must be in your program: None
Variables to use in your program: FURIOUS
*/
;===================================================
;=== Variables ====
;===================================================
variable(global) bool FURIOUS = FALSE
;===================================================
;=== Main program ====
;===================================================
function main()
{
echo "[vg][${Time}] --> FURIOUS started"
;-------------------------------------------
; Start our Event
;-------------------------------------------
Event[VG_OnIncomingText]:AttachAtom[ChatEvent]
;-------------------------------------------
; Loop this until we exit out or use 'endscript FURIOUS'
;-------------------------------------------
while ${Me(exists)}
{
if !${Me.InCombat} || ${Me.Target.Type.Equal[Corpse]} || !${Me.Target(exists)}
{
FURIOUS:Set[FALSE]
}
waitframe
}
}
;===================================================
;=== Executed at end of program ====
;===================================================
function atexit()
{
;-------------------------------------------
; Remove our event
;-------------------------------------------
Event[VG_OnIncomingText]:DetachAtom[ChatEvent]
echo "[vg][${Time}] --> FURIOUS ended"
}
;===================================================
;=== Atoms - ChatEvent ====
;===================================================
atom(script) ChatEvent(string Text, string ChannelNumber, string ChannelName)
{
;-------------------------------------------
; Set FURIOUS to TRUE if we receive this message
;-------------------------------------------
if ${Text.Find[becomes FURIOUS]}
{
FURIOUS:Set[TRUE]
}
;-------------------------------------------
; Set FURIOUS to FALSE if we receive this message
;-------------------------------------------
if ${Text.Find[is no longer FURIOUS]}
{
FURIOUS:Set[FALSE]
}
}
Attachments
-
2.3 KB Views: 273