PDA

View Full Version : Quest not working


Maceblade
10-04-2014, 05:59 PM
Cant figure out why this doesn't work... hpevent 90 works but nothing else...




sub EVENT_SPAWN {
quest::setnexthpevent(90);

}



sub EVENT_HP {
if ($hpevent == 90) {
quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + -10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + -20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + -10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + -20,$z,$h); #a dream defiler
$NPC->CastSpell(16950);
quest::setnexthpevent(60);
}

if ($hpevent == 60) {
quest::spawn2(999246,0,0,$x + 70,$y + 80,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 70,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 60,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 40,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 80,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 70,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 60,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 40,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 20,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y,$z,$h); #a dream defiler
$NPC->CastSpell(3150, $target->GetID());
quest::setnexthpevent(36);
}
if ($hpevent == 36) {
quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + -10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + -20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + -10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + -20,$z,$h); #a dream defiler
$NPC->CastSpell(16950);
}
}

sub EVENT_DEATH {
quest::we(15, " $name , Has defeated Touch, The Merciless");
quest::stoptimer(1);
}



#Touch

Kingly_Krab
10-04-2014, 06:38 PM
Try $targetid rather than $target->GetID(), as $target isn't defined, nor is it a default variable.

Maceblade
10-04-2014, 07:28 PM
removed the spell casting completely and it seems that after hpevent 90 nothing else works except when you slay her.

jdoran
10-04-2014, 08:43 PM
You might put in some shouts/emotes to see if the events are being generated

joligario
10-04-2014, 08:58 PM
Also can't use NPC. Should be lower case.

Asylum
10-06-2014, 12:04 PM
if (Touch is a spawned mob, i.e. triggered and not a static spawn) {

you should change EVENT_DEATH to EVENT_DEATH_COMPLETE

}

chrsschb
10-06-2014, 04:18 PM
Always good to swap SPAWN to AGGRO when it comes to combat timers/triggers.

First issue, you have + and - in the spawn locations for some of the spawns (ex: $y + - 20). $userid works for the spell casts also.

sub EVENT_AGGRO {
quest::setnexthpevent(90);
}

sub EVENT_HP {
if ($hpevent == 90) {
quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x - 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x - 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y - 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y - 20,$z,$h); #a dream defiler
$npc->CastSpell(16950,$userid);
quest::setnexthpevent(60);
}

if ($hpevent == 60) {
quest::spawn2(999246,0,0,$x + 70,$y + 80,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 70,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 60,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 40,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 80,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 70,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 60,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 40,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y - 20,$z,$h); #a dream defiler
quest::spawn2(999246,0,0,$x + 70,$y,$z,$h); #a dream defiler
$npc->CastSpell(3150, $userid);
quest::setnexthpevent(36);
}

if ($hpevent == 36) {
quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x - 10,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x - 20,$y,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y - 10,$z,$h); #a dream defiler
quest::spawn2(999245,0,0,$x,$y - 20,$z,$h); #a dream defiler
$npc->CastSpell(16950, $userid);
}
}

sub EVENT_DEATH {
quest::we(15, " $name has defeated Touch, The Merciless");
quest::stoptimer(1);
}

I would also add Combat checks and depops for adds for when players fail the fight. Example below.

sub EVENT_COMBAT {
#Spawn the door guards to prevent running outside the cave
if($combat_state == 1) {
quest::spawn2(1247,0,0,2577,-2068,4,125);
quest::spawn2(1247,0,0,2559,-2070,4,124);
}
#DeSpawn door guards and adds if raid wipes
if($combat_state == 0) {
quest::signalwith(1247, 1, 0);
quest::signalwith(1248, 1, 0);
}
}

Put this on adds
sub EVENT_SIGNAL {
if ($signal == 1) {
quest::depop();
}
}

demonstar55
10-06-2014, 04:35 PM
You may also want to check out the command #questerrors