| 
 affect only named mobs? hi,  i need help with an if statement that will only select name mobs. For example, i tried this, but it's not working if ($mname =~ #) then blah blah. What is the correct way? Also tried this. If ($mname->GetCleanName() =~/#/i) then blah blah. Thanks | 
| 
 You can do $mname =~ /^#/ I think? Might also help explain what your trying to accomplish. I assume you just want to do something with all named mobs in the global file? | 
| 
 Try this:  Code: sub EVENT_SPAWN { | 
| 
 Yes,  global file... thanks guys!  Will try those out | 
| 
 hmm cant get either of those to work either :(  is there a way to recognize only named in a script? like how does named get singled out? they don't all have # in front right? I know with MQ2, you can /target named and it will locate and target the named mobs in zone...that may have nothing to do with this, but just made me think there may be a way to do it in perl? thanks either way | 
| 
 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 #. | 
| 
 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! | 
| 
 The '^' means front of the line | 
| 
 is there some way to use =~ /([A-Z])/ in there to select only Uppercase mobs? im at a loss lol | 
| 
 woot this worked  if($mname =~ /([A-Z])/) :P | 
| All times are GMT -4. The time now is 07:24 AM. | 
	Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.