For some reason they aren't working completely so hoping another set of eyes can spot any errors:
First quest, so far the dialogue is working fine but I'm getting repeats of some messages and when I turn in items I'm getting the item return message even though the turn in is correct (and fires correctly).
Code:
#######################################
#### Saylinks ####
#######################################
sub EVENT_SAY
{
my $deal = quest::saylink("deal", 1);
my $coin = quest::saylink("coin", 1);
my $estate = quest::saylink("Estate", 1);
my $inny = quest::saylink("Innoruuk", 1);
my $bladesmith = quest::saylink("bladesmith", 1);
#######################################
#### Quest Dialogue ####
#######################################
if($text=~/hail/i && $hateblade == 1)
{
plugin::Whisper("I said it was splendid; I did not say it was useful!");
quest::doanim(54);
plugin::Whisper("It truly IS one of a kind... literally; however, I hear it may be of more use when forged with a rare sword from the old [$estate].");
}
if($text=~/hail/i && $hateblade == 2)
{
plugin::Whisper("Did you fashion the blade? Let me see it!");
}
if($text=~/hail/i && $hateblade == 3)
{
plugin::Whisper("Seek out Tirapulin V'Thex, the master bladesmith.");
}
if($text=~/hail/i && $hateblade == 4)
{
plugin::Whisper("You have returned! Let me see the blade!");
}
if($text=~/hail/i && $hateblade == 5)
{
plugin::Whisper("Ever have the strangest feeling of dejavu?");
}
if($text=~/hail/i && $hateblade == 6)
{
plugin::Whisper("Ever have the strangest feeling of dejavu?");
}
if($text=~/hail/i && $hateblade == 7)
{
plugin::Whisper("Ever have the strangest feeling of dejavu?");
}
if($text=~/hail/i && $hateblade == undef && $class eq "Warrior")
{
plugin::Whisper("Hello fellow Warrior, I may have a splendid [$deal] for you!");
}
if($text=~/hail/i && $hateblade == undef)
{
plugin::Whisper("Hello traveler. Where have all the traders gone? Please browse my wares.");
}
if($text=~/deal/i && $class eq "Warrior")
{
plugin::Whisper("If you have the [$coin], I may be able to provide you with a splendid blade!");
}
if($text=~/coin/i && $class eq "Warrior")
{
plugin::Whisper("For a measly 250 platinum pieces, I will provide you with a blade no warrior has seen the likes of!");
}
if($text=~/estate/i && $hateblade == 1)
{
plugin::Whisper("Unrest of course. Here, take these notes. Now leave me alone.");
quest::summonitem(2669);
quest::setglobal("hateblade", 2, 5, "F");
}
if($text=~/innoruuk/i && $hateblade == 2)
{
plugin::Whisper("That is right, Innoruuk himself gave a blade to King Thex of the Tier'Dal, that has resemblance to that of which you hold. Perhaps a maaster Tier'Dal [$bladesmith] may assist you further.");
}
if($text=~/bladesmith/i && $hateblade == 2)
{
plugin::Whisper("Seek out Tirapulin V'Thex in the Bazaar. I imagine he has migrated his wares there like every other trader.");
quest::setglobal("hateblade", 3, 5, "F");
}
}
#######################################
#### Turn-Ins ####
#######################################
sub EVENT_ITEM
{
if(($platinum==250)&& $class eq "Warrior")
{
quest::summonitem(2667);
quest::setglobal("hateblade", 1, 5, "F");
}
elsif(plugin::check_handin(\%itemcount, 2666=>1) && $hateblade == 2)
{
plugin::Whisper("I told you it was a blade no warrior had seen the likes of! Legend tells it may be a shard of King Thex's royal blade! Perhaps it was forged by [$inny] himself.");
quest::summonitem(2666);
}
elsif(plugin::check_handin(\%itemcount, 2668=>1) && $hateblade == 4})
{
plugin::Whisper("It's mine! Finally! At last my King will have his Hateblade returned to him once and for all!");
quest::emote("runs towards Nektulos Forest");
quest::setglobal("hateblade", 5, 5, "F");
$npc->MoveTo(837, 1281, -17, 128, 0);
quest::settimer("depop", 30);
}
else
{
plugin::return_items(\%itemcount);
plugin::Whisper("It looks like you forgot something.");
}
}
#######################################
#### Despawn Timer ####
#######################################
sub EVENT_TIMER
{
if ($timer eq "depop")
{
quest::depop();
quest::stoptimer("depop");
}
}
Second quest, none of the dialogue is working. The turnins work but getting the same issue as first quest.
Code:
#######################################
#### Saylinks ####
#######################################
sub EVENT_SAY
{
my $fineblade = quest::saylink("fine blade", 1);
my $potential = quest::saylink("potential", 1);
my $relic = quest::saylink("relic", 1);
my $shards = quest::saylink("shards", 1);
my $hateblade = quest::saylink("Hateblade", 1);
#######################################
#### Quest Dialogue ####
#######################################
if($text=~/hail/i && $hateblade == 3)
{
plugin::Whisper("I am Tirapulin, Master Tier'Dal Bladesmith. I see you have a [$fineblade] in your possession. May I see it?");
}
if($text=~/fine blade/i && $hateblade == 3)
{
plugin::Whisper("The Silver Blade of Ire...");
}
if($text=~/potential/i && $hateblade == 3)
{
plugin::Whisper("That is the Silver Blade of Ire. It was once part of a Tier'Dal [$relic] of Hate.");
}
if($text=~/relic/i && $hateblade == 3)
{
plugin::Whisper("This is one of three shards of the Relic of Hate given to King Thex, by Innoruuk himself, eons ago. It was destroyed by Tunare in a mighty battle upon the Plane of hate. if you can recover the other [$shards] I may be able to reconstruct the [$hateblade].");
}
if($text=~/shards/i && $hateblade == 3)
{
plugin::Whisper("One shard was recovered by the undead of Guk and is being used in dark necromantic rituals. The other fell into the hands of filthy kobold nobles, likely for purposes of escalating their position of status.");
}
if($text=~/hateblade/i && $hateblade == 3)
{
plugin::Whisper("The Hateblade is a weapon forged by Innoruuk himself, the Prince of Hate, to inspire hatred within his foes. Innoruuk knew that anger was the strongest of all emotions and caused his opponents to think brashly and make grave mistakes, ultimately costing them their lives on the battlefield.");
}
}
#######################################
#### Turn-Ins ####
#######################################
sub EVENT_ITEM
{
if(plugin::check_handin(\%itemcount, 2666=>1) && $hateblade == 3)
{
plugin::Whisper("Most beautiful blade this is. It has [$potential] to be a weapon suited for a real Warrior.");
quest::summonitem(2666);
}
if(plugin::check_handin(\%itemcount, 2666=>1, 2670=>1, 2672=>1) && $hateblade == 3)
{
plugin::Whisper("Magnificent. The essence of Hate embodied within a masterfully forged blade. Take this relic, Warrior, and return to your Maldan. Let him see what a REAL blade is supposed to be!");
quest::summonitem(2668);
quest::setglobal("hateblade", 4, 5, "F");
}
else
{
plugin::return_items(\%itemcount);
plugin::Whisper("It looks like you forgot something.");
}
}