Thread: Quest Problem
View Single Post
  #2  
Old 10-25-2004, 07:09 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Ugh!! Suggestion, space out your code its alot easier to read and debug!!

Code:
sub EVENT_SAY 
{ 
  if($text=~/Hail/i)
  {
  quest::say("Hail! You are brave coming out onto this island. Is there something I can [help with]?");
  } 

  if($text=~/help with/i)
  { 
  quest::me("The guard nearby reaches for his sword, ready to kill you should you try for the Oracle Robe."); 
  quest::say("Who sent you, $name?");
  } 

  if($text=~/Hasten Bootstrutter/i)
  {
  quest::say("Oh, well that is a different story, then. You must be here about the [Fabled Ring]. I saw it in my vision.");
  } 

  if($text=~/Fabled Ring/i)
  {
  quest::say("You are here for the Fabled Ring of the Ancients... hmm... I'm going to need a [Ring of the Ancients] and 200 Platinum.");
  } 

  if($text=~/Ring of the Ancients/i)
  {
  quest::say("There is one that walks the sands that carries this band on his hands. You should know where to find him by now.");
  } 

} 
sub EVENT_ITEM 
{ 
  if($itemcount{12268} == 1 && $platinum == 200) 
  { 
  quest::spawn(121094,0,0,1431,-7904,152); 
  quest::say("I have called to another plane and the creature you seek is just across the ocean."); 
  quest::exp(100); 
  quest::summonitem(12268); 
  } 
}
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote