EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Question about Epic 1.5 Turn-In Quest (https://www.eqemulator.org/forums/showthread.php?t=34390)

Durge 10-26-2011 07:28 AM

Question about Epic 1.5 Turn-In Quest
 
I was just wondering, I made a quest for an epic 1.5 turn-in and for some reason it's not giving the player the token, maybe someone could take a look?
Code:

sub EVENT_SAY #Start of the talking dialogue
{
        my $Epic = quest::saylink("Epic") #Creates a clickable say link for $Epic
       
        if($text=~/hail/i) #If the text equals "hail"
        {
                $client->Message(15, "Hello $name, you have caught me at a bad time, I am currently in the process of completing an item that will indeed be [$Epic]."); #Message
        }
        if($text=~/epic/i) #If the text equals "epic"
        {
                $client->Message(15, "Interested are you? Well, I might have some use of you. If you can give me your Epic 1.5, then I can give you a token."); #Message
        }
}
       
sub EVENT_ITEM #Turning in the Epic 1.5
{
        if(plugin::check_handin(\%itemcount, 60332 => 1)) #This is handing in the Warrior Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 52348 => 1)) #Handing in the Rogue Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 67742 => 1)) #Handing in the Monk Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 18609 => 1)) #Handing in the Berserker Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 48136 => 1)) #Handing in the Shadowknight Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 48147 => 1)) #Handing in the Paladin Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 62647 => 1)) #Handing in the Ranger Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 77640 => 1)) #Handing in the Bard Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 57054 => 1)) #Handing in the Beastlord Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 20076 => 1)) #Handing in the Cleric Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 62880 => 1)) #Handing in the Druid Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 57045 => 1)) #Handing in the Shaman Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 16576 => 1)) #Handing in the Wizard Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 19839 => 1)) #Handing in the Magician Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 52962 => 1)) #Handing in the Enchanter Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        if(plugin::check_handin(\%itemcount, 64067 => 1)) #Handing in the Necromancer Epic 1.5
        {
                quest::summonitem("1661"); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        else
        {
                $client->Message(15, "Why on earth would I want this?"); #Message
                plugin::return_items(\%itemcount);
        }
}


lerxst2112 10-26-2011 08:56 AM

Take the quotes off 1661.

quest::summonitem(1661); #Token

joligario 10-26-2011 09:36 AM

Although a good practice, that's not breaking the script. Most likely it is:

my $Epic = quest::saylink("Epic");

Also, you may want to change the if's to elsif's in the turnin block otherwise the else only works with the last if.

Edit: And you could clean them up into one if block since you are repeating code multiple times.

lerxst2112 10-26-2011 11:26 AM

I didn't see the missing semicolon. You and your eagle eyes! :)

I assumed, that since he mentioned only that the token wasn't getting created, that everything else was working as expected.

Baruuk 10-26-2011 12:51 PM

It's off topic a bit, but I have to ask - what will players do with the "token" you give them from handing in their 1.5? I assume it's something towards their 2.0?

Durge 10-26-2011 05:13 PM

Yeah, they will be used in the combine for 2.0, and thanks for all the help guys, and you really do have eagle eyes joligario xD.

EDIT:Hmm, it still does not give the token.

wolfwalkereci 10-26-2011 10:23 PM

Tried using 'or' instead of 'else if' ?

joligario 10-26-2011 11:08 PM

Those item IDs are the epic 2.0s rather than the 1.5s (at least the ones I looked at). Are you turning in the right items?

Durge 10-31-2011 11:31 PM

Ah, yes that could've been a mistake, but it still wouldn't have mattered

joligario 11-01-2011 05:32 AM

It would matter if you were trying to test it with 1.5s

So does it work for you now?

lerxst2112 11-01-2011 09:34 AM

This works for me. I had to change the item it summoned because I do not have item 1661 in my database. You should also check the IDs for the hand in, since at least the shaman one is not the right id for their epic based on a peq database.

Code:

sub EVENT_SAY #Start of the talking dialogue
{
        my $Epic = quest::saylink("Epic"); #Creates a clickable say link for $Epic
       
        if($text=~/hail/i) #If the text equals "hail"
        {
                $client->Message(15, "Hello $name, you have caught me at a bad time, I am currently in the process of completing an item that will indeed be [$Epic]."); #Message
        }
        if($text=~/epic/i) #If the text equals "epic"
        {
                $client->Message(15, "Interested are you? Well, I might have some use of you. If you can give me your Epic 1.5, then I can give you a token."); #Message
        }
}
       
sub EVENT_ITEM #Turning in the Epic 1.5
{
        if(plugin::check_handin(\%itemcount, 60332 => 1)) #This is handing in the Warrior Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 52348 => 1)) #Handing in the Rogue Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 67742 => 1)) #Handing in the Monk Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 18609 => 1)) #Handing in the Berserker Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 48136 => 1)) #Handing in the Shadowknight Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 48147 => 1)) #Handing in the Paladin Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 62647 => 1)) #Handing in the Ranger Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 77640 => 1)) #Handing in the Bard Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 57054 => 1)) #Handing in the Beastlord Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 20076 => 1)) #Handing in the Cleric Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 62880 => 1)) #Handing in the Druid Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 57045 => 1)) #Handing in the Shaman Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 16576 => 1)) #Handing in the Wizard Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 19839 => 1)) #Handing in the Magician Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 52962 => 1)) #Handing in the Enchanter Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        elsif(plugin::check_handin(\%itemcount, 64067 => 1)) #Handing in the Necromancer Epic 1.5
        {
                quest::summonitem(10051); #Token
                quest::emote("Checks the quality"); #An emote
                $client->Message(15, "Indeed, this is what I'm looking for, here is your token."); #Message
        }
        else
        {
                $client->Message(15, "Why on earth would I want this?"); #Message
                plugin::return_items(\%itemcount);
        }
}



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

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.