drown.mac (Anti Drown Macro)

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

drown.mac (Anti Drown Macro)

Post by kagonis » Wed Oct 15, 2003 2:31 pm

Too often there are people around you that forgets their EB items, and most of the time you don't have enough time to save them.

This is a life saver (and a "look I am using MQ") macro.

Code: Select all

#event Drowning " is drowning."
#define EB "Everlasting Breath"
Sub Main
	:Loop
		/doevents
		/delay 1s
	/goto :Loop
/return

Sub Event_Drowning
	/declare l0 local
	/varset l0 $left($int($calc($strlen("@Param0")-13)),"@Param0")
	/echo >> @l0 is DROWNING - Casting EB
	/target @l0
	/if "$target(name,clean)"=="@l0" /cast "EB"
	/if "$target(name,clean)"=="@l0" /delay $int($calc($calc($spell("EB",casttime)*10)+$calc($spell("EB",recoverytime)*10)+5))
	/doevents flush
/return