Armor Quest for all Classes and Teleporter
This is an armor quest for all classes. The quest will also teleport the player to a zone (crushbone in this example).
The player gets drops from a zone that are notes, molds, instructions, or whatever you want to name them. An example of the items I created for this quest are "Boot Instructions". Any class can turn in those boot instructions and get boots specific to their class, and the same goes for all of the other instructions for the rest of the armor set (7 total different pieces). All you need to do is create the 7 different custom note drops, and add them to the quest, and then either find pre-existing class specific armor sets or make your own custom ones and add them to the quest. It is pretty straight foward. In the code below, I have PoH/PoF armor already in for the pure melee classes. So, you can try it out easily just by making your custom notes and plugging the ID into the check_handin. I have tested this quest and it works 100% on my server. You will need to edit the npc text to reflect what you want/need. Code:
############# |
Hey Trev, Tried out this code tonight, making a server for me and a few friends to play on...I know the code works on your server, cause i have multiple toons 70+ on there, and never had any trouble. I tried editing the code to add in my own stuff, gear rewards and whatnot, but the guy just eats the turn ins. I am using Prathun in gloomingdeep as my armor guy. Here is a snippet of the code...
Code:
sub EVENT_ITEM { |
Try changing your my $rewards = to my %rewards =
|
Does this code really work for all classes?
Quote:
|
it was at %rewards to start, i didnt work, so i tried $, ended up with the same problem. The guy just eats the turn ins.
Quote:
|
you might want to try shadowknight...
|
Quote:
Code:
$class == 'Shadowknight' Code:
$class eq "Shadowknight" Next, you must use Code:
my %rewards = ( "blah" => blah ); Just looking at your code though, if the above was % to start with, I don't see anything that sticks out as a problem and I'm not anywhere where I can test it right now. But you should stick this: Code:
else { I would check your quest logs to see if they are any help. Try putting some debugging print steps in there to help you narrow down the issue. If you still haven't resolved it later I'll try it on my server. |
*smacks head on desk* Well, I figured out the problem. I am a noob to all of this, never did any coding past BASIC and a tiny bit of VB. I had the return_item code ya mentioned at the bottom of the quest, as i copied and pasted Trev's code, just changing what i wanted. I summoned a random item, and turned it in, but he said nothing, and didnt give it back, just ate it. Well i did some looking into the plugin::check_handin...and it appears I did not have the plugin. So it wasn't checking anything i handed it, just eating it. I added the code I found after searching on the boards to the plugin folder, and it now works =). Thank you all for your replies, and sorry to have just missed something that simple, lol.
I did not know the plugin::blah_blah was an actual plugin until i did a search for it, so everything seem to be working now =). Thank you all again. |
Ya, I should have posted the corrections to that quest after I made them sorry lol. There was another class typo too that most probably wouldn't notice at first:
Code:
$class == 'Mage' Code:
$class == 'Magician' Code:
#An Armor Quest For all classes |
Decided to take a shot at cleaning up things;p I'm not exactly proficient at auto generating complex hash/array combos. And there is definitely redundancy in my example that could be cleaned up. But, here is an alternative method that may be easier for the average joe to pick up and change/add things that he wants with little quest scripting experience.
Code:
############# One thing I'd like to point out is that when you see this much redundancy such as in my hash for item turn in for each class, rest assured that it could be optimized a little more |
I tried to modify the code a little for personalization, and did extensive modifications to the items, and it is still not working. I used the last one that was posted as a model. Here is my code:
Code:
#A conversation to Teleport Player to lvl 40-50 zone (Dulak) |
Strait writes quests in a completely different way than I do, so that is a little hard for me to read. But, you might want to start by removing all of the elsifs from your EVENT_SAY, and change them to just plain "if" instead. I am pretty sure elsif will break the quest completely using it like that.
The best way to troubleshoot a problem like that is to start with just the EVENT_SAY section and test to make sure that works. Then, add in the rest in small examples piece by piece until you get it all working. That hash looks a little complex to me lol. I don't think Strait tested his code at all, but if you use the code I posted in this thread, it works perfectly. Though, mine could probably use better commenting to make it easier to understand. But it is pretty straight forward. If I was to write it all over again now, I am sure it would be much smaller and cleaner lol. I have learned a lot since that submission. |
I modified your code to work for my server, and it still does not work, am I missing something?
Code:
#An Armor Quest for all classes |
Any time you are only checking for certain classes and not all classes, then you have to do a Not Equal check as well for the other classes you don't want to use that turn in.
Don't ask me why it doesn't work the other way, as I have no clue. I also don't know why for equals you have to use ==, but for not equals, you have to use "ne". It doesn't make sense to me, but it does work. Here is an example of what I mean: Code:
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) Also, don't forget to add this at the bottom as shown in my example: Code:
else { I imagine there are much better ways of doing this, but I haven't really gone back and tried lately. The next time I make a similar armor quest using better code, I will definitely post it. |
Now my code has changed to the below code, thanks to your suggestions =) However, it is still not working in game for some reason:
Code:
#An Armor Quest for all classes |
All times are GMT -4. The time now is 01:08 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.