View Single Post
  #7  
Old 08-14-2012, 01:20 AM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Here try this.
Also look at this:
Quote:
void quest::settimer(const char *timer_name, int seconds) {
So you basically set it to check DT (death touch?) every 1 second, slow every 2 and nuke every 3 or am I just way tired and reading that wrong.
Code:
sub EVENT_COMBAT {
	if ($combat_state == 1) {
		quest::setnexthpevent(99);
		quest::settimer(DT,1);
		quest::settimer(Slow,2);
		quest::settimer(Nuke,3);
	} else {
		quest::stoptimer("DT");
		quest::stoptimer("Slow");
		quest::stoptimer("Nuke");
		quest::depop();
	}
}

sub EVENT_HP {
	if($hpevent <= 99 && $hpevent >= 98) {
		quest::shout2("You dare face the might of Vishimtar, mortals?!?!!");
		quest::setnexthpevent(75);
	}
	if($$hpevent <= 75 && $hpevent >= 74) {
		quest::shout2("The power of the dragon ancients grows inside of me!");
		quest::setnexthpevent(50);
	}
	if($hpevent <= 50 && $hpevent >= 49) {
		quest::shout2("I...am...the Destroyer!!!");
		quest::setnexthpevent(25);
	}
	if($hpevent <= 25 && $hpevent >= 24) {
		quest::shout2("Arrghh! You will not defeat me!");
	}
}

Sub EVENT_DEATH {
	quest::shout2("Ahh.. My power was not.... Strong enough...");
	quest::stoptimer(DT);
	quest::stoptimer(Slow);
	quest::stoptimer(Nuke);
}

Sub EVENT_SLAY {
	quest::shout("You cannot stand yourself against a dragon god $name!");
}

Sub EVENT_TIMER {
	if ($timer == DT) {
		quest::shout("TEST"); }
	if ($timer == Slow) {
		quest::shout("TEST"); }
	if ($timer == Nuke) {
		quest::shout("TEST"); }
}
Reply With Quote