[Macro Plugin]Nickname with variable

All resolved question will be found here. It is recommended that you browse / search through this section first and see if your question has been answered before

Moderators: Moderators, Documentation Writers

agnes94
Noob
Noob
Posts: 1
Joined: 07 Dec 2011, 14:43
Noob?: No

[Macro Plugin]Nickname with variable

#1 Post by agnes94 »

my nickname has a ' so the macro doesn't recognize my character as an existing one what can i do to fix this?
sorry for my bad english
Thanks
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: [help]Nickname with variable

#2 Post by SkylorD »

How the kore recognizes your name ?
Can you give a example ?

How is the macro ?

In this example :
automacro xD {
console /\(From: (.*)\) : Come'on, take your money/i
call {
$player = $.lastMatch1
do pm $player Okay,I'm going.
}
}
In this example,if the nickname of character is almost equal to this name :

Bruno Mars

He doesn't send the PM,because the name contain a 'space'.
To solve this problem,add this name in quote...Note :
automacro xD {
console /\(From: (.*)\) : Come'on, take your money/i
call {
$player = $.lastMatch1
do pm "$player" Okay,I'm going.
}
}
I do not understand your doubt,why don't have much details.
Learn rules
willsnake
Noob
Noob
Posts: 8
Joined: 14 Feb 2012, 07:10
Noob?: Yes

Re: [help]Nickname with variable

#3 Post by willsnake »

hello sir,

my macro can PM players but it can't pm those name that has backslash " \ "... I just cant find the way how... thanks..
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: [help]Nickname with variable

#4 Post by SkylorD »

willsnake wrote:hello sir,

my macro can PM players but it can't pm those name that has backslash " \ "... I just cant find the way how... thanks..
If the name, as example, is : \Batman/

Use this :

console /The player \\Batman\/ is very bad/i

If i use /, i'm finishing my phrase as regular expression.

See :

console //;

Now see:

console /The player \\Batman\/ is very bad/i

I have used \ to retire the powers of /.
Understand me ? rs !
Learn rules