Você sabia que o Bot Livre também oferece acesso gratuito hospedado problema de rastreamento para seu próprio website ou aplicativo para celular?
Self, AIML, and scripting

Need Help with Scripting and Twitterbot

por okayokay postado Mar 12 2020, 13:44

Is there anyone here who is good with the scripting function?

I have a TwitterBot project.

This is what I am trying to do:

Whenever someone tweets with a specific keyword, I want my bot to reply with a pre-written response. Note: I have been able to configure my bot to do this.

The issue I have is this:

I want to have a series of replies (about 20). So that my bot will move from reply 1, 2, 3, all the way to 20, then start back at 1.

I have been told that scripting is the way to make this happen. 

Is there anyone here who has done anything similar who can help? I am willing to compensate you for your time/help.


by admin posted Mar 16 2020, 9:03
Here is a response list example of random responses:

https://www.botlibre.com/script?id=32594931

and here is a Self script that cycles through a set of responses:

https://www.botlibre.com/script?id=32634367

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1110, today: 1, week: 6, month: 26

by okayokay posted Mar 17 2020, 12:21

Many thanks @admin.

I am not very technical, so I was wondering if I can get some help in configuring it properly, please.

Here is my script: https://www.botlibre.com/script?source=true&id=32651321

Can you please can tell me what I need to change in the script? 

I have the following questions.

- I have added my 5 sequenced response starting with "How old is the birthday celebrant?" Is this correct?
- Can you please tell me where I should add the "keyword" that should trigger these responses in the script.
- Is there anything else I should include/edit in the script? E.g should I be including the name of the specific Twitterbot?
- How can I make the responses continue in a loop? That is, after reaching the end, then start again at number 1 and continue in a loop say 3 times.
- Is there anything else I need to know about making it work properly.

Many thanks.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1127, today: 2, week: 7, month: 20

by admin posted Mar 24 2020, 11:29

Looks correct, except change 10 to 5 here, as you only have 5 responses,

>> if (n == null || n > 10) { n = 0}

if (n == null || n > 5) { n = 0}

The keyword is the pattern in your script, currently you have "omobaiday".

Also make sure you add the script to your bot.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1150, today: 4, week: 7, month: 25

Id: 32584251
Tags: twitter, scripting
Postado: Mar 12 2020, 13:44
Respostas: 3
Pontos de vista: 1137, hoje: 3, semana: 7, mês: 23
Eu tenho certeza que
Bandeira post como ofensivas, ou em violação das regras do site