Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Submissions

Quests::Submissions This is where you submit your quests for review

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2013, 04:13 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default abysmal/#Alexsa_Whyte.pl

changed:
- more in line with quest as listed on ZAM*
* removed turn-in verification/reminder
* added response if quest started, but not finished
* will allow quest to be repeated
- call to plugin::return_items() unconditional
- will accept more than one turn in at once
- will not accept final turn ins until all basic steps are done
- Perl::Tidy formatting

Code:
# Discord Skin Samples
# http://everquest.allakhazam.com/db/quest.html?quest=2839

sub EVENT_SAY {

    # quest started, but not complete (per ZAM)
    if ( $qglobals{SkinSampleA} ) {
        quest::say( "There is nothing more I can tell you, please take the ite"
              . "m you received and get some samples for me." );
        return;
    }

    # initial contact
    elsif ( $text =~ /hail/i ) {
        quest::say( "Greetings traveler, my name is Alexsa and I am currently "
              . "looking in to collecting samples from the strange beings that"
              . " make up the Legion of Mata Muram ranks. Our initial encounte"
              . "rs with them revealed that each one is innately resistant to "
              . "certain types of weapons and weak against others. So, by orde"
              . "r of Morden, we must gather skin samples from each race and e"
              . "xamine it. Thanks to our tinkering sister, Vaifan, I now have"
              . " a device which can readily examine samples. However, with ne"
              . "ws of our scouts missing and our resources being spread so th"
              . "in, retrieving these samples are impossible for us. Since you"
              . " have taken the time to listen, I am wondering if you would b"
              . "e willing to help?" );
    }

    # quest accepted
    elsif ( $text =~ /yes/i ) {
        quest::say( "Oh wonderful! You don't know how helpful this will be. Ta"
              . "ke this device. It is what we use to examine samples. When yo"
              . "u defeat the Muramite, remove his tongue, place it inside of "
              . "here and combine it with some distilling salts. Distilling sa"
              . "lts can be found along the shores of Natimbi. Once you have c"
              . "ombined the ingredients, it will give you a final sample whic"
              . "h I will need you to return to me when you get the chance. Ea"
              . "ch time you hand a sample, I will be able to reveal to you th"
              . "e innate strengths and weeknesses for that race. If you are s"
              . "uccessful at recovering a sample from every different race th"
              . "at has come through the portal, then I will talk to Morden ab"
              . "out giving you a reward." );
        quest::summonitem(67594);    # Vaifan's Pocket Sampling Device
        quest::setglobal( 'SkinSampleA', 1, 5, 'F' );
    }

}

