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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2014, 12:51 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

MQ2's function just excludes a bunch of spawn types then excludes ones that start with A or An, then excludes a bunch of other stuff, then checks if the first character is an upper case letter or #.
Reply With Quote
  #2  
Old 08-31-2014, 07:31 AM
bloatedseachicken
Fire Beetle
 
Join Date: Aug 2014
Posts: 6
Default

ok, so this works as long as the mob has # in the name

sub EVENT_SPAWN {
if (substr($npc->GetName(), 0, 1) eq "#") {
blah;
}
}

but...how can I make it pick out mobs with an upper case letter at the beginning of the name? I saw demonstar use this ^, is that the function needed? how to apply to the above if statement?

thanks so much guys!
Reply With Quote
  #3  
Old 08-31-2014, 11:48 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

The '^' means front of the line
Reply With Quote
  #4  
Old 08-31-2014, 12:42 PM
bloatedseachicken
Fire Beetle
 
Join Date: Aug 2014
Posts: 6
Default

is there some way to use =~ /([A-Z])/ in there to select only Uppercase mobs?

im at a loss lol
Reply With Quote
  #5  
Old 08-31-2014, 12:59 PM
bloatedseachicken
Fire Beetle
 
Join Date: Aug 2014
Posts: 6
Default

woot this worked

if($mname =~ /([A-Z])/)

:P
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:25 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