Saviez-vous Bot Libre fournit également des avatars en 3D et gratuit web speech API?
Self, AIML, and scripting

Need Help with Scripting and Twitterbot

par okayokay posté 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:

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

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 913, today: 1, week: 1, month: 1

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:

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: 928, today: 0, week: 0, month: 0

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: 952, today: 0, week: 1, month: 0

Id: 32584251
Tags: twitter, scripting
Posté: Mar 12, 13:44
Réponses: 3
Vues: 939, aujourd'hui: 1, semaine: 2, mois: 1
Je suis sûr que
Drapeau post comme offensant, ou en violation des règles du site