sub EVENT_ITEM {

    my $required = {
        0 => {
            item => 67596,           # Kyv Sample
            spam => "Ah yes, the kyv. These stealthy beings are quite elusive."
              . " The fact that you were able to recover a sample from one of "
              . "them is quite an accomplishment. Now, let's see... it appears"
              . " that the kyv have no noticeable weapon weaknesses or resista"
              . "nces, but we do know they have the ability to deflect incomin"
              . "g arrows and thrown objects. It would seem that they are also"
              . "resistant to poison based incantations, and quite weak to mag"
              . "ic based spells."
        },
        1 => {
            item => 67597,           # Ukun Sample
            spam => "An excellent find here! It appears that this was retrieve"
              . "d from one of the beings called an ukun. They have frail bodi"
              . "es but their blood is a deadly poison. This would imply that "
              . "they are probably very resistant to poison."
        },
        2 => {
            item => 67598,           # Ikaav Sample
            spam => "These snakelike beings are very deadly. The scales on the"
              . "ir lower body are all but impervious to slashing weapons, but"
              . " a well-placed arrow could do some serious damage. They are m"
              . "asters of magical energy making their defenses against such s"
              . "pells very good. However they do seem to be weak against elem"
              . "ental magic like cold."
        },
        3 => {
            item => 67599,           # Mastruq Sample
            spam => "Great sample! It looks like this was taken from a being w"
              . "ith a thickened hide. This particular being is called a mastr"
              . "uq and seems to be quite resistant to blunt objects, but an a"
              . "rrow or slashing weapon would get through that hide quite eas"
              . "ily. Because of their thick hides cold based elemental magic "
              . "would be quite ineffective while the opposite would hold true"
              . " for fire magic."
        },
        4 => {
            item => 67600,           # Aneuk Sample
            spam => "These odd-looking floating beings interest me the most. T"
              . "hey seem to be quite adept with magic making them strong agai"
              . "nst magical incantations."
        },
        5 => {
            item => 67601,           # Nok Sample
            spam => "Looks like this came from the body of the race of beings "
              . "called the noc. While their bony frames make them quite weak "
              . "against crushing damage, their plated chests protect any majo"
              . "r organs, reducing the effectiveness of arrows or slashing we"
              . "apons. It would appear that their flesh is diseased which mak"
              . "es them resistant to disease based spells but their thin skin"
              . "means that cold might be quite affective against them."
        },
        6 => {
            item => 67602,           # Ixt Sample
            spam => "These centaur-like beings are quite bloodthirsty. They ap"
              . "pear to be bred for fighting. Their fur covered lower half ma"
              . "kes them very resistant to the element of cold but while that"
              . " fur can protect them from one element it also makes them ver"
              . "y vulnerable to fire."
        },
        7 => {
            item => 67605,           # Ra'Tuk Sample
            spam => "This looks like a sample from the brutish ra'tuk. These l"
              . "arge beasts wield their axes adeptly and seem to have no majo"
              . "r weaknesses save magical based spells. Because of their stra"
              . "nge body makeup magic tends to affect them more then other sp"
              . "ell types."
        },
        8 => {
            item => 67603,           # Tunat'Muram Sample
            spam => "This is unbelievable, you retrieved a sample from the arm"
              . "y's leader and you still live? You are truly a great adventur"
              . "er. I must get this sample to our mages quickly. We must do s"
              . "ome extended testing as we have not had any information on hi"
              . "m till now."
        },
        9 => {
            item => 67604,           # Zun'muram Sample
            spam => "A two-headed beast built for destruction. This creature i"
              . "s quite powerful, as I am sure you found out when you met it."
              . " While it does not appear to have any resistances or weakness"
              . "es, this sample should reveal some more information about its"
              . " particular race."
        }
    };

    # quest started, but all basic samples not turned in yet
    if ( $qglobals{SkinSampleA} and not $qglobals{SkinSampleB} ) {
        foreach ( 0 .. 7 ) {
            my $qgKey  = "SkinSample$_";
            my $sample = $required->{$_};

            next if $qglobals{$qgKey};    # already turned in

            next unless AcceptSample( $sample, $qgKey );

            # see if all basic samples are turned in after each accepted sample
            if ( BasicSamplesDone() ) {
                quest::say(
                        "Now that I have all of the basic samples I can ad"
                      . "d all of my research into this tome and give it to yo"
                      . "u." );
                quest::summonitem(67624);    # Alexsa's Research Notes
                quest::say(
                        "While we still need samples from both the force c"
                      . "ommander and his lieutenant, what you have given me s"
                      . "o far warrants a reward of some kind. When you have r"
                      . "ecovered samples from both of the additional races I "
                      . "mentioned I will be able to reward you with something"
                      . "much better." );
                quest::setglobal( 'SkinSampleB', 1, 5, 'F' );
                last;
            }
        }
    }

    # all basic samples have been turned in
    if ( $qglobals{SkinSampleB} ) {
        foreach ( 8, 9 ) {
            my $qgKey  = "SkinSample$_";
            my $sample = $required->{$_};

            next if $qglobals{$qgKey};    # already turned in

            next unless AcceptSample( $sample, $qgKey );

            # see if all samples are turned in after each accepted sample
            if ( AllDone() ) {
                quest::say(
                        "This is unbelievable, you retrieved a sample from"
                      . " the army's leader and you still live? You are truly "
                      . "a great adventurer. I must get this sample to our mag"
                      . "es quickly. We must do some extended testing as we ha"
                      . "ve not had any information on him till now. You have "
                      . "collected all the samples we need and I thank you for"
                      . " the assistance. I am indebted to you and with approv"
                      . "al given by Morden himself I want you to take this, h"
                      . "opefully it will help you in your future adventures. "
                      . "Good day and good luck." );
                quest::summonitem(67625);    # Assistant Researcher's Symbol

                # delete qglobals to allow for repetition of quest (per ZAM)
                quest::delglobal("SkinSample$_") for ( 0 .. 9 );
                quest::delglobal("SkinSample$_") for ( 'A', 'B' );
            }
        }
    }

    # return unused items
    quest::say("I do not need this.") if keys %itemcount > 1;
    plugin::return_items( \%itemcount );

}

