Can I trace false warper's name?

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Uzah
Human
Human
Posts: 25
Joined: 04 Jun 2011, 18:29
Noob?: Yes
Location: pRO Payon

Can I trace false warper's name?

#1 Post by Uzah »

Hi.. I'm just new to macro. I created an anti-warp macro against false warpers whenever I'm not around;and, I would just like to know if it is possible to get their names and write it into my pub so as to enhance it. Thanks ^^


Code: Select all

automacro antiwarp {
console /is casting (Warp Portal|Manhole) on/i
exclusive 1
delay 2
call {
$chatroomname = stop it pls
do chat create "$chatroomname" 2 0 siyete
pause 10
do bangbang
do chat leave
}
}
:end
}
}

return 0
}
What have you done so far?
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Can I trace false warper's name?

#2 Post by Mushroom »

You can extend the regex and gathers player's name with ()

Code: Select all

automacro antiwarp {
console /Player (.*) \(\d+\) is casting (Warp Portal|Manhole) on/i
exclusive 1
delay 2
call {
$chatroomname = $.lastMatch1 stop it pls
do chat create "$chatroomname" 2 0 siyete
pause 10
do bangbang
do chat leave
}
}
Quit.
Uzah
Human
Human
Posts: 25
Joined: 04 Jun 2011, 18:29
Noob?: Yes
Location: pRO Payon

Re: Can I trace false warper's name?

#3 Post by Uzah »

Mushroom wrote:You can extend the regex and gathers player's name with ()

Code: Select all

automacro antiwarp {
console /Player (.*) \(\d+\) is casting (Warp Portal|Manhole) on/i
exclusive 1
delay 2
call {
$chatroomname=%24%26%2346%3BlastMatch1 stop it pls
do chat create "$chatroomname" 2 0 siyete
pause 10
do bangbang
do chat leave
}
}
Yes this one works. This is what I really need. Thanks a lot for the very abrupt response.
And sorry it took me a long time to reply due to this error every time I visit Openkore site:

"Network Error (tcp_error)
A communication error occurred: "Operation timed out"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team."

BTW thanks again I learned a lot as regards reg expressions. ^_^
What have you done so far?