Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2008, 04:55 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Which looks and handles much better!
Reply With Quote
  #2  
Old 08-27-2008, 05:29 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks for the help guys. I will try messing with it a bit more when I get home tonight. Here is the actual quest that I am using right now that completely works other than returning items not in the hash values:

Code:
sub EVENT_ITEM {

my %accessories = (
 2439 => 3236, #Amice
 2634 => 3249, #Cape
 2660 => 3295, #Charm
 2993 => 3536, #Contributor_Charm
 2445 => 3242, #Earring
 2443 => 3238, #Girdle
 2442 => 3237, #Mask
 2444 => 3239, #Necklace
 2451 => 3248, #Ring
 );


  if ($qglobals{cora_credits} >= 25) {  #used for my new credit system just in this zone
    for my $accessories (sort keys %accessories) {
      if(defined($accessories)) {
        if (plugin::check_handin(\%itemcount, $accessories => 1)) {

          if(defined($accessories{$accessories})) {
            quest::emote("recognizes your efforts and fashions an upgrade for your armor piece" );
            quest::say("Thank you, $name, here is your upgraded armor piece!");
            quest::exp(45000);
            quest::setglobal("cora_credits", $qglobals{cora_credits}-25, 1, "F"); #subtracting 25 credits
            quest::summonitem($accessories{$accessories});
my $total_credits = ($qglobals{cora_credits} - 25);
$client->Message(5, "You have spent 25 Corathus Credits and now have $total_credits remaining credits.");
          }
        } 
#    else { #these are commented out because they don't work
#      plugin::return_items(\%itemcount);
#      quest::say ("I have no use for this item, $name.");
#       }        
      } 
    }

  }
    else { #this works for returning items if they don't have enough credits
      plugin::return_items(\%itemcount);
      quest::say ("You don't have enough credits for that, sorry.");    
    }
}

So far I am very happy with the system. Once I get it working flawlessly with the return item, I will post all of the credit system quests, which includes quests for mobs that give credit when they die as well as these quests for rewards that credits can be used for (along with an item turn-in in this case). I think they could be useful to other custom servers.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 11:15 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3