EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Little help please :) (https://www.eqemulator.org/forums/showthread.php?t=28544)

Vainglory69 06-11-2009 01:21 PM

Little help please :)
 
Any ideas why the following will not work?
Wrapping the statements in double (( )) I get the hail text but no items,
Using single ( ) I get no response at all... and I am at my wits end right now with this.

Code:

########(1.0 Rewarder)
####Zone:PoK
########

sub EVENT_SAY
  {
if($text=~/Hail/i) && ($ulevel <=46)
{
quest::say("Sorry young $class, I am afraid you are too young still, please return to me when you are level 46.")
}
elsif($text=~/Hail/i) && ($ulevel >=46)
  {
  quest::say("Greetings $name, do you seek your first [epic] weapon for yourself and or bots?");
  }
 if ($text=~/epic/i) && ($ulevel >=46)
  {
  quest::say("As a reward for the great deeds you have done I will reward you with a weapon of great power, please tell me which class you need the item for.");
  }
}
sub EVENT_ITEM
{
  if ($text=~/berserker/i) && ($ulevel >=46)
    {
      quest::summonitem (68299);
      quest::ding ();
    }
  elsif ($text=~/cleric/i) && ($ulevel >=46)
    {
      quest::summonitem (5532);
      quest::ding ();
  }
  elsif ($text=~/druid/i) && ($ulevel >=46)
    {
      quest::summonitem (20490);
      quest::ding ();
    }
  elsif ($text=~/magician/i) && ($ulevel >=46)
    {
      quest::summonitem (28034);
      quest::ding ();
    }
  elsif ($text=~/necromancer/i) && ($ulevel >=46)
    {
      quest::summonitem (20544);
      quest::ding ();
    }
  elsif ($text=~/enchanter/i) && ($ulevel >=46)
        {
      quest::summonitem (10650);
      quest::ding ();
    }
  elsif ($text=~/monk/i) && ($ulevel >=46)
    {
      quest::summonitem (1683);
      quest::ding ();
    }
  elsif ($text=~/beastlord/i) && ($ulevel >=46)
      {
      quest::summonitem (8495);
      quest::summonitem (8496);
      quest::ding ();
    }
  elsif ($text=~/rogue/i) && ($ulevel >=46)
      {
      quest::summonitem (11057);
      quest::ding ();
    } 
  elsif ($text=~/ranger/i) && ($ulevel >=46)
      {
      quest::summonitem (20487);
      quest::summonitem (20488);
      quest::ding ();
    } 
  elsif ($text=~/bard/i) && ($ulevel >=46)
      {
      quest::summonitem (20542);
      quest::ding ();
    } 
  elsif ($text=~/shaman/i) && ($ulevel >=46)
      {
      quest::summonitem (10651);
      quest::ding ();
    }
  elsif ($text=~/warrior/i) && ($ulevel >=46)
      {
      quest::summonitem (10908);
      quest::summonitem (17859);
      quest::ding ();
    }
  elsif ($text=~/wizard/i) && ($ulevel >=46)
      {
      quest::summonitem (14341);
      quest::ding ();
    }
  elsif ($text=~/shadowknight/i) && ($ulevel >=46)
      {
      quest::summonitem (14383);
      quest::ding ();
    }
  elsif ($text=~/paladin/i) && ($ulevel >=46)
      {
      quest::summonitem (10099);
      quest::ding ();
        }
}


ChaosSlayerZ 06-11-2009 01:37 PM

check for missing ;

I allready see one missing after

quest::say("Sorry young $class, I am afraid you are too young still, please return to me when you are level 46.")


and yes double () around insides of ifs and elses

if (($text=~/Hail/i) && ($ulevel <=46))

Capheus 06-11-2009 02:04 PM

Try this

Code:


########(1.0 Rewarder)
####Zone:PoK
########

sub EVENT_SAY
{
 
  if ($ulevel>=46)
            {

          if ($text=~/Hail/i)
                  {
                  quest::say("Greetings $name, do you seek your first [epic] weapon for yourself and or bots?");
                  }

        if ($text=~/epic/i)
                  {
                  quest::say("As a reward for the great deeds you have done I will reward you with a weapon of great power, please tell me which class you need the item for.");
                  }

        if ($text=~/berserker/i)
                    {
                      quest::summonitem (68299);
                    quest::ding();
                    }

          if ($text=~/cleric/i)
                    {
                      quest::summonitem (5532);
                      quest::ding();
                  }

        if ($text=~/druid/i)
                  {
                      quest::summonitem (20490);
                      quest::ding();
                    }

          if ($text=~/magician/i)
                    {
                    quest::summonitem (28034);
                      quest::ding();
                    }

          if ($text=~/necromancer/i)
                    {
                      quest::summonitem (20544);
                      quest::ding();
                    }

          if ($text=~/enchanter/i)
                {
                      quest::summonitem (10650);
                      quest::ding();
                    }

          if ($text=~/monk/i)
                    {
                      quest::summonitem (1683);
                      quest::ding();
                    }

          if ($text=~/beastlord/i)
                      {
                      quest::summonitem (8495);
                      quest::summonitem (8496);
                      quest::ding();
                    }

          if ($text=~/rogue/i)
                      {
                      quest::summonitem (11057);
                      quest::ding();
                  } 

          if ($text=~/ranger/i)
                      {
                      quest::summonitem (20487);
                      quest::summonitem (20488);
                      quest::ding();
                    }
 
          if ($text=~/bard/i)
                      {
                      quest::summonitem (20542);
                      quest::ding();
                    }
 
        if ($text=~/shaman/i)
                      {
                      quest::summonitem (10651);
                      quest::ding();
                    }

          if ($text=~/warrior/i)
                      {
                      quest::summonitem (10908);
                      quest::summonitem (17859);
                      quest::ding();
                    }

          if ($text=~/wizard/i)
                      {
                      quest::summonitem (14341);
                      quest::ding();
                    }

          if ($text=~/shadowknight/i)
                      {
                      quest::summonitem (14383);
                      quest::ding();
                    }

          if ($text=~/paladin/i)
                      {
                    quest::summonitem (10099);
                      quest::ding();
                }

        }

  elsif (($text=~/Hail/i) && ($ulevel<=46))
        {
        quest::say("Sorry young $class, I am afraid you are too young still, please return to me when you are level 46.");
        }
}


