Kingmen30264
08-06-2011, 08:44 PM
I found my way into tasks, but I am undergoing and issue when it comes to setting it up to allow when a user approaches the task npc, it checks to see where they are at and it keep count if they have done it or not and also allows them have the next task in line.
I followed this guide here:
http://www.eqemulator.net/wiki/wikka.php?wakka=TaskSystemTaskSets
Here is what I have written up so far. Could someone please look this over and tell me where I am wrong?
######
#Name: Task
#Author: Kingmen
######
sub EVENT_SAY
{
#Saylinks
my $job = quest::saylink("job");
if($text=~/Hail/i) {
quest::say("Hi $name, I have a [$job] for you."); }
elsif($text=~/job/i) {
if(!quest::istaskcompleted(quest::lasttaskinset(50 0))) {
if(quest::enabledtaskcount(500) == 0) {
plugin::Whisper("I haven't seen you before!");
quest::enabletask(quest::firsttaskinset(500));
}
elsif {
$task = quest::activespeaktask();
if($task != 0) {
$activity = quest::activespeakactivity($task);
quest::ipdatetaskactivity($task, $activity);
plugin::Whisper("Well Done!");
if(!quest::istaskactive($task)) {
quest::disabletask($task);
if($task != quest::lasttaskinset(500)) {
plugin::Whisper("Well done, I ahve another task if you are willing.");
quest::enabletask(quest::nexttaskinset(500, $task));
}
elsif {
plugin::Whisper("Thank you for all your work.");
}
}
}
elsif {
}
}
if(quest::activetaskinset(500) == 0) {
quest::tasksetselector(500);
}
}
elsif {
plugin::Whisper("Hail, Conqueror!");
}
}
}
The tasks themselves work. I tested them BEFORE I composed this.
Also I created a "TaskSet" in the taskset table using:
INSERT INTO `taskset` (`id`, `taskid`) VALUES (500, 500);
INSERT INTO `taskset` (`id`, `taskid`) VALUES (500, 501);
From what I understand on this, the first column (id) refers to the ID of the taskset you wish to denote it and the second column (taskid) refers to the actual task(s) themselves (In this case 500 and 501 for my tasks).
Like I said, they work just fine...... individually, but if I were to try and pair them up and make them sequential, then I get nowhere.
Any and all help on this would be great.
Thank you,
Kingmen
I followed this guide here:
http://www.eqemulator.net/wiki/wikka.php?wakka=TaskSystemTaskSets
Here is what I have written up so far. Could someone please look this over and tell me where I am wrong?
######
#Name: Task
#Author: Kingmen
######
sub EVENT_SAY
{
#Saylinks
my $job = quest::saylink("job");
if($text=~/Hail/i) {
quest::say("Hi $name, I have a [$job] for you."); }
elsif($text=~/job/i) {
if(!quest::istaskcompleted(quest::lasttaskinset(50 0))) {
if(quest::enabledtaskcount(500) == 0) {
plugin::Whisper("I haven't seen you before!");
quest::enabletask(quest::firsttaskinset(500));
}
elsif {
$task = quest::activespeaktask();
if($task != 0) {
$activity = quest::activespeakactivity($task);
quest::ipdatetaskactivity($task, $activity);
plugin::Whisper("Well Done!");
if(!quest::istaskactive($task)) {
quest::disabletask($task);
if($task != quest::lasttaskinset(500)) {
plugin::Whisper("Well done, I ahve another task if you are willing.");
quest::enabletask(quest::nexttaskinset(500, $task));
}
elsif {
plugin::Whisper("Thank you for all your work.");
}
}
}
elsif {
}
}
if(quest::activetaskinset(500) == 0) {
quest::tasksetselector(500);
}
}
elsif {
plugin::Whisper("Hail, Conqueror!");
}
}
}
The tasks themselves work. I tested them BEFORE I composed this.
Also I created a "TaskSet" in the taskset table using:
INSERT INTO `taskset` (`id`, `taskid`) VALUES (500, 500);
INSERT INTO `taskset` (`id`, `taskid`) VALUES (500, 501);
From what I understand on this, the first column (id) refers to the ID of the taskset you wish to denote it and the second column (taskid) refers to the actual task(s) themselves (In this case 500 and 501 for my tasks).
Like I said, they work just fine...... individually, but if I were to try and pair them up and make them sequential, then I get nowhere.
Any and all help on this would be great.
Thank you,
Kingmen