SK Feign death sub, any suggestions?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

SK Feign death sub, any suggestions?

Post by LamahHerder » Sat Dec 27, 2003 5:28 am

Hi,
looking for any suggestions for a better dropagro sub then what I have created.

faster/more reliable is my goal

Following is all the immediatley relevant code

Code: Select all

#event Standing "has fallen to the ground."
#event FDFAIL "You are no longer feigning death"
My events...
standing is called by my cast sub
fdfail is called by my dropagro sub

Code: Select all

Sub DropAgro
	/if $target()==FALSE /return
	/attack off
	/declare MobDistance local

	:DropAgro1
		/echo DropAgro1
		/call gotoloc @Safe_L1
		/call cast "Death Peace"
	/goto :checkDropAgro1

	:DropAgro2
		/echo DropAgro2
		/call gotoloc @Safe_L2
		/call cast "Death Peace"
	/goto :checkDropAgro2

	:checkDropAgro1
		/varset MobDistance $target(distance)
		/delay 1s
		/doevents FDFAIL
		/if $return==FAILED /goto :DropAgro2
		/if n $target(distance)==@MobDistance /goto :checkDropAgro1
		/goto :mobresetDropAgro
	
	:checkDropAgro2
		/varset MobDistance $target(distance)
		/delay 1s
		/doevents FDFAIL
		/if $return==FAILED /goto :DropAgro1
		/if n $target(distance)==@MobDistance /goto :checkDropAgro2
	/goto :mobresetDropAgro
	
	:mobresetDropAgro
		/echo mobresetDropAgro
		/varset MobDistance $target(distance)
		/doevents FDFAIL
		/if $return==FAILED /goto :DropAgro1
		/delay 5s
		/doevents FDFAIL
		/if $return==FAILED /goto :DropAgro1
		/if n $target(distance)==@MobDistance /goto :doneDropAgro
	/goto :mobresetDropAgro
	
	:doneDropAgro
		/press ESC
		/echo doneDropAgro
		/if $char(state)!=STAND /stand
/return
My dropagro sub

Code: Select all

Sub Event_Standing
	/stand
/return CAST_RESTART

Sub Event_FDFAIL
	/stand
/return FAILED
event code...
Last edited by LamahHerder on Sat Dec 27, 2003 3:53 pm, edited 1 time in total.

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Sat Dec 27, 2003 2:04 pm

Is not it easier if you use $char(state) insteed of an event? I mean, if you use some like this:

Code: Select all

/if $char(state)==FEIGN /(put here what you want)
you will know for sure if you char have successfully feign or not and so make it take the right action.
BTW, $char(state) can be: STAND, SIT, DUCK, BIND, FEIGN, DEAD, STUN.

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

Post by LamahHerder » Sat Dec 27, 2003 2:46 pm

$char(state) will show feign when it is not a legit feign when it has failed to fool the mob and it is still killing ya

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Sat Dec 27, 2003 5:21 pm

m0nk, you are right. Now I understand. Thank you