Triggering After Death/Respawn Correctly

Moderator: Moderators

Message
Author
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Triggering After Death/Respawn Correctly

#1 Post by sli »

This works by immediately locking the respawned macro (using locker). When your character dies, the died macro unlocks respawned, which has a run-once. This locks it after it runs, ensuring that the only time it will ever run is immediately after you die and respawn.

Code: Select all

automacro locker {
	hook in_game
	call {
		lock respawned
	}
}

automacro respawned {
	hook Network::Receive::map_changed
	run-once 1
	call {
		# whatever you want here
	}
}

automacro died {
	hook self_died
	call {
		release respawned
	}
}
cs : ee : realist

flipboi15
Noob
Noob
Posts: 3
Joined: 16 Mar 2009, 17:17
Noob?: No

Re: Triggering After Death/Respawn Correctly

#2 Post by flipboi15 »

how does this work ?

edit: oh, i thin i get it, so this macro would work ?

Code: Select all

automacro locker {
   hook in_game
   call {
      lock respawned
   }
}

automacro respawned {
   map payon
   hp < 30%
   run-once 1
   call {
      pause 3
	do c @warp payon 153 230
	pause 2
	do talknpc 149 231 c n
	pause 2
	do c @warp prt_maze03
   }
}

automacro died {
   hook self_died
   call {
      release respawned
   }
}

Tchaly
Noob
Noob
Posts: 2
Joined: 27 Aug 2009, 10:04
Noob?: Yes

Re: Triggering After Death/Respawn Correctly

#3 Post by Tchaly »

hook in_game
self_died
I didn't really get where does those things come ? Are they variable like when we hook in_game we say to kore that the character is alive if we hook self_died we say to kore that the character is dead ?

Code: Select all

hook Network::Receive::map_changed
Can you please explain to me what is this thing ?

Sorry for those questions, but it'll be verry helpful to know the meaning, whithout the knowledge of those hook commands, it's pretty hard to understand for a newbie :P.

Exept
hook <hookname>
triggers when openkore calls <hookname>
I didn't find anything else concerning the "hook".
Thanks.

Post Reply