jimbox114
08-10-2004, 05:59 AM
I have looked over this code several times, and I can't figure out what the problem is. What kills me is this mob worked fine before I added a 2nd quest to him. The 2nd quest involves the text [problem], [fine], [interested]. Thing is the first quest you do with him you get two items from. So when I added the 2nd quest I put the quest::summon commands both in the same line as you can see below. I know that works fine with 1 item being summoned, I imagine it should work with two shouldn't it?
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Yes, what do you want from me $name? I am much to upset to speak to a stranger, unless of course you wish to hear my long painful [story]?");}
if ($text=~ /story/i){quest::say("Well sit down my friend and pull up a chair. It all started back when I was a young lad, much like yourself. I met a wonderful lady named Gargella. We was the best of friends forever, however as we got older we drifted far apart. You see she wanted to make something of her life and she choose the path of a Enchanter. I just wasn't willing to try and study the art of magic, so instead I became a warrior. Now she is the Dean of the Great Freeport University, while I am a out of work Warrior. Just seems Warriors these days are a silver piece a dozen now, so many of us are out of work and barely able to feed ourselves. But there is [more] to this story.");}
if ($text=~ /more/i){quest::say("Aye, you see I have not spoken to Gargella in several years, heck I don't know if she would even remember me. However I wrote her a note, wanting to see if maybe she would like to see me sometime. However the same night I wrote it I passed out around the docks and can't seem to find it. Maybe if you could look around the docks you could find it for me? I may have even dropped it into the water. Remember return it to ME and nobody else, got it? I also have to attend to a small [problem] that I have with the Freeport Militia later on.");}
if ($text=~ /problem/i){quest::say("Yesterday I was burning my garbage outside of the city gates. I can no longer afford to pay the outrageous Freeport taxes for garbage service, so I was left with no other choice. At first I was just going to dump it into the ocean, but those pesky guards keep a close eye on it. Anyways I was caught by a Freeport guard and was given a [fine] for burning within city limits.");}
if ($text=~ /fine/i){quest::say("Yes I was fined five hundred pieces of platinum, and there is no way I can afford this. I need to speak to my old bud Cenamar who lives in Freeport North at the Office of the People. Of course perhaps you would be [interested] in taking care of this for me?");}
if ($text=~ /interested/i){quest::say("Excellent, I can't thank you enough $name. Here is the papers the guard gave me. Just show these to Cenamar and hopefully he will get this straightened up for me."); quest::summonitem (69020);}
}
sub EVENT_ITEM
{
if (#itemcount{69022} == 1){quest::say("Thanks lad, now thats one less thing for me to worry about. Here take my old bow as a reward, I never was much of a archer anyways."); quest::summonitem(69021);}
if ($itemcount{69297} == 1){quest::say("Great, so you found it $name? Oh really, it was in the belly of a giant snake? Its no wonder I didn't ever find it, no way I would have messed with that giant snake. Anyways I guess Im off to West Freeport to give this to Gargella.....Oh who am I kidding. Im so drunk right now I couldn't possibly meet up with her. Hey I know, I will let you do this one final favor for me. Here take this note to Gargella in West Freeport. Oh, also I would like to give you my cloak as a gift for all your troubles. Gargella actually made this for me several years ago. It was once a mighty cloak, I am truely ashame of myself for letting it go like this. Who knows, Maybe she can repair this cloak for you? Well off you go then, happy hour is almost over you know!"); quest::summonitem(69297); quest::summonitem(69299);}
}
Another problem I got is trying to get the next mob to talk. I think my problem with him involves the use of the $platinum amount. I tried search and see where somebody suggested to another person to add the $myplatinum = $platinum; in there, so I have tried it with and without it. Either way this npc does nothing. I have also tried the if $platinum >= 100 in there as well, and still nothing. I imagine it will turn out to be some stupid syntax error, but I have looked over ths code till my eyes bleed and don't see it.
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Hello, I am Cenamar Circlelight. I am sort of busy at the moment, please come back later unless you have something for me.");}
if ($text=~ /story/i){quest::say("Back in the day Penfrost, Gargella, and Penfrost was three of a kind. However as we got older I decided I wanted to be somebody, so I went to felwithe to study to be a cleric. Me and Gargella both urged Penfrost to go train to be a shaman, but he was just too lazy. Now I am a rich High Elf who can get work anytime, and Penfrost is just one of the many out of work Warriors out there.");}
}
sub EVENT_ITEM
{
$myplatinum = $platinum;
if ($itemcount{69020} == 1){quest::say("I see my old friend Penfrost is at it again. Yes me and Penfrost was good friends, but that is a long [story]. For 100pp I can take care of this for Penfrost. I assume you will have to pay me the 100pp, as I would be surprised if Penfrost has two copper pieces to rub together.");}
if ($platinum == 100 {quest::say("Very well, you have my word this will be taken care of. Please give this signed paperwork back to Penfrost as proof. Also, for the love of Tunare tell him to stop burning his trash. Its no wonder the east side of Freeport stinks so bad anymore."); quest::summonitem(69022);}
}
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Yes, what do you want from me $name? I am much to upset to speak to a stranger, unless of course you wish to hear my long painful [story]?");}
if ($text=~ /story/i){quest::say("Well sit down my friend and pull up a chair. It all started back when I was a young lad, much like yourself. I met a wonderful lady named Gargella. We was the best of friends forever, however as we got older we drifted far apart. You see she wanted to make something of her life and she choose the path of a Enchanter. I just wasn't willing to try and study the art of magic, so instead I became a warrior. Now she is the Dean of the Great Freeport University, while I am a out of work Warrior. Just seems Warriors these days are a silver piece a dozen now, so many of us are out of work and barely able to feed ourselves. But there is [more] to this story.");}
if ($text=~ /more/i){quest::say("Aye, you see I have not spoken to Gargella in several years, heck I don't know if she would even remember me. However I wrote her a note, wanting to see if maybe she would like to see me sometime. However the same night I wrote it I passed out around the docks and can't seem to find it. Maybe if you could look around the docks you could find it for me? I may have even dropped it into the water. Remember return it to ME and nobody else, got it? I also have to attend to a small [problem] that I have with the Freeport Militia later on.");}
if ($text=~ /problem/i){quest::say("Yesterday I was burning my garbage outside of the city gates. I can no longer afford to pay the outrageous Freeport taxes for garbage service, so I was left with no other choice. At first I was just going to dump it into the ocean, but those pesky guards keep a close eye on it. Anyways I was caught by a Freeport guard and was given a [fine] for burning within city limits.");}
if ($text=~ /fine/i){quest::say("Yes I was fined five hundred pieces of platinum, and there is no way I can afford this. I need to speak to my old bud Cenamar who lives in Freeport North at the Office of the People. Of course perhaps you would be [interested] in taking care of this for me?");}
if ($text=~ /interested/i){quest::say("Excellent, I can't thank you enough $name. Here is the papers the guard gave me. Just show these to Cenamar and hopefully he will get this straightened up for me."); quest::summonitem (69020);}
}
sub EVENT_ITEM
{
if (#itemcount{69022} == 1){quest::say("Thanks lad, now thats one less thing for me to worry about. Here take my old bow as a reward, I never was much of a archer anyways."); quest::summonitem(69021);}
if ($itemcount{69297} == 1){quest::say("Great, so you found it $name? Oh really, it was in the belly of a giant snake? Its no wonder I didn't ever find it, no way I would have messed with that giant snake. Anyways I guess Im off to West Freeport to give this to Gargella.....Oh who am I kidding. Im so drunk right now I couldn't possibly meet up with her. Hey I know, I will let you do this one final favor for me. Here take this note to Gargella in West Freeport. Oh, also I would like to give you my cloak as a gift for all your troubles. Gargella actually made this for me several years ago. It was once a mighty cloak, I am truely ashame of myself for letting it go like this. Who knows, Maybe she can repair this cloak for you? Well off you go then, happy hour is almost over you know!"); quest::summonitem(69297); quest::summonitem(69299);}
}
Another problem I got is trying to get the next mob to talk. I think my problem with him involves the use of the $platinum amount. I tried search and see where somebody suggested to another person to add the $myplatinum = $platinum; in there, so I have tried it with and without it. Either way this npc does nothing. I have also tried the if $platinum >= 100 in there as well, and still nothing. I imagine it will turn out to be some stupid syntax error, but I have looked over ths code till my eyes bleed and don't see it.
sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Hello, I am Cenamar Circlelight. I am sort of busy at the moment, please come back later unless you have something for me.");}
if ($text=~ /story/i){quest::say("Back in the day Penfrost, Gargella, and Penfrost was three of a kind. However as we got older I decided I wanted to be somebody, so I went to felwithe to study to be a cleric. Me and Gargella both urged Penfrost to go train to be a shaman, but he was just too lazy. Now I am a rich High Elf who can get work anytime, and Penfrost is just one of the many out of work Warriors out there.");}
}
sub EVENT_ITEM
{
$myplatinum = $platinum;
if ($itemcount{69020} == 1){quest::say("I see my old friend Penfrost is at it again. Yes me and Penfrost was good friends, but that is a long [story]. For 100pp I can take care of this for Penfrost. I assume you will have to pay me the 100pp, as I would be surprised if Penfrost has two copper pieces to rub together.");}
if ($platinum == 100 {quest::say("Very well, you have my word this will be taken care of. Please give this signed paperwork back to Penfrost as proof. Also, for the love of Tunare tell him to stop burning his trash. Its no wonder the east side of Freeport stinks so bad anymore."); quest::summonitem(69022);}
}