PDA

View Full Version : Trying to fix up my first quest....


Hamarabi
05-09-2006, 07:15 PM
I posted earlier with regard to a typo in Dargon McPherson's "deliver an elixir to young warriors" quest and it seems there is more wrong with this quest than first appeared. I appologize for starting another thread, but I didn't think my request for help would be noticed with the other post's topic.

After I gave Kylan ODanos the note, I went over to Dargon McPherson and got the elixir quest, so I could work on faction. I proceeded to Everfrost to do my first turn-in to Talin ODonal and when I gave him the elixir, nothing happened. So, I set out to try to fix my first quest and I need a little guidance, if anyone is willing. I am not a programmer, but I am willing to learn, just like everyone else.

With that in mind, could you please take a look at what I have toward's the bottom of this post and give me some advice as to why this turn-in does not work?

Looking at the original code, it is obvious why the turn-in doesn't work. Talin wasn't programmed to accept anything or do anything else except say "Brrrrrr!! Grr.. Grreetings. It is freezing out here!!"

Original Code Was:
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Brrrrrr!! Grr.. Grreetings. It is freezing out here!!"); }
}
#END of FILE Zone:everfrost ID:4881 -- Talin_ODonal

I took a look at the example quests on this page : http://www.eqemulator.net/wiki/wikka.php?wakka=QuestSimpleExamples

The bone chip turn-in seemed like the perfect example, but it did not work as planned. I just cut and pasted the example and edited to suit the quest. I changed the Itemcount, faction, and summonitem variables, with information I gathered about the quest.

I assume the itemcount variable needs to be the elixir ID, the faction ID was taken from the ID I got from Kylan for turning in the note, and I got the summonitem ID from looking at the Dargon_McPherson.pl file, because the item was first summoned in that quest. I verified that the summonitem ID is correct by doing the command #summonitem 13241 in the game console and obtained an elixir.

If your not familiar with this quest, you are supposed to run around and give each NPC a drink of the elixir and when you do, they thank you and return the elixir to you. You receive faction, and experience when this happens. Then they tell you the approximate location of the next NPC that might need some of the tonic's warming effects. After running around doing the turn-in's to several NPC's, you are to return to Dargon McPherson for the quest completion and the reward of faction, experience, and an item.

Please note, that when I hail Talin, he doesn't even reply, let alone take the elixir, give me exp, and hand it back.

This piece of code should be all I need to fix the quest to completion. I'll just duplicate it for each of the NPC's.

Here's My Code:
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Brrrrrr!! Grr.. Grreetings. It is freezing out here!!");
}
}

sub EVENT_ITEM
{
if ($itemcount{13241} == 1){quest::say("Thank you! I think what's her name needs some too, she can be found.....");
quest::exp(125);
quest::faction(10103,1);
quest::summonitem(13241);}
}

#END of FILE Zone:everfrost ID:4881 -- Talin_ODonal

I greatly appreciate any help that you can offer and I'll try to help others if I can, once I learn it, that is.

Hamarabi

paaco
05-09-2006, 10:44 PM
Try this, please note that I am not a quest guru myself, Learning just like you so this could be slightly wrong. I have not tested it, let me know how it goes. Also I noticed the reward you are giving is exactly the same as the turnin item for the quest. So that is wrong until you fix it.

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say(""Brrrrrr!! Grr.. Grreetings. It is freezing out here!!"");
}
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 13241 => 1,)) {
quest::summonitem(13241);
quest::exp(125);
quest::faction(10103,1);
}
}

mrea
05-09-2006, 11:13 PM
Also I noticed the reward you are giving is exactly the same as the turnin item for the quest. So that is wrong until you fix it.

He wants to get the elixir back. I figure the NPC is to take a swig, then hand it back. As far as the quest system goes, however, I haven't made my own in some time so I couldn't really help ya :-/

paaco
05-09-2006, 11:48 PM
hehe yeah I see Mrea, I didn't read his whole post, just skimmed through it and thought I would try fixing the quest :)

Muuss
05-09-2006, 11:51 PM
Paaco forgot a brace at the event of the event_say (easy to see due to his good indentation).

Hamarabi, faction id comes from table 'faction_list', faction 10103 does not exists, the rest of your quest is working.
Indent your quests and never put closing braces at the end of the rows, put em alone in a row, so its easier to see what they close. Add comments for the items/factions id too, so you remember what you did :


sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Brrrrrr!! Grr.. Grreetings. It is freezing out here!!");
}
}

sub EVENT_ITEM {
# 13241 : Full Bottle of Elixir
if ($itemcount{13241} == 1){
quest::say("Thank you! I think what's her name needs some too, she can be found.....");
quest::exp(125);
quest::faction(10103,1); # 10103 : Faction XY
quest::summonitem(13241); # 13241 : Full Bottle of Elixir
}
}

#END of FILE Zone:everfrost ID:4881 -- Talin_ODonal

paaco
05-10-2006, 12:36 AM
Thanks for the correction Muuss, I always got something small like that missing :( Usually takes me 2 or 3 times to get a quest right but I'm learning slowly :)

Hamarabi
05-11-2006, 10:57 AM
Sorry, I havn't been able to get back to this until today.

I looked up the faction ID's and fixed that, thanks to your help.

Next, I went on LIVE and logged the correct dialogue, so that I could add that in to the quest. I also took note of the faction changes, there were four changes instead of just one.

FIXING THE QUEST:
At first, the NPC's wouldn't work, so I thought I would rename the files to their NPC ID's (I used #npcstats to find their NPCID) and sometimes it would work and others, no. So I downloaded the MySQL query browser and took a look at the NPC ID's and found that some of the NPC's have several entries. The only obvious difference I noticed, was the level of the NPC compared to the NPCID. I'll list them below.

Talin O`Donal
NPCID:
30074 Level 2
30118 Level 4
30129 Level 3

Bryndin McMill
NPCID:
30065 Level 2
30115 Level 4

Arnis McLish
NPCID:
30049 Level 2

Megan OReilly
NPCID:
30029 Level 2
30096 Level 3
30119 Level 4

I have no idea why these NPC's have more than one NPCID. Random Level spawn, I guess.

Anyways, I decided to take a look at the names of the NPC's compared to the NPCID's and found that Talin's name in the DB was Talin_O`Donal, which seems to be the problem. To experiment, I decided to take the ` character out of his name, essentially renaming him Talin_ODonal and that seemed to fix it.

After doing this, I renamed all of the files to reflect the NPC's name instead of the NPCID (orginal file names). That way it would not matter what random spawn occured. I am sure this was the intention.

Changelog:
I had to edit item 13242 to be more logical. It's name was "One Quarter of Elixir" and should be "Three Quarters of Elixir". Also, some of the NPC's didnt have files, so I created those. Specifically listed below:

1) Changed Talin_O`Donal name in the DB to TalinODonal then renamed his file in the everfrost directory.
2) Added Bryndin_McMill file to everfrost directory
3) Added Arnis_McLish file to the everfrost directory
4) Added Megan_OReilly file to the everfrost directory
5) Fixed up Dargon McPherson's code to be closer to what LIVE is like.
6) Edit item: 13242 and change the name to "Three Quarters of Elixir" instead of "One Quarter of Elixir". This is what should remain after Talin, the first NPC drinks it.
7) Added the four faction changes to each of the NPC's code.

I'll post the finished quest in the proper forum "Quests::Submissions".

Thanks a ton for your help guys, I really appreciate it! It's kind of fun to work on stuff like this.

Hamarabi

Hamarabi
05-11-2006, 05:07 PM
Well, after spending some time trying to figure out the format required to submit a quest, I am hoping you guys could help me out once again and point out any mistakes. I checked the submission guidelines at this URL:
http://www.eqemulator.net/forums/showthread.php?t=17400

The only problem with that, is the link for the criteria is broken. I don't want to get yelled at for not following the rules, but if the link is broken, I have no way of knowing if this is ok for submittal. Please note, that I added all of the NPCID's for each NPC because many of them had more than one (Random Level Spawn?). Anyways, i'll just cut and paste what I have here:

Header:
#############
#Quest Name: "deliver an elixir to young warriors"
#Author: Hamarabi, but I didn't write it, I just fixed it and completed the unfinished parts with the help of paaco, mrea, and Muuss.
#NPC's Involved: 5
#Items Involved: 5
#Zones Involved: 2
#Zones Involved: Halas, Everfrost
#############
###NPC 1
#Name: Dargon McPerson
#Race 2 (Barbarian), Texture of 3, Size 7, gender of 0
#Location: Pit of Doom in Halas
#Level: 61
#Type: Warrior Guildmaster / Quest NPC
#Item Obtained: Full Bottle of Elixir
#############
###NPC 2
#Name: Talin ODonal
#Race 2 (Barbarian), size 7, texture of 1, gender of 0
#Location: Everfrost at the Campfire in the tunnel to Halas
#Level: 2-4
#Type: Quest NPC
#Item Obtained: Three Quarters of Elixir
#############
###NPC 3
#Name: Bryndin McMill
#Race 2 (Barbarian), size 7, texture of 1, gender of 0
#Location: By Snowflake in Everfrost
#Level: 2-4
#Type: Quest NPC
#Item Obtained: One Half of Elixir
#############
###NPC 4
#Name: Arnis McLish
#Race 2 (Barbarian), size 7, texture of 0, gender of 0
#Location: By Blackburrow in Everfrost
#Level: 2-4
#Type: Quest NPC
#Item Obtained: One Quarter of Elixir
#############
###NPC 5
#Name: Megan OReilly
#Race 2 (Barbarian), size 7, texture of 0, gender of 1
#Location: Out by a tower on the south side of the river near Permafrost
#Level: 2-4
#Type: Quest NPC
#Item Obtained: Empty Bottle of Elixir
#############
###Item 1
#Name: Full Bottle of Elixir
#Item Function: Quest Turn-in
###
###Item 1
#Name: Three Quarters of Elixir
#Item Function: Quest Turn-in
###
###Item 1
#Name: One Half of Elixir
#Item Function: Quest Turn-in
###
###Item 1
#Name: One Quarter of Elixir
#Item Function: Quest Turn-in
###
###Item 1
#Name: Empty Bottle of Elixir
#Item Function: Quest Turn-in
###

#Note: All of these NPC's are already in the game using Cavedude's Serverpack 7.0 (EQEmuServerPack-3.52.exe)
#Note: I chose PEQ database during install

#Description: The point of this quest is to raise peoples faction with....
#Description: Merchant's of Halas, Shaman of Justice, Steel Warriors, and The Wolves of the North.

Here's the list of files for the NPC's:

Dargon_McPerson.pl I had to fix up his dialogue for the turn-in and have him give faction and an item at the end of the quest. I don't understand the "else" statement at the end of the "sub EVENT_ITEM". Maybe someone could help me understand that. I guess it's for training?
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hail. mighty $name! I assume ye must be a [warrior o' the Wolves]. Why else would ye approach a trainer such as meself. then?");
}
if($text=~/i am a warrior o/i){
quest::say("Aye. 'tis as I thought. I'm glad t' see we've warriors such as yerself amongst the Wolves o' the North. Lately. Kylan's been allowing too many scrawny warriors in. methinks. Nor have they fared well in Everfrrost. Many frreeze to death. ye know... Will ye assist me and [deliver an elixir to young warriors] in Everfrost?");
}
if($text=~/i will deliver an elixir to young warriors/i){
quest::say("Ach. 'tis good o' ye! Take this bottle of elixir to Everfrost Peaks. Find Talin O'Donal. He'll take the first sip. and then instruct ye on who else ye need to find. Do that. and I'll give ye a fine reward when ye return the empty elixir bottle. Good luck. then. Don't die.");
quest::summonitem("13241"); # Full Bottle of Elixir
}
}


sub EVENT_ITEM {
if($itemcount{13245} == 1){
quest::say("Ye've proven yerself to be a cut above the rest and aided yer fellow warriors, no matter how worthless they were. Ye may take this. It was found in the snow by one of our foraging parties. I hope it can be of use to a warrior like yerself.");
quest::exp("125");
quest::summonitem("2012"); # Leather Boots
quest::faction("213","1"); # 213 : Faction Merchant's of Halas
quest::faction("294","1"); # 294 : Faction Shaman of Justice
quest::faction("311","1"); # 311 : Faction Steel Warriors
quest::faction("361","1"); # 361 : Faction Wolves of the North
} else {
if($class ne 'Warrior') {
quest::say("You are not a member of my guild. I will not train you!");
quest::summonitem($item1) if($item1);
quest::summonitem($item2) if($item2);
quest::summonitem($item3) if($item3);
quest::summonitem($item4) if($item4);
return;
}
#assume it is a discipline tome...
quest::traindisc($item1) if(quest::isdisctome($item1));
quest::traindisc($item2) if(quest::isdisctome($item2));
quest::traindisc($item3) if(quest::isdisctome($item3));
quest::traindisc($item4) if(quest::isdisctome($item4));
}
}
#END of FILE Zone:halas ID:29055 -- Dargon_McPherson

Talin_ODonal.pl I had to edit the database name for this guy, it seems the server didn't like the ` character so I changed his name from "Talin O`Donal" to "Talin ODonal" and also changed the filename to reflect this change. (ie., Changed Talin_O`Donal.pl to Talin_ODonal.pl)
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Brrrrrr!! Grr.. Grreetings. It is freezing out here!!");
}
}

sub EVENT_ITEM {
# 13241 : Full Bottle of Elixir
if ($itemcount{13241} == 1){
quest::say("Mmmm.. I feel much warmer. Thank you. You should now find Bryndin McMill. He could use a swig also. I saw him hanging around two other guards.");
quest::exp(125);
quest::faction(213,1); # 213 : Faction Merchant's of Halas
quest::faction(294,1); # 294 : Faction Shaman of Justice
quest::faction(311,1); # 311 : Faction Steel Warriors
quest::faction(361,1); # 361 : Faction Wolves of the North
quest::summonitem(13242); # 13242 : 3/4 Full Bottle of Elixir
}
}

#END of FILE Zone:everfrost ID:30074, 30118, 30129 -- Talin_ODonal

Bryndin_McMill.pl This file didn't exist so I added it to the /quests/everfrost/ directory.
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("H-ha.. H-hai.. Hail!! It is v-v-very.. C-cold out here. You sh-sh-should light a c-c-campfire.");
}
}

sub EVENT_ITEM {
# 13242 : Three Quarters of Elixir
if ($itemcount{13242} == 1){
quest::say("Ahhh!! I feel warm all over. Thanks. You should go give Arnis McLish a drink of this elixir. Last time I saw him he was headed toward Blackburrow.");
quest::exp(125);
quest::faction(213,1); # 213 : Faction Merchant's of Halas
quest::faction(294,1); # 294 : Faction Shaman of Justice
quest::faction(311,1); # 311 : Faction Steel Warriors
quest::faction(361,1); # 361 : Faction Wolves of the North
quest::summonitem(13243); # 13243 : One Half Full Bottle of Elixir
}
}

#END of FILE Zone:everfrost ID:30065, 30115 -- Bryndin_McMill

Arnis_McLish.pl This file didn't exist either, so I added it to the /quests/everfrost/ directory.
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("My word!! I cannot believe how cold it is out here. I must keep running around just to keep warm.");
}

if($text=~/where's megan?/i){
quest::say("I heard she got lost on the plains. You should go ask her dog, Snowflake, where she is. I hear he is somewhere around the pass to Halas.");
}


}

sub EVENT_ITEM {
# 13243 : One Half Bottle of Elixir
if ($itemcount{13243} == 1){
quest::say("Mmmm.. Thank you stranger. I feel a lot warmer now. You should now go and find [Megan] O'Reilly.");
quest::exp(125);
quest::faction(213,1); # 213 : Faction Merchant's of Halas
quest::faction(294,1); # 294 : Faction Shaman of Justice
quest::faction(311,1); # 311 : Faction Steel Warriors
quest::faction(361,1); # 361 : Faction Wolves of the North
quest::summonitem(13244); # 13244 : One Quarter of Elixir
}
}

#END of FILE Zone:everfrost ID:30049 -- Arnis_McLish

Megan_OReilly.pl This file didn't exist either, so I added it to the /quests/everfrost/ directory.
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Brrrr.. It.. Is sooo.. c-cold!! I never.. sh-should've j-joined.. the.. the W-wolves of the N-north!!");
}
}

sub EVENT_ITEM {
# 13244 : One Quarter Bottle of Elixir
if ($itemcount{13244} == 1){
quest::say("Oh thank you. Sorry, but the bottle is empty now. I hope you did't need any. Take the empty bottle back to Dargon. He may refill it for you.");
quest::exp(125);
quest::faction(213,1); # 213 : Faction Merchant's of Halas
quest::faction(294,1); # 294 : Faction Shaman of Justice
quest::faction(311,1); # 311 : Faction Steel Warriors
quest::faction(361,1); # 361 : Faction Wolves of the North
quest::summonitem(13245); # 13245 : Empty Bottle of Elixir
}
}

#END of FILE Zone:everfrost ID:30029, 30096, 30119 -- Megan_OReilly

Another thing I had to do was change the name of ItemID 13242 from "One Quarter of Elixir" to "Three Quarters of Elixir" in the DB, because the first NPC should hand you back three quarters of the bottle, not one quarter. The second NPC will hand you back "One Half of Elixir" and so on.
Continued....

Hamarabi
05-11-2006, 05:08 PM
Continued from above.....
Finally, I added in four faction changes for each turn-in instead of one. This is exactly the way LIVE does it.

I assume that I just add that header to each one of the files. Since the NPC's are already in the game (ie., I didn't add them), I would think that most of the Header Information would not be needed, but I threw it in there anyways, just to be safe.

I appreciate the help you guys gave me in fixing this quest, and I really want to contribute back to the community. I hope this quest is up to par.

Hamarabi

P.S. How do I add a "random low level item" as a quest reward, when you hand the empty bottle back to Dargon and finish the quest? I think that's how LIVE does it, not sure.

P.S.S. One other thing, I wanted to add. Arnis tells you to go find Megan's dog, Snowflake. Snowflake is supposed to lead you out to Megan, when you hail him, but he doesn't I don't know how to fix that, but I guess, if you know where Megan is, that's not important.

ylosh
05-11-2006, 05:42 PM
for npc names that have a ` in them use a - in its place.

part of the ranger epic you hand an item to Giz_X`Tin. you'd only need to rename the .pl file to Giz_X-Tin.pl for it to work.

this is mentioned in the quest tutorial wiki page under Saving/Naming Quests.

Hamarabi
05-11-2006, 05:51 PM
Thanks alot for that info. I been reading a ton the last couple of days and I must have missed the file naming convention. That's much better. I couldn't figure out why it wouldn't accept the ` character. I'll fix that when I submit it.

Thanks again for setting me straight on that. What about the quest and the headers? Is this quest ready to submit with the naming fix?

Hamarabi

ylosh
05-11-2006, 11:22 PM
you're more than welcome to submit it to the PEQ server.

you can post it to the PEQ general quest forum at http://www.projecteq.net/phpBB2/viewforum.php?f=27

if you're interested in helping with quests you can ask to join the quest team and mystic414 will get in touch with you.

Belfedia
05-11-2006, 11:44 PM
you're more than welcome to submit it to the PEQ server.

you can post it to the PEQ general quest forum at http://www.projecteq.net/phpBB2/viewforum.php?f=27

if you're interested in helping with quests you can ask to join the quest team and mystic414 will get in touch with you.

Join the Peq crew for make quest or DB improvement is the best thing to help community for have a good DB for emulator :)