Ugh, so I just finished writing some pretty basic script for my server, for those who hit 70 and aren't flagged for progression. Something to do for them basically.
It doesn't work.
Probably a pretty good reason why.
Yeah, I code sloppily, sorry.
If anyone could lend some knowledge, that'd be spectacular.
Code:
sub EVENT_SAY
{
if($text=~/Hail/i)
{
quest::emote("jumps at your voice, and begins breathing heavily");
quest::say("Oh, it's just you. I bet [you think I'm crazy] too, huh? Everyone thinks I'm crazy!")
}
if($text=~/you're not crazy/i)
{
quest::emote("nods while looking at you")
quest::say("Before I hit rock bottom I was a successful merchant right here in Freeport. I made my living crafting marvelous gems. One night, while I was closing up shop, I was approached by a strange [man].");
}
if($text=~/what man?/i)
{
quest::say("He never gave me a name. He handed me a list of [instructions], written in a strange language. They described in extraordinary detail how to gather materials for and craft the most remarkable of gems.");
}
if($text=~/What instructions?/i)
{
quest::say("I told him it would take countless platinum to make what he asked, and he walked away in a scuff. He told me where he got them, though. If you can [bring me the instructions], I can tell you where to get the required materials, and will craft this gem for you, free of charge.");
}
if($text=~/i will bring you the instructions/i)
{
quest::emote("Cackles, almost.. crazily")
quest::say("Very good sir! There.. there is a slight [problem] though...");
}
if($text=~/what problem?/i)
{
quest::say("I overheard people talking. The man was eaten by none other than [Untel'Dak]. You must slay this beast and bring me the instructions he will surely have in... most unpleasant places.");
}
if($text=~/untel'dak?/i)
{
quest::emote("shrugs");
quest::say("I wish I could tell you more, but I have never laid eyes on him. He is not of this world; he resides in a place where only nightmares dwell.");
}
}
sub EVENT_ITEM {
# Instructions ID - 1050
my $instructions = 0;
if (plugin::check_handin(\%itemcount,1050 =>1 )) {
quest::emote("stares at you and then bursts into tears.");
quest::say("I am so sorry! I should never have sent you to that place! Can you ever [forgive me]?");
}
if($text=~/i forgive you/i)
{
quest::say("You must be exceptionally strong. As promised, I will craft you the gem. You just have to bring me the [items] on the list.");
}
if($text=~/what items?/i)
{
quest::say("To craft this item for you, I will need [three items] of extremely rare quality.");
}
if($text=~/three items?/i)
{
quest::say("Yes. The [first] and [second] should come with only slight difficulty. The [third] you may have some trouble with.");
}
if($text=~/the first/i)
{
quest::say("The first gem is held by Overking Bathezid. He will not part with it willingly. It is his most prized possesion. If power is what you seek, you will have to take it from him.");
}
if($text=~/the second/i)
{
quest::say("The second gem is held by The Junk Beast in the Plane of Innovation. The [clockwork] some how got a hold of it, and now are refusing to give it up.");
}
if($text=~/what clockwork?/i)
{
quest::say("The clockwork are mechanical beings that reside in the Plane of Innovation. They are ruthless, as they have no souls. Be careful in there.")
}
if($text=~/the third/i)
{
quest::say("The third gem is held by none other than Aerin'Dar. His lair lies in the Plane of Valor. Thousands have died before his claws. Be careful.")
}
}
sub EVENT_ITEM_2 {
if($itemcount{1041} == 1 && $itemcount{1037} == 1 && $itemcount{1040} == 1){
quest::say("I have done it! You are truly strong! This gem is fit for someone of your power! I hope you enjoy it!");
quest::summonitem("1038");
} else {
quest::say("I don't need this.");
if($item1 > 0){quest::summonitem("1041");}
if($item2 > 0){quest::summonitem("1037");}
if($item3 > 0){quest::summonitem("1040");}
}
}