|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |
 |
|
 |

05-23-2011, 09:12 AM
|
Fire Beetle
|
|
Join Date: Jul 2010
Posts: 5
|
|
Item Reward Help
Can someone take a look at this quest and tell me why the NPC accepts the hand-ins, gives the reward message, but not the reward item to the player?
Code:
sub EVENT_SPAWN
{
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::set_proximity( $x-40,$x+40,$y-40,$y+40,$z-40,$z+40);
}
sub EVENT_ENTER
{
quest::say("Hello, $name! I need some assistance.");
}
sub EVENT_EXIT
{
quest::say("Have a wonderful day, $name!");
}
sub EVENT_SAY
{
if($text =~ /Hail/i){
quest::say("Hello there, $name! I have had a hard time lately finding my [fishing] supplies"); }
if($text =~ /fishing/i){
quest::say("Yes! I lost my fishing rod and the grubs I used for bait. Can you help [find] them?"); }
if($text =~ /find/i){
quest::say("Great! Thank you very much! I hear that they can be found in the Field of Bone. Be careful, however! The Field of Bone is a dangerous place!"); }
}
sub EVENT_ITEM
{
if ($item1 == 1096 && $item2 == 1118)
{
quest::say("Thank you for the help. Here's your reward!");
quest::SummonItem("1079");
}
}
|
 |
|
 |

05-23-2011, 09:17 AM
|
Fire Beetle
|
|
Join Date: Jul 2010
Posts: 5
|
|
Also, how do I ensure that the order in which the items are handed in does not matter?
|
 |
|
 |

05-23-2011, 09:22 AM
|
Fire Beetle
|
|
Join Date: Jul 2010
Posts: 5
|
|
All taken care of. Here is the final code. If anyone sees anything here, please let me know:
Code:
sub EVENT_SPAWN
{
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::set_proximity( $x-40,$x+40,$y-40,$y+40,$z-40,$z+40);
}
sub EVENT_ENTER
{
quest::say("Hello, $name! I need some assistance.");
}
sub EVENT_EXIT
{
quest::say("Have a wonderful day, $name!");
}
sub EVENT_SAY
{
if($text =~ /Hail/i){
quest::say("Hello there, $name! I have had a hard time lately finding my [fishing] supplies"); }
if($text =~ /fishing/i){
quest::say("Yes! I lost my fishing rod and the grubs I used for bait. Can you help [find] them?"); }
if($text =~ /find/i){
quest::say("Great! Thank you very much! I hear that they can be found in the Field of Bone. Be careful, however! The Field of Bone is a dangerous place!"); }
}
sub EVENT_ITEM
{
if (plugin::check_handin(\%itemcount, 1096 => 1, 1118 => 1))
{
quest::say("Thank you for the help. Here's your reward!");
quest::SummonItem(1079);
}
}
|
 |
|
 |
 |
|
 |

05-23-2011, 12:01 PM
|
Hill Giant
|
|
Join Date: Mar 2010
Posts: 236
|
|
Quote:
Originally Posted by Dragonthorne
All taken care of. Here is the final code. If anyone sees anything here, please let me know:
Code:
sub EVENT_SPAWN
{
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::set_proximity( $x-40,$x+40,$y-40,$y+40,$z-40,$z+40);
}
sub EVENT_ENTER
{
quest::say("Hello, $name! I need some assistance.");
}
sub EVENT_EXIT
{
quest::say("Have a wonderful day, $name!");
}
sub EVENT_SAY
{
if($text =~ /Hail/i){
quest::say("Hello there, $name! I have had a hard time lately finding my [fishing] supplies"); }
if($text =~ /fishing/i){
quest::say("Yes! I lost my fishing rod and the grubs I used for bait. Can you help [find] them?"); }
if($text =~ /find/i){
quest::say("Great! Thank you very much! I hear that they can be found in the Field of Bone. Be careful, however! The Field of Bone is a dangerous place!"); }
}
sub EVENT_ITEM
{
if (plugin::check_handin(\%itemcount, 1096 => 1, 1118 => 1))
{
quest::say("Thank you for the help. Here's your reward!");
quest::SummonItem(1079);
}
}
|
i forget if all the code is case sensitive or not but try
quest::summonitem(1079,0); instead of caps, thats all i see off the top of my head, also add the 0 for good measure if it has 0 charges, or isnt stacked. Says its optional but worth a try i keep it in all my summonitem scripts
|
 |
|
 |

05-23-2011, 03:33 PM
|
Fire Beetle
|
|
Join Date: Jul 2010
Posts: 5
|
|
I found that out as well. The Quest Editor automatically capitalizes the first letter in quest::summonitem . I changed it, then saved before toggling to a different window, and that fixed the problem.
Thank you for the reply!
|

05-23-2011, 04:37 PM
|
Hill Giant
|
|
Join Date: Mar 2010
Posts: 236
|
|
Quote:
Originally Posted by Dragonthorne
I found that out as well. The Quest Editor automatically capitalizes the first letter in quest::summonitem . I changed it, then saved before toggling to a different window, and that fixed the problem.
Thank you for the reply!
|
no problem youll be getting my bill in the mail
|

05-23-2011, 05:18 PM
|
Sarnak
|
|
Join Date: Apr 2011
Posts: 47
|
|
Aye, and even if you type it, the quest editor change the i to a capital I.
That's why I use it for quest lexicons, or just to create a mob .pl file. The rest is done with notepadd++
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
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 04:09 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |