Remove '#' from named mob name

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot.

Moderator: MacroQuest Developers

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Remove '#' from named mob name

Post by Bad Karma » Mon Feb 09, 2004 1:49 am

Gumby wrote:

Code: Select all

   /if $left(1,"$target(name,clean)")=="#" {
      /echo $right($calc($strlen("$target(name,clean)")-1),"$target(name,clean)") is at $target(hp,pct) Health
   }
Just thought this might come in useful in the future. Posted here for reference.
Last edited by Bad Karma on Tue Feb 10, 2004 1:19 am, edited 3 times in total.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Re: Remove '#' from named mob name

Post by Gumby » Mon Feb 09, 2004 10:06 pm

Heh, made a mistake in the posting on the help forum... updated code:

Code: Select all

/if "$left(1,"$target(name,clean)")"=="#" {
   /g $right($calc($strlen("$target(name,clean)")-1),"$target(name,clean)") is at $target(hp,pct) Health
} else {
   /g $target(name,clean) is at $target(hp,pct) Health
}
G

mekaniak
a hill giant
a hill giant
Posts: 290
Joined: Thu Sep 18, 2003 3:21 pm

Post by mekaniak » Wed Feb 18, 2004 1:53 pm

Are you referring to the # in front of a name on a /who npc??? No offense but why. I like being able to go into an ldon or any zone for that matter and just be able to do a quick /who npc and just glance at the list to see the # and know that a named is up. Oh well, people have their reasons.
I love the Power Glove, it's so bad

Say hello to M.C. Smurf!

[quote]<mekaniak> adios guys.
<dont_know_at_all> idiot
* mekaniak is now known as mekaniak_dinner
<Jacensolo> me?
<dont_know_at_all> not this time
[/quote]

[quote]
<dont_know_at_all> A_Enchanter_00, how the fuck should i know? it's your code[/quote]

I love quoting IRC chat.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Feb 18, 2004 6:23 pm

This is just simply to strip # off the name before sending it to someone via tell/groupchat/guildchat etc..

mekaniak
a hill giant
a hill giant
Posts: 290
Joined: Thu Sep 18, 2003 3:21 pm

Post by mekaniak » Thu Feb 19, 2004 12:03 pm

ah ok, i see now. Mucho thanks ml
I love the Power Glove, it's so bad

Say hello to M.C. Smurf!

[quote]<mekaniak> adios guys.
<dont_know_at_all> idiot
* mekaniak is now known as mekaniak_dinner
<Jacensolo> me?
<dont_know_at_all> not this time
[/quote]

[quote]
<dont_know_at_all> A_Enchanter_00, how the fuck should i know? it's your code[/quote]

I love quoting IRC chat.