View Single Post
  #4  
Old 07-15-2009, 05:41 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Ok I changed it to be like this
Code:
sub EVENT_COMBAT{
 if ($combat_state == 1){
 quest::settimer("knockback", 8);
 quest::setnexthpevent(75);
 }
 }
 sub EVENT_TIMER{
 if ($timer eq "knockback"){
  $target = $npc->GetTarget();
 $npc->CastSpell(904, $target->GetID());
 $client->Message(4,"A blow from Khabahn sends you flying.");
 quest::stoptimer("knockback");
 quest::settimer("knockback", 8);
 }
}
sub EVENT_HP{
 if ($hpevent == 75){
 $target = $npc->GetTarget();
  quest::shout("This is over!");
  $npc->CastSpell(2802, $target->GetID());
  $npc->CastSpell(2802, $target->GetID());
  $npc->CastSpell(2802, $target->GetID());
  $npc->CastSpell(2802, $target->GetID());
  $npc->CastSpell(2802, $target->GetID());
  $npc->CastSpell(2802, $target->GetID());
  quest::setnexthpevent(50);
 }
 if ($hpevent == 50){
  $target = $npc->GetTarget();
 quest::shout("Prepare yourself!");
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  Mob::CastSpell(2802, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
  quest::setnexthpevent(25);
  }
 if ($hpevent == 25){
  $target = $npc->GetTarget();
 quest::shout("Take this!");
 Mob::CastSpell(470, $target->GetID(), slot= 10, casttime= -1, mana_cost= -1)
 }
}
 sub EVENT_DEATH{
  quest::setglobal("arena", 8, 5, "F");
  quest::shout("No, how did this happen?!?");
  quest::setglobal("khabahn", 1, 5, "F");
  quest::signalwith(1370,3,1);
  quest::spawn(1371,0,0,-19, 106, 6.4);
}
The knockback part of the timer works, but none of the other casts do anything
Reply With Quote