Thread: $race related
View Single Post
  #8  
Old 09-21-2004, 07:11 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by Magoth78
Neither, but i've just got it to work. (tried eq as smogo said)

Here's my modified code:

Code:
sub EVENT_SAY
{
if($text=~/hail/i)
  {
  if($race eq Human)
    {
    quest::say("You are a human.");
    }
   else
    {
    quest::say("FOOL! You are a $race not a human!");
    }
  }
}
Now i'm gonna try whit composed name, like Dark Elf, Half Elf etc..
Hm. Fascinating.
__________________
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