View Single Post
  #11  
Old 10-25-2004, 10:12 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Also, to call it, use something like this:
Code:
#quest::scorpse demonstration
#perlQuest by Cisyouc
sub EVENT_SAY
{
  if($text=~/hail/i)
  {
  quest::say("Greetings, $name. Have you recently been [slain] and separated from your corpse?");
  }
  if($text=~/slain/i)
  {
  quest::say("How unfortunate. My studies in Paineel have taught me how to summon nearby corpses, and I would be happy to [summon] yours, if you would like.");
  }
  if($text=~/summon/i)
  {
  quest::scorpse();
  }
}
..or of course, move it to sub EVENT_ITEM to charge money =D
__________________
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