Log in

View Full Version : Quest Doesn't work 100%


warklantd
04-20-2006, 05:52 AM
Can someone tell me what I did wrong on this? The handin works, it gives you experience. But then it says:
No such Item:757
And the quest completion text doesn't come up.

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("When Malious raided the towns, like a coward I ran...Not a day goes by that I don't think about the pain I must have caused my family. Now I am stuck here doomed to a death among the beings of this realm. If I had my [sword] surely I could fight my way out. But alas it is gone.");
}
if($text=~/sword/i){
quest::say("The Sword my father gave me, it has been handed down in my family for generations. You look like a strong young man. If you could find my sword and return it to me, I would reward you with one of my most prized posessions.");
}
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 05013 => 1,)) {
quest::say("Thank you sir, You have returned with my trusty sword. The moment I set eyes on you, I knew you were different. I am a man of my word, my most prized possesion. I hope it will help you in your adventures. "); }
quest::summonitem(01365);
quest::exp(20000);
}
}

Item 01365 is FBSS and is in the DB. I can #summon it. Hopefully it's not anything too noobie, but this is really the first quest I have made that rewards items and exp :)

bleh
04-20-2006, 06:04 AM
In perl, a leading zero indicates an octal representation. Be careful of "01365" versus "1365."

warklantd
04-20-2006, 06:45 AM
Hey Thanks Bleh, weird how something so simple could mess my whole quest up, Works perfect now :)

ylosh
04-20-2006, 08:38 AM
might want to put your quest::summonitem(); inside the if statement. he might just take anything you hand him and reward you with an item and xp.

Richardo
04-21-2006, 12:44 AM
if (plugin::check_handin(\%itemcount, 05013 => 1,))\

may be easier to us this..

if ($itemcount{5013} => 1)

and Ylosh

sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 05013 => 1,))
{ <==========
quest::say("Thank you sir, You have returned with my trusty sword. The moment I set eyes on you, I knew you were different. I am a man of my word, my most prized possesion. I hope it will help you in your adventures. "); }
quest::summonitem(01365);
quest::exp(20000);
}
}

it has an opening bracket so it will only respond the current functions if that specific item was given.

ylosh
04-21-2006, 02:56 AM
i copied/pasted your quest file into a generic testnpc on my server and it gives xp and fbss when anything is handed in.

You say, '#si 1001'
You gain experience!!
[GM] You have gained 0 AXP and 829781195 EXP (851337473).
You say, '#si 5013'
Testnpc says 'Thank you sir, You have returned with my trusty sword. The moment I set eyes on you, I knew you were different. I am a man of my word, my most prized possesion. I hope it will help you in your adventures. '
You gain experience!!
[GM] You have gained 0 AXP and 829801195 EXP (851337473).

warklantd
04-21-2006, 03:09 AM
Thanks for the replies guys. Like I said, I'm new to the quest thing, trying to learn. I appreciate the help :)