View Single Post
  #3  
Old 03-18-2014, 01:28 PM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

theres a few options for this. Lets say you want it every 25%, you could do:
on the boss:
Code:
sub EVENT_HP {
if ($hpevent == 75) {
quest::signalwith(xxxxx,#,0); #xxxx = Add NPC ID, # = signal number (if using multiple signals), the third entry = delay in miliseconds (again i think)
quest::setnexthpevent(50); #set the next hp event since you have passed your first one (which you will need to initalize in a different spot, under its spawn, or combat or w/e you chose.
if ($hpevent == 50) {
#Etc Etc
}
}
Then on the adds, you have a few options, you can use the signal to just depop and repop the mob,

Code:
sub EVENT_SIGNAL {
if ($signal == 1) { #Or w/e number you chose)
quest::spawn2(npcid,0,0,x,y,z,h); #spawn a combatitive version
quest::depop(); #depop the untargetable/sleeping mob
}
}
Alternatively, you can just have the boss script include the spawn2 stuff at the hp, and ignore the signals all together, just have the boss depop the mob and spawn a targetable version in the same xyzh location.

Something ive been playing with alot recently has been using perl to set the bodytype of mobs when they spawn, and then using signals or events to change it to a targetable body type - $npc->SetBodyType(#); (i think)
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
Reply With Quote