Aggiornamento per il nostro Platinum servizio e cerchiamo di costruire il tuo bot per voi
Self, AIML, and scripting

Need Help with Scripting and Twitterbot

da okayokay postato 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:

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

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2131, today: 0, week: 0, month: 58

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:

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

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

Id: 32584251
Tag: twitter, scripting
Postato: Mar 12 2020, 13:44
Risposte: 3
Vista: 2232, oggi: 1, settimana: 1, mese: 57
0 0 0.0/5