Class Specific quest
I am attempting to make a quest in my noobie zone that gives class specific rewards. However when you hail him, he gives you the text, but then when you hand him a mold for your wep he does nothing :( Can anyone tell me what is wrong in the format for this? Thank you any that can reply and help me get this working. :)
Code:
sub EVENT_SAY { elsif ($class == Paladin) |
if($class == "Warrior")
missing quotes |
Code:
sub EVENT_ITEM { or miswritten tests. I would write it that way : Code:
sub EVENT_ITEM { |
Forgot to write this, after you wrote a quest, you can test its syntax with perl :
Code:
perl -cw 'questfile.pl' |
What i wrote previously has a correct syntax but won't work due to recent changes in the plugin::check_handin method.
You MUST write your quest like that : Code:
sub EVENT_ITEM { |
Thanks a lot guys, With the info you gave I'm sure I can get it working. :)
|
After updating my quest to what you guys suggested It still doesn't want to work. Any more suggestions? Or maybe I overloocked something.
Code:
sub EVENT_SAY { |
you were missing a bracket in the paladin's code
Code:
sub EVENT_SAY |
Aren't you supposed to use the eq operator and not the == operator for strings?
if($class eq 'Warrior') { /* ... */ } |
Using eq instead of == is a good idea, yes :)
About the else at the end of your code. It has no sense. just add plugin::return_items(\%itemcount); without test. check_handin verifies that you gave the right amount of items and removes them of the list of given items. At the end of the quest, you call return_items to give back to the player each item that remains in the list. Don't include it in a test, just do it or don't do it. |
The quest works now, thank all of you guys for your hard work and patience helping me get it going. Posting the working code, maybe it will help someone else looking to make a class specific quest.
Code:
sub EVENT_SAY { |
ok actually it doesn't work lol. This quest is starting to get old :( When you hand in the item now this stuff happens:
quest::exp(750); quest::emote("smiles warmly as he hands you your weapon."); quest::ding(); But instead of summoning the correct item for you, he hands you back the mold and says: These are not the pieces I need. So basically you can stand there and hand the mold in over and over until you reach max lvl if you want to do 10k turnins =/ |
i got it working, let me finish it and i'll post it
|
I added a few comments into the file for you, so you can tweak usability.
Code:
#this quest will work for any class as is, however it just gives xp to rogues, rangers, and bards EDIT: oh, I only tested this on bards, warriors, and wizards... could be bugs. |
Nice, thank you Jimbabwe, I'll try this out :)
|
All times are GMT -4. The time now is 03:05 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.