CLEO Help Scan chat message for specific keywords?

CLEO related
Status
Not open for further replies.

Zin

Expert
Joined
Aug 1, 2013
Messages
1,734
Solutions
2
Reaction score
117
So I want to make a cleo to send a cmd when a specific keyword is in the chat such as a message from the server saying "You completed this job" but the scan string in cleo has to have the full exact message and I don't want this as I would have to do an if check for like 30 different messages I can get in the chat so it would be better to just check for specific keywords or phrases like "You have completed this job" so is there anyway to do this?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
strstr, search substring in string, basically check if a string contains another string, word etc.
0C29: 2@ = stristr string1 0@ string2 1@
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
[shcode=cpp]
assuming 0@ == chat line

if 0C29: 1@ = search in_string 0@ this_string "hello"
then printf "found hello in chat" 100
end
[/shcode]
 
Status
Not open for further replies.
Top