I'm attempting to learn how to write quests. I just went to a random zone and found an NPC that did nothing when I hailed him. The NPC turned out to be Miner Welnik in Lavastorm Mountains. I went on Allakhazam to see the quest text and replies and referenced to some other quests to write this.
Code:
# Miner Welnik quest
sub EVENT_SAY {
if($text=~/Hail/i)
{
quest::say("Oh dear, oh dear. Where have they gone? My boss is going to kill me! Oh excuse my rudeness $name, but I'm afraid I don't have much time for idle chatter, I must find those [picks]!");
}
if($text=~/what picks/i) {
quest::say("The mining picks! Bibol had me gathering up all the ones that were no longer usable to take to the smith and they are just gone. If I don't get them back in time, he will have my head! I've already wasted far too much [digging] time looking for them.");
}
if($text=~/digging/i) {
quest::say("Dig dig dig, that's what we do. I don't know what is so all-important, but the boss has been in no mood for tricks this time around. I must [find] those picks and dig another six feet!");
}
if($text=~/i will help you find them/i) {
quest::say("Yes find them, I must! Oh...Oh what are you doing? Do you think you could [help]? Can you find them for me?");
}
if($text=~/i can help/i) {
quest::say("There are four that I am still missing. How does this sound, I will stay here and dig to keep them off my back, and you find the picks and take them to the smith? His name is numden, has a little shop in Steamfont. I am sure that I could find a way to reward you.");
}
}
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 54435 => 1)){ #bundle of shiny new picks x 1
quest::say("Oh, these are perfect! Please accept this as a reward. Actually, since you have done so much for me, I might be able to give you something [extra]");
quest::ding();
quest::summonitem(71705);
quest::exp(1000);
}
if($text=~/something extra/i) {
quest::say("I am a bit of a jeweler on the side. I find it relaxing after working in the mines all day, and it comes in handy when I find the spare gem laying around. There is a special kind of fiery ore that can be found in these mountains. Bring me four pieces of it, and I shall make you a ring. How does that sound?");
}
if (plugin::check_handin(\%itemcount, 7882 => 4)){ #fiery ore x 4
quest::say("That's the stuff. Three for me, one for you! Here is your ring $name. Thank you again for your help!");
quest::ding();
quest::summonitem(71706);
quest::exp(1000);
}
#Do all other handins first With plugin, then let it Do disciplines
plugin::return_items(\%itemcount);
quest::say("I have no use for this, $name.");
}
# Quest edited by Swiftsong_Lorekeeper
It appears to me that it should be working but when I log into the game and hail him, nothing happens. I also attempted to do the turn-ins but still nothing. The file location that I saved it in is 'C:\eqemu\quests\lavastorm\miner_welnik.pl'. I'm sure I am missing something simple. Is there some kind of command that you have to use in order to mate (for lack of better term) the quest.pl with the actual NPC? I completely shut down the server and re-ran the startup.bat and logged back in and it made no change. Can anybody please help me out here. I have been working on this for hours.
Just for clarification of the steps I took...
1) Wrote the quest using notepad++ (not sure if that matters?)
2) Saved the quest as Miner_Welnik.pl
3) Logged into EQ and hailed Miner Welnik
4) After several attempts of hailing him and performing #repop and trying again I gave up and logged out
5) Exited the 3 command prompt windows for the server
6) Reran startup.bat
7) Logged in and tried again with no change
Made this post :p