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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 01-18-2010, 12:45 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

I think you're looking for this, I had this on my server...

The syntax you'll notice has for example $coinages * 10 or 100 or etc, that is the item * whatever value you want it to hold when you want it to return into how many LDON points it returns back to you.

Code:
sub EVENT_SAY
{
   my $coinages = quest::collectitems(1381,0);
   my $coinages1 = quest::collectitems(1384,0);
   my $coinages2 = quest::collectitems(1385,0);
   my $link1 = quest::saylink("exchange", 1);
   my $link2 = quest::saylink("Tokens of Reborn", 1);
   my $link3 = quest::saylink("Small Tokens", 1);
   my $link4 = quest::saylink("Dark Tokens", 1);
   my $link5 = quest::saylink("Dark Tokens of Rebirth", 1);
      if($text=~/hail/i)
            {
            quest::say("Hello $name! are you here to [$link1] your [$link2] for points?.");
            }
      if($text=~/Tokens of Reborn/i)
            {
            quest::say("Yes, there are many ways to find the Dark Tokens, they are scattered out in the lands");
            }
		if($text=~/exchange/i)
            {
            quest::say("Yes, I can exchange [$link3], [$link4], and [$link5].");
            }	
			
      if($text=~/Dark Tokens of Rebirth/i && $coinages > 0) ####DARK TOKENS OF REBIRTH####

				{
               quest::collectitems(1381,1);
               quest::addldonpoints($coinages * 100,2);
               quest::say("$coinages Dark Tokens of Rebirth? Very well, I have embedded Mir in your soul.");
				}
				elsif($text=~/Dark Tokens of Rebirth/i && $coinages < 1)
				{
				quest::say("Are you trying to cheat me you ridiculous $race? You don't have any Tokens!");
				}
		if($text=~/Small Tokens/i && $coinages1 > 0)  ####SMALL TOKENS####
				{
               quest::collectitems(1384,1);
               quest::addldonpoints($coinages1 * 1,2);
               quest::say("$coinages1 Small Tokens? Very well, I have embedded Mir in your soul.");
			  
				}
					elsif($text=~/Small Tokens/i && $coinages1 < 1)
						{
						quest::say("Are you trying to cheat me you ridiculous $race? You don't have any Tokens!");
						}
		if($text=~/Dark Tokens/i && $coinages2 > 0) ####DARK TOKENS####
				{
               quest::collectitems(1385,1);
               quest::addldonpoints($coinages2 * 10,2);
               quest::say("$coinages2 Dark Tokens? Very well, I have embedded Mir in your soul.");
				}
      elsif($text=~/Dark Tokens/i && $coinages2 < 1)
        {
        quest::say("Are you trying to cheat me you ridiculous $race? You don't have any Tokens!");
        }
      }

sub EVENT_ITEM
{		my $numcoins = $itemcount{1381};
		my $numcoins1 = $itemcount{1384};
		my $numcoins2 = $itemcount{1385};
		  my $link1 = quest::saylink("exchange", 1);
         if ($numcoins > 0)
            {
               quest::summonitem(1381,$numcoins);
               quest::say("Well I appreciate the tokens, but why don't you try saying [$link1] to me instead.");
            }
			if ($numcoins1 > 0)
            {
               quest::summonitem(1384,$numcoins1);
               quest::say("Well I appreciate the tokens, but why don't you try saying [$link1] to me instead.");
            }
			if ($numcoins2 > 0)
            {
               quest::summonitem(1385,$numcoins2);
               quest::say("Well I appreciate the tokens, but why don't you try saying [$link1] to me instead.");
            }
				 
				  }
I apologize for how some of my code is structured it's a little sloppy in some areas, that should help!
Reply With Quote
 


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