sub AcceptSample {

    my ( $sample, $qgKey ) = @_;

    return 0
      unless plugin::check_handin( \%itemcount, $sample->{item} => 1 );

    quest::say( $sample->{spam} );
    quest::setglobal( $qgKey, 1, 5, 'F' );

    quest::say(
            "You're doing great, but there are more samples to be found. P"
          . "lease get them to me as soon as you can." )
      unless AllDone();

    return 1;

}

sub BasicSamplesDone {

    return 1 if $qglobals{SkinSampleB};

    foreach ( 0 .. 7 ) {
        return 0 unless $qglobals{"SkinSample$_"};
    }

    return 1;

}

sub AllDone {

    return 0 unless BasicSamplesDone();

    foreach ( 8, 9 ) {
        return 0 unless $qglobals{"SkinSample$_"};
    }

    return 1;

}

#END OF FILE zone:abysmal ID:279038 -- #Alexsa_Whyte.pl
Reply With Quote
  #2  
Old 02-08-2013, 06:54 AM
Zia
Fire Beetle
 
Join Date: Dec 2010
Posts: 21
Default

The quest does not work at all in this state. Alexsa will not give you a new container when asked (which she should). This means that if you destory the container, which you are wont to do since there are way too many of those that you need to keep as is, you will not be able to complete the quest.

Upon completion she will not hand you the research notes. Unless no information was kept when the script was updated, which is impossible to find out since she no longer tells you what you have turned in or not (that feature was a good one!).

A revert is in order.
Reply With Quote
  #3  
Old 02-08-2013, 12:20 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

after re-reading through the comments on ZAM, it appears that i missed one that states you can receive a replacement container by repeating the dialogue. the quest can easily be updated by changing this line

Code:
if ( $qglobals{SkinSampleA} ) {
to this

Code:
if ( $qglobals{SkinSampleA} && plugin::check_hasitem( $client, 67594 ) ) {
she was never supposed to tell you what you had turned in, nice feature or not. the peq quest repository is not a custom quest repository.

as for your assertion she never rewards you with the research notes... she hands them to you when you turn in all of the basic samples, instead of using an arbitrary count of whatever 8 you turn in first (as the original write-up did, if i remember correctly). again, this is live-like behavior according to the documentation available.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #4  
Old 02-08-2013, 12:29 PM
Zia
Fire Beetle
 
Join Date: Dec 2010
Posts: 21
Default

Quote:
Originally Posted by c0ncrete View Post
as for your assertion she never rewards you with the research notes... she hands them to you when you turn in all of the basic samples, instead of using an arbitrary count of whatever 8 you turn in first (as the original write-up did, if i remember correctly). again, this is live-like behavior according to the documentation available.
I know. I have turned in the basic samples, yet no notes. But then again, I only had two left when this change went in, so if she does not remember samples previously handed to her, all is as it is supposed to be I guess (although annoying).
Reply With Quote
  #5  
Old 02-08-2013, 12:56 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

i see what you're saying now. it's not that the quest doesn't work, but rather that the change was made while you were in the middle of the quest, and you don't have credit for your original hand-ins.

let me grab an earlier revision and post a SQL snippet that should convert existing values. is this on your server or a server you play on?
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #6  
Old 02-08-2013, 03:17 PM
Zia
Fire Beetle
 
Join Date: Dec 2010
Posts: 21
Default

Quote:
Originally Posted by c0ncrete View Post
i see what you're saying now. it's not that the quest doesn't work, but rather that the change was made while you were in the middle of the quest, and you don't have credit for your original hand-ins.

let me grab an earlier revision and post a SQL snippet that should convert existing values. is this on your server or a server you play on?
A server I play on. I have already started to collect the tongues anew, but there might be others out there with less patience.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:33 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3