Capheus 06-11-2009 02:14 PM

Forgot to mention. sub EVENT_ITEM is only needed when someone if giving an item to the NPC.

Vainglory69 06-11-2009 02:20 PM

Grrr, ok, I corrected the "((" issues and added the missing ;'s and would only get the text but no item, maybe that is what the deal was.

Your script worked perfectly! And I thank you for the help. New to perl but I am trying to learn :)

Thanks guys!

Andrew80k 06-11-2009 03:07 PM

Out of curiousity, why do you not check $class to determine the item to summon as opposed to $text? If I am a rogue and I say "berserker" I get the berserker epic? Why would you do that? There are some circumstances where this might be appropriate, but for the most part I would think you'd want to give an appropriate epic to the appropriate class based on the class.

ChaosSlayerZ 06-11-2009 03:28 PM

Quote:

Originally Posted by Andrew80k (Post 171921)
Out of curiousity, why do you not check $class to determine the item to summon as opposed to $text? If I am a rogue and I say "berserker" I get the berserker epic? Why would you do that? There are some circumstances where this might be appropriate, but for the most part I would think you'd want to give an appropriate epic to the appropriate class based on the class.

cuase he may want to give it to his bot perhaps


Quote:

quest::say("Greetings $name, do you seek your first [epic] weapon for yourself and or bots?");

Vainglory69 06-11-2009 03:39 PM

Hehe, yes, no other way to get epics for the bot army :)

Andrew80k 06-11-2009 03:55 PM

And what benefits do the bots get from them? Do weapons on bots proc? I know that you can't use the clickies on bot items, so other than maybe special procs, such as the Ranger epic that procs a slow, what is there to gain from giving them the epic? "It looks cool" is an acceptable answer, like I said I'm just curious. Some folks come up with some really cool ideas for customization and I often am curious as to what purpose they want to do this or that. For the most part there are MUCH better weapons than the epics so I never even considered giving my bots epics.

Andrew80k 06-11-2009 03:57 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 171924)
cuase he may want to give it to his bot perhaps

Oh, I didn't read the text of the script, I just looked at the syntax.... :\

ChaosSlayerZ 06-11-2009 04:27 PM

Quote:

Originally Posted by Andrew80k (Post 171929)
And what benefits do the bots get from them? Do weapons on bots proc? I know that you can't use the clickies on bot items, so other than maybe special procs, such as the Ranger epic that procs a slow, what is there to gain from giving them the epic? "It looks cool" is an acceptable answer, like I said I'm just curious. Some folks come up with some really cool ideas for customization and I often am curious as to what purpose they want to do this or that. For the most part there are MUCH better weapons than the epics so I never even considered giving my bots epics.

what if his epic customized to proc something VERY nasty ? :cool:

Shendare 06-11-2009 04:37 PM

Yeah, like Illusion: Troll!

*shudder*

- Shendare

Andrew80k 06-11-2009 04:42 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 171933)
what if his epic customized to proc something VERY nasty ? :cool:

Then that would be a customized weapon and maybe an epic defined on his server, but not the same as a traditional, commonly defined epic from live or PEQ. You can call it whatever you wish, which is the great thing about the emu, but again, there are much better weapons out there and, again, I'm just curious. You are speculating as to what he is doing with them, I'd like to hear from him, since he is the one doing it.

Vainglory69 06-11-2009 05:50 PM

Just to have another option, some of the epic 1 procs are nice in the 40's early 50's, yes there are some better things around but again, its an option and I like to have options available which is why I love the Emu so :)

Even if me or another gets bored and wants a epic'd bot army, hey, it's possible :)

Now to work out epic 1.5 and 2.0, I want them to be a bit harder than a hand out but not quite as involved as release...

Thanks again for the help guys.

Vainglory69 06-11-2009 05:51 PM

Quote:

Originally Posted by Shendare (Post 171934)
Yeah, like Illusion: Troll!

*shudder*

- Shendare

LOL, that sounds like a Epic Fail, not a epic weapon :)


All times are GMT -4. The time now is 05:23 PM.

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