Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-25-2013, 06:23 AM
boo2
Fire Beetle
 
Join Date: May 2008
Location: Bahamas
Posts: 10
Default GetRace issue

Basically, I have some guards I'm messing with.

When they spawn I have them randomly set to choose between different textures (different guards from different zones.. Qeynos, Freeport, Kelethin, etc..)

The issue I'm having right now is that Qeynos guards are race 71, but texture 1.. so I'm trying to make it so that when they spawn my script checks to see if it is race 71, and if it is race 71 it will change the texture to 1.

What I have right now isn't working, and when I added a say event to see what the race was returning as I get nothing, can someone please tell me what I'm doing wrong?

Code:
sub EVENT_SPAWN {
	my $random_race = quest::ChooseRandom(71,44);
	my $random_weapon = quest::ChooseRandom(1,2,3,7,8,14);
	
    quest::npcrace($random_race);
    quest::wearchange(7, $random_weapon);		
    quest::wearchange(2, 1);
    quest::settimer("qeynosguardchange", 1);		
	
}


sub EVENT_TIMER {

    my $race = $mob->GetRace();
	
	if($timer eq "qeynosguardchange" && $race == 71) {
    quest::shout2("qeynos change yo");
    quest::npctexture(1);	
    quest::stoptimer("qeynosguardchange");	
	}
}

sub EVENT_SAY {

    if ($text =~/hail/i) 
   {
     my $race = $mob->GetRace();
     quest::say("$race");
   }
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:03 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3