ホストご自分のボットプラットフォームに ボットのリブレの企業ボット台
Self, AIML, and scripting

Need Help with Scripting and Twitterbot

による okayokay 掲載 Mar 12, 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, 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: 132, today: 0, week: 7, month: 116

by okayokay posted Mar 17, 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: 141, today: 1, week: 5, month: 125

by admin posted Mar 24, 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: 128, today: 1, week: 4, month: 109

Id: 32584251
タグ: twitter, scripting
掲載: Mar 12, 13:44
回答: 3
眺望: 157, 今日の: 1, 週間: 8, 月: 126

フラグとしての攻撃、または違反のサイトのルール