View Single Post
  #1  
Old 01-09-2010, 05:01 AM
bthomsen0312
Fire Beetle
 
Join Date: Nov 2009
Posts: 21
Default Race dependant teleport

So what I am trying to do is create a teleporter that will teleport people to their starting cities according to race. So far it appears as though the command i need is "if($race eq 'Dark Elf')" so I'm assuming the code should look as follows:

Code:
sub EVENT_SAY 
{
if ($text =~/Hail/i)
 {
quest::say ("Good day to you, $name. Do you want to [go] home?");
 }
if ($text =~/go/i)
if ($race eq 'Dark Elf') 
{
quest::MovePC(202, -118,-193,-156)
}
}
now im assuming this would work for a single race, however how would i set it up where it does a race check, determines race, and sets it to quest::movepc(zoneid, X, Y, Z) i feel like there should be someway to declare a THEN statement but im not sure how in perl. The reason i want this is i am using a central hub where people can get spells/train/epic quests/armor quests/ (think EZ server) while still requiring people to play through the original game.

P.S. sorry if i offended the gods with my ugly perl format, ideas and criticism encouraged!
Reply With Quote