CLEO Help Cleo help

CLEO related
Status
Not open for further replies.

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
Hi guys, i want to make AutoAnswer cleo and random answer in it, but i dont know how
Example: Player asks "How do you feel"
and cleo answers
Good
or
Bad
or
Normal
So the point of this message is: how to make random answer 
biggrin.png


@springfield
@monday
 

_C1ph3r_

Active member
Joined
Feb 5, 2017
Messages
91
Reaction score
3
Code:
Code:
    alloc 11@ 64
                        0209: 10@ = random_int_in_ranges 0 2
                        if
                            10@ == 0
                        then       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourFirstAnswer"
                        end
                        if
                            10@ == 1
                        then       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourSecondAnswer"
                        end
                        if
                            10@ == 2
                        then                       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourThirdAnswer"
                        end
                        say "%s" 11@
                        free 11@
                        10@ == 0
                        wait 3000
                    end

You can use more option by changing Opcode 0209.
The .ini should:
- Named: C1ph3r.ini ( or something, you can change in the code )
- Including:
Code:
[AutoAnswer]
YourFirstAnswer=Good
YourSecondAnswer=Bad
YourThirdAnswer=abc
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
_C1ph3r_ said:
Code:
Code:
    alloc 11@ 64
                        0209: 10@ = random_int_in_ranges 0 2
                        if
                            10@ == 0
                        then       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourFirstAnswer"
                        end
                        if
                            10@ == 1
                        then       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourSecondAnswer"
                        end
                        if
                            10@ == 2
                        then                       
                            0AF4: 11@ = read_string_from_ini_file "CLEO\C1ph3r.ini" section "AutoAnswer" key "YourThirdAnswer"
                        end
                        say "%s" 11@
                        free 11@
                        10@ == 0
                        wait 3000
                    end

You can use more option by changing Opcode 0209.
The .ini should:
- Named: C1ph3r.ini ( or something, you can change in the code )
- Including:
Code:
[AutoAnswer]
YourFirstAnswer=Good
YourSecondAnswer=Bad
YourThirdAnswer=abc

Thanks, also how to make it that it would scan in chat some sort of word
Example: Player asks "How do you feel"
And if cleo detects word "you" it answers
I already made smth like that, i formated one word "how" and if player writes "how" cleo answers but if player writes smth more like"how are you" then it doesnt answer,doesnt detect this word in chat
 
Status
Not open for further replies.
Top