Making use of eval() in macro

Moderator: Moderators

Message
Author
ever_boy_
Developers
Developers
Posts: 309
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: Making use of eval() in macro

#11 Post by ever_boy_ »

I figured it out when I saw this:
console /Lista da Sala de Chat/
I meant which server: thor, odin, asgard

TormenT
Human
Human
Posts: 33
Joined: 13 Nov 2012, 07:57
Noob?: No

Re: Making use of eval() in macro

#12 Post by TormenT »

Thor

TormenT
Human
Human
Posts: 33
Joined: 13 Nov 2012, 07:57
Noob?: No

Re: Making use of eval() in macro

#13 Post by TormenT »

i solved with help of ever_boy, i use while ($.map != xxx) do chat join $i for enter in chat room, now i want how stop while when enter in chat room, i tested with

Code: Select all

eval (($::chatRooms{$::currentChatRoom}->{title}) ne 'Chat Room Titles')
but it give me syntax error if iam out chatroom, only work if i joined in chat....

why this?

thanks

ronron14
Noob
Noob
Posts: 4
Joined: 04 Jul 2011, 02:45
Noob?: No

Re: Making use of eval() in macro

#14 Post by ronron14 »

could someone help me for an eval() for choosing a response for "talk resp #"

example I want to choose wtf

Code: Select all

----------Responses-----------
0  wtf
1  ftw
2  wtf
3  cancel
-------------------------------
i've tried
console /0 wtf/, console /(\d+) wtf/
actually none of the console condition isn't working.. help me please :)

ever_boy_
Developers
Developers
Posts: 309
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: Making use of eval() in macro

#15 Post by ever_boy_ »

you don't need an eval for that. use the 'talk' command.

ronron14
Noob
Noob
Posts: 4
Joined: 04 Jul 2011, 02:45
Noob?: No

Re: Making use of eval() in macro

#16 Post by ronron14 »

Code: Select all

----------Responses-----------
0  wtf
1  ftw
2  wtf
3  cancel
-------------------------------
there's no argument that I should use the talk command, the thing is I want to know how to trigger the kore to do a talk response whenever it sees "0 wtf" because I'll be dealing with changing talk response numbers so the talknpc fixed sequence won't do the job I wanted to do..

Cloudthers
Noob
Noob
Posts: 14
Joined: 20 Nov 2009, 06:47
Noob?: No

Re: Making use of eval() in macro

#17 Post by Cloudthers »

ronron14 wrote:

Code: Select all

----------Responses-----------
0  wtf
1  ftw
2  wtf
3  cancel
-------------------------------
there's no argument that I should use the talk command, the thing is I want to know how to trigger the kore to do a talk response whenever it sees "0 wtf" because I'll be dealing with changing talk response numbers so the talknpc fixed sequence won't do the job I wanted to do..
how about using "console", you can make it like this

console /^\d+ wtf/

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Making use of eval() in macro

#18 Post by EternalHarvest »

Can't be done securely with current macro plugin so there would be no example, but works for me with "\s". The better approach would be to improve talk commands to accept response text as an alternative to response number.

ever_boy_
Developers
Developers
Posts: 309
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: Making use of eval() in macro

#19 Post by ever_boy_ »

ronron14 wrote:

Code: Select all

----------Responses-----------
0  wtf
1  ftw
2  wtf
3  cancel
-------------------------------
there's no argument that I should use the talk command, the thing is I want to know how to trigger the kore to do a talk response whenever it sees "0 wtf" because I'll be dealing with changing talk response numbers so the talknpc fixed sequence won't do the job I wanted to do..
Oh, now I get it. Maybe you could do this:
automacro choseWTF {
console /^(\d) wtf/
delay 3
call {
do talk resp $.lastMatch1
}
}

enricoluigi
Noob
Noob
Posts: 2
Joined: 24 Jul 2017, 22:09
Noob?: No

Re: Making use of eval() in macro

#20 Post by enricoluigi »

How can i get a list of monsters on the screen and their position?

I need to check the position of them all to use skill on the max number of monsters possible.

Post Reply