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 06-13-2007, 03:39 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default ChooseRandom issue:

I'm having problems getting this to work properly, and was hoping to catch a pointer from someone who would know. My intention is to create an aggro message chosen randomly from a list. I wanted to use the ChooseRandom feature and store all the possible phrases in variables, but I don't believe that you can store anything in a variable that isn't from the specific list found here.

The reason for all of this is to get the NPCs of the world saying the things they used to as you would aggro them. For example, each time a Guk froglok is aggro'd, he'll say 'Frrroooaaakkk!' along with another random phrase. ('I shall rid the land of another infamous villain.', 'Your foul deeds have earned my contempt.', etc.)

I know that this code is wrong, but it's the best that I could think of trying. Like I said, I believe that the problem is that those variables aren't in the list of defined ones, so I can't use them. Is there another way to go about this? I'm kind of embarrassed to show my crappy attempt at this, but I want to at least show that I've tried banging my head against the wall for awhile on it :(

Code:
sub EVENT_AGGRO {
  my $Phrase = quest::ChooseRandom($Phrase1,$Phrase2,$Phrase3,$Phrase4,$Phrase5,$Phrase6);
  $Phrase1 = 'Your faithless devotion to a false god leaves me no choice.'
  $Phrase2 = 'I shall rid the land of another infamous villain.'
  $Phrase3 = 'Your foul deeds have earned my contempt.'
  $Phrase4 = '${race}s like you are better left dead than alive.'
  $Phrase5 = 'It's ${class}s like you who have ruined your own lands, You'll not ruin mine!'
  $Phrase6 = 'Heathen! Unbeliever! Norrath must be cleansed!'
 quest::say('Frrroooaaakkk!');
 quest::say($Phrase);
}
Thanks for any help on this, guys. Once this is working, I can start knocking out a lot of the phrases I've pulled from this massive log file. Get ready to see a lot of your favorites back and working. ("an orc warrior says 'Orc stomp, Orc kill - Orc weapons your blood will spill.'" )

(Note: I know that in the code block above there's an inexplicable space in the middle of $Phrase4 on line 2, but it's correct when I type the post and I can't get rid of it for some reason. It's correct in my code as well, some odd sort of display error on the boards here.)
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 09:48 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3