|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
02-22-2008, 05:33 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 10
|
|
NPC Quest respawns on anything.
This is my first custom quest and I think the problem is in the NPC itself. Whenever the NPC is hailed or given items he just respawns without giving the reward, well I am almost certain he is respawning since I can see him drop about half a food out of the air like a respawn.
Here is the quest:
Code:
#$item1 - The object in the first give slot of the give window.
#$item2 - The object in the second give slot of the give window.
#$item3 - The object in the third give slot of the give window.
#$item4 - The object in the fourth give slot of the give window.
sub EVENT_SAY
{
if ($text =~/hail/i)
{
quest::say("I can make ye a weapon that is bound to be the bane of these orcs! Just hand me a certain [bronze weapon] and three [rotting orc teeth]. When ya give these to me make sure you give me the weapon first and the three teeth in a seperate stack.");
}
if ($text =~/bronze weapon/i)
{
quest::say("The bronze weapons I know how to alter are: Mace, Spear, Long Sword, Axe, and Dagger.");
}
if ($text =~/rotting orc teeth/i)
{
quest::say("Aye, you find those in the orcs mouth!");
}
}
sub EVENT_ITEM
{
if ($item2== 27536 && $item3== 27536 && $item4== 27536)
{
if ($item1== 6019)
{
quest::say("Here is your Mace of Orc Bane!");
quest::summonitem("1118");
}
elsif ($item== 7014)
{
quest::say("Here is your Spear of Orc Bane!");
quest::summonitem("1119");
}
elsif ($item== 5027)
{
quest::say("Here is your Long Sword of Orc Bane!");
quest::summonitem("1261");
}
elsif ($item== 5032)
{
quest::say("Here is your Axe of Orc Bane!");
quest::summonitem("1264");
}
elsif ($item== 7012)
{
quest::say("Here is your Dagger of Orc Bane!");
quest::summonitem("1265");
}
else
{
plugin::return_items(\%itemcount);
quest::say("This ain't what I asked for and it ain't the way I wanted it! Take yer garbage elsewhere!");
}
}
else
{
plugin::return_items(\%itemcount);
quest::say("This ain't what I asked for and it ain't the way I wanted it! Take yer garbage elsewhere!");
}
}
If anyone has had this problem please feel free to help me solve it.
|
|
|
|
|
|
|
02-22-2008, 06:09 AM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
Is the hail not working at all? usually this happens to me if I have an error in my quest. At least with the few that I've written. Try just running it on the command line, "perl quest_name.pl". That'll at least tell you if it's having trouble compiling and where.
This seems to work for me for the EVENT_ITEM. The first if takes a single item, and the other takes 3 items. Using it this way instead of the way you have it allows them to put the items in the give container in any order. Since you want more than one item type per hand in you'd use an && between them in the if, like the last one. Hope this helps.
Code:
if(plugin::check_handin(\%itemcount,13309=>1)) {
quest::say("Blah blah blah");
quest::summonitem(2140);
quest::exp(1000);
} elsif (plugin::check_handin(\%itemcount,17970=>3)) {
quest::say("Different blah blah blah");
quest::summonitem(2915);
quest::givecash(1,2,3,4);
quest::exp(1000);
} elsif ((plugin::check_handin(\%itemcount,6019=>1) && (plugin::check_handin(\%itemcount,27536=>3)) {
quest::say("Here ya go. $name. Have fun!");
quest::summonitem(1118);
}
|
|
|
|
02-22-2008, 06:18 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 10
|
|
Nice tip
Thanks for the tip for the check handin function but the NPC just isn't staying spawned.. he de/respawns whenever any of his quest events get triggered.. the hail or the handins.
|
02-22-2008, 06:51 AM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
Did you check your script? Is this an NPC that you created?
|
02-22-2008, 07:37 AM
|
Dragon
|
|
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
|
|
Are you sure he's respawning? If this is the case, you will definitely lose target of him and have to re-target. Is that happening?
|
02-22-2008, 07:58 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 10
|
|
Oh, I am not losing target of him, something else must be wrong then.
The script appears to be working just fine, later on I will change it to use the check_handin function though.
|
02-23-2008, 03:23 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 10
|
|
Quote:
Originally Posted by Andrew80k
Is the hail not working at all? usually this happens to me if I have an error in my quest. At least with the few that I've written. Try just running it on the command line, "perl quest_name.pl". That'll at least tell you if it's having trouble compiling and where.
|
I executed it from the command line and it just printed a blank line, this means no syntax errors right?
|
02-23-2008, 03:46 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 10
|
|
How do I check to make sure I have the plugin that is being called. I have found a few more quests that do nothing when the handin is done.
|
|
|
|
02-24-2008, 02:41 PM
|
Sarnak
|
|
Join Date: Aug 2006
Posts: 60
|
|
For your initial script, you'll need to change the $item== to $item1 == for all of the messed up lines.
If you wish to use chech_handin and return_item plugins, you can download them from http://eqemuquests.cvs.sourceforge.n...uests/plugins/
You'll put the plugins in your eqemu/plugins folder.
I recently needed help for something like this for several of my quests. With help from the almighty bleh for cleaning up my script and replacing my counters, we came up with this, which is a little easier to work with:
Quote:
sub EVENT_SAY
{
if ($text =~/hail/i)
{
quest::say("I can make ye a weapon that is bound to be the bane of these orcs! Just hand me a certain [bronze weapon] and three [rotting orc teeth]. When ya give these to me make sure you give me the weapon first and the three teeth in a seperate stack.");
}
elsif ($text =~/bronze weapon/i)
{
quest::say("The bronze weapons I know how to alter are: Mace, Spear, Long Sword, Axe, and Dagger.");
}
elsif ($text =~/rotting orc teeth/i)
{
quest::say("Aye, you find those in the orcs mouth!");
}
}
my %wepchoice = ( #Hash of Hashes. rewarditem is the reward given. rewardmessage is the message given for each item turn in.
6019 => { rewarditem => 1118, rewardmessage => 'Here is your Mace of Orc Bane!' },
7014 => { rewarditem => 1119, rewardmessage => 'Here is your Spear of Orc Bane!' },
5027 => { rewarditem => 1261, rewardmessage => 'Here is your Long Sword of Orc Bane!' },
5032 => { rewarditem => 1264, rewardmessage => 'Here is your Axe of Orc Bane!' },
7012 => { rewarditem => 1265, rewardmessage => 'Here is your Dagger of Orc Bane' }
);
sub EVENT_ITEM {
my %itemcount_copy = %itemcount;
my $gaveitem = 0;
my %wepchoice = ( #Hash of Hashes. rewarditem is the reward given. rewardmessage is the message given for each item turn in.
6019 => { rewarditem => 1118, rewardmessage => 'Here is your Mace of Orc Bane!' },
7014 => { rewarditem => 1119, rewardmessage => 'Here is your Spear of Orc Bane!' },
5027 => { rewarditem => 1261, rewardmessage => 'Here is your Long Sword of Orc Bane!' },
5032 => { rewarditem => 1264, rewardmessage => 'Here is your Axe of Orc Bane!' },
7012 => { rewarditem => 1265, rewardmessage => 'Here is your Dagger of Orc Bane' }
);
if (plugin::check_handin(\%itemcount, 27536 => 3)) { #First check to see if the fangs are turned in
for my $wepchoice ( sort keys %wepchoice) { #Now lets check the 4th item
if (plugin::check_handin(\%itemcount, $wepchoice => 1)) {
quest::summonitem($wepchoice{$wepchoice}{rewardite m}); #Summons rewarditem
quest::say("$wepchoice{$wepchoice}{rewardmessage}" ); #Says corresponding rewardmessage.
$gaveitem = 1;
}
}
}
# did not hand player back quest reward; give them their items back
if ($gaveitem == 0) {
plugin::return_items(\%itemcount_copy);
quest::say("This ain't what I asked for and it ain't the way I wanted it! Take yer garbage elsewhere!");
}
}
|
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:25 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|