EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   A perl problem.. need a little guidance :) (https://www.eqemulator.org/forums/showthread.php?t=18565)

steelrat 05-15-2005 01:29 PM

A perl problem.. need a little guidance :)
 
1 Attachment(s)
My quest simply refuses to run..and I can't for the life of me figure out why, I have searched..but to no avail..any help would be appreciated..
the code is in the text file..

Thanks in advance

SR

mwmdragon 05-15-2005 04:46 PM

Here you go, fixed and compiling.
 
ignore this, i'm not sure how to delete it :(

mwmdragon 05-15-2005 04:46 PM

Here you go, fixed and compiling.
 
Code:


sub EVENT_SAY 

  if ($text=~ /Hail/i)
  {
  quest::text ("Hail $name, of the $race race, you come to me because you have lost your soul.. "); 
  if($ulevel <= 15 )
              {
                quest::text ("you are but a novice, $name, I shall not charge you for this");
                quest::summonitem ( 17355);
              quest::text ( "place this into your inventory.. tell me yes when you have done");
              }
  }
  elsif($ulevel >= 16)
  {
                  quest::text ( "you are a seasoned adventurer, $name, 200pp shall be my price");
                  quest::summonitem(17355);
                  quest::text ("place this into your inventory.. say yes when ready");
  }

  if ($text=~ /yes/i && $ulevel <= 15)
  {
  quest::selfcast (3);
  }

  if ($text=~ /yes/i && $ulevel >= 16)
      {
      quest::text ( "and the little matter of 200pp, if you please");
      if($platinum eq 200 )
                        {
                      quest::selfcast (3);
                      }
      }
}
# end of file


steelrat 05-16-2005 04:21 AM

Thanks a huge bunch!!!
 
Thats a wonderful fix, thanks for your help.. you've really done me a good turn.!!!

SR

steelrat 05-16-2005 11:39 AM

MWMDragon.. Help again!!! please!
 
Quote:

Originally Posted by mwmdragon
Code:


sub EVENT_SAY 

  if ($text=~ /Hail/i)
  {
  quest::text ("Hail $name, of the $race race, you come to me because you have lost your soul.. "); 
  if($ulevel <= 15 )
              {
                quest::text ("you are but a novice, $name, I shall not charge you for this");
                quest::summonitem ( 17355);
              quest::text ( "place this into your inventory.. tell me yes when you have done");
              }
  }
  elsif($ulevel >= 16)
  {
                  quest::text ( "you are a seasoned adventurer, $name, 200pp shall be my price");
                  quest::summonitem(17355);
                  quest::text ("place this into your inventory.. say yes when ready");
  }

  if ($text=~ /yes/i && $ulevel <= 15)
  {
  quest::selfcast (3);
  }

  if ($text=~ /yes/i && $ulevel >= 16)
      {
      quest::text ( "and the little matter of 200pp, if you please");
      if($platinum eq 200 )
                        {
                      quest::selfcast (3);
                      }
      }
}
# end of file


This script works FINE up until the line if($platinum eq 200 ) it doesn't get past this line, it's like the npc doesn't know the plat is given???
any ideas?

Sarepean 05-16-2005 01:45 PM

I believe that line should be under the sub EVENT_ITEM{} rather than EVENT_SAY{}.

Try this:


sub EVENT_SAY
{
if ($text=~ /Hail/i)
{
quest::text ("Hail $name, of the $race race, you come to me because you have lost your soul.. ");
if($ulevel <= 15 )
{
quest::text ("you are but a novice, $name, I shall not charge you for this");
quest::summonitem ( 17355);
quest::text ( "place this into your inventory.. tell me yes when you have done");
}
}
elsif($ulevel >= 16)
{
quest::text ( "you are a seasoned adventurer, $name, 200pp shall be my price");
quest::summonitem(17355);
quest::text ("place this into your inventory.. say yes when ready");
}

if ($text=~ /yes/i && $ulevel <= 15)
{
quest::selfcast (3);
}

if ($text=~ /yes/i && $ulevel >= 16)
{
quest::text ( "and the little matter of 200pp, if you please");
}
}

sub EVENT_ITEM{
if($platinum eq 200 )
{
quest::selfcast (3);
}
}
# end of file


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

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