Been working on a quest that I just cant seem to get to work for some reason lol. Been testing it and can't seem to figure out the problem,which im sure is something stupid as those are my favorite mistakes to make. Anyone able to give me some insight?
Code:
sub EVENT_SAY {
if ( !defined $qglobals{"Slayer"} ) { # This will make sure that you have at LEAST step 1 when hailing. If someone flat out gives an item to him without that, we can't do anything about that kind of laziness, but we ARE checking for defined before taking their items.
quest::setglobal("Slayer", 1, 4, "F");
}
if($text=~/hail/i) {
if($qglobals{"Slayer"} == 2) {
plugin::Whisper("Hello $name. Up for another " . quest::saylink("task", 1) . " perhaps?");
} elsif($qglobals{"Slayer"} == 3) {
plugin::Whisper("You are doing great works $name! One " . quest::saylink("task", 1) . " left!");
} elsif($qglobals{"Slayer"} == 4) {
plugin::Whisper("You have completed my tasks $name! There is but one last " . quest::saylink("step") . " we must take.");
} else {
plugin::Whisper("Hail $class. We have currently secured the first level of the tower , we have lost a lot of troops but Rahtiz is determined! Perhaps you and your friends could help us " . quest::saylink("secure", 1) . " the other levels?");
quest::setglobal("Slayer", 1, 4, "F");
}
elsif($text=~/task/i) {
if($qglobals{"Slayer"} == 1) {
plugin::Whisper("Make Haste!");
quest::assigntask(16);
} elsif($qglobals{"Slayer"} == 2) {
plugin::Whisper("Make Haste!");
quest::assigntask(34);
} elsif($qglobals{"Slayer"} == 3) {
plugin::Whisper("Make Haste!");
quest::assigntask(35);
} else {
plugin::Whisper("I can do nothing for you at this time.");
}
}
elsif($text=~/secure/i) {
plugin::Whisper("Wonderful! Finish my " . quest::saylink("task") . " ! We will speak again after you complete this mission!");
}
elsif($text=~/step/i) {
if($qglobals{"Slayer"} == 4) {
plugin::Whisper("Take the orbs you have obtained from my tasks and combine them in this! Once you do that you are now able to enter the study of Daosheen! Quickly now speak with Rahtiz and tell him of your works!");
} else {
plugin::Whisper("You are not ready for this mission!");
}
}