The first task works. However once its complete and you hail him, he doesnt start the second conversation. Also completed tasks is coming up as -1 in the database even though record completed tasks is set to true
Code:
#Saylinks#
#Task 500 Explore the Orc Camp
my $awake = quest::saylink("Awake....What happened to me?", 0, "Awake");
my $activity = quest::saylink("Orc Activity?", 0, "Activity");
my $rituals = quest::saylink("Rituals?", 0, "Rituals?");
my $investigate = quest::saylink("As you wish", 0, "Investigate");
#Task 501 Speak to Elrond of Rivendell
my $troubling = quest::saylink("Troubling?", 0, "Troubling?");
my $elrond = quest::saylink("Lord Elrond?", 0, "Lord Elrond?");
my $inform = quest::saylink("I will inform Lord Elrond", 0, "Inform");
sub EVENT_SAY {
if(!quest::istaskcompleted(500)) {
#Player Hasnt Recieve Task 500 Yet
if($text=~/Hail/i) {
quest::say("Welcome , $name. Im glad to see you [$awake].");
}
if($text=~/Awake....What happened to me?/i) {
quest::say("You were ambushed by orcs. I dont know why you would wander alone in the wild with all of the recent orc [$activity] going on.");
}
if($text=~/Orc Activity?/i) {
quest::say("Yes, for some reason the orcs have been moving further in to the realm of Eriador. However, Our scouts have obtained information that leads us to believe the orcs performing strange [$rituals] in woods just outside of our camp.");
}
if($text=~/Rituals?/i) {
quest::say("We dont know what they are up to but if your feeling better you could go [$investigate] for us.");
}
#Give Player Task 500 Explore The Orc Camp
if($text=~/As you wish/i) {
quest::say("Yes each trial is designed to test your abilities to their maximum. As you improve, I will have more trials available to you. After successfully completing a trial, I will give you a note that you may pass along to your Guildmaster for your reward.");
@tasklist =(500);
$tasksoffered = "";
foreach $task(@tasklist) {
if(!quest::istaskactive($task)) {
if($tasksoffered eq "") {
$tasksoffered = $tasksoffered . $task;
}
else {
$tasksoffered = $tasksoffered . "," . $task;
}
}
}
}
if($tasksoffered ne "") {
quest::taskselector(eval($tasksoffered));
}
#Task 500 Explore Orc Camp In Jaggedpine
if(istaskactive(500)) {
if($text=~/Hail/i) {
quest::say("Well $name, did you find anything out yet?");
}
}
}
#Task 500 Is Completed Conversation For The Next Task
if(istaskcompleted(500)) {
if($text=~/Hail/i) {
quest::say("This is most [$troubling]. Never have I heard of Orcs possessing this type of foul magic!");
}
if($text=~/Troubling?/i) {
quest::say("Yes, you will need to inform [$elrond] of this immediately!");
}
if($text=~/Lord Elrond?/i) {
quest::say("Lord Elrond is one of the few remaining High Elf lords left in Middle Earth! He dwells in Rivendell.");
quest::say("Now make haste and [$inform] Lord Elrond!");
}
#Give Player Task 501 Speak To Lord Elrond
if($text=~/I will inform Lord Elrond/i) {
quest::say("Good Luck!");
@tasklist =(501);
$tasksoffered = "";
foreach $task(@tasklist) {
if(!quest::istaskactive($task)) {
if($tasksoffered eq "") {
$tasksoffered = $tasksoffered . $task;
}
else {
$tasksoffered = $tasksoffered . "," . $task;
}
}
}
}
if($tasksoffered ne "") {
quest::taskselector(eval($tasksoffered));
}
}
}
#if task is accepted and you need to give the player somthing or do somthing for the task do it here
sub EVENT_TASKACCEPTED {
quest::say("You accepted task $task_id");
}