I'm happy I've been already able to help you.
Tease Ai scripting: The HELP CORNER
Moderator: 1885
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
Could be something like this:
custom/start.txt
Code: Select all
hi lets start @CheckFlag(taskA_interrupted, Resume_taskA) @CheckFlag(taskB_interrupted, Resume_taskB)
@Flag(flag_taskA, flag_taskB) @NullResponse @DeleteFlag(flag_taskA, flag_taskB)
heres a task
@NullResponse @RapidCodeOn
(Choose_task)
@NullResponse @Goto(taskA, taskB)
(taskA)
@NullResponse @CheckFlag(flag_taskA, Choose_task)
@NullResponse @SetFlag(flag_taskA) @CallReturn(path_of_the_file/taskA.txt)
@NullResponse @Goto(End)
(taskB)
@NullResponse @CheckFlag(flag_taskB, Choose_task)
@NullResponse @SetFlag(flag_taskB) @CallReturn(path_of_the_file/taskB.txt)
@NullResponse @Goto(End)
(End)
ok lets end
@EndScript
@End
(Resume_taskA)
@NullResponse @CallReturn([i]path_of_the_file[/i]/taskA.txt, resume_task)
@NullResponse @Goto(End)
(Resume_taskB)
@NullResponse @CallReturn([i]path_of_the_file[/i]/taskB.txt, resume_task)
@NullResponse @Goto(End)
Code: Select all
set up task A
ok you can go now, turn off teaseAi and come back later @SetFlag(taskA_interrupted)
@End
(resume_task)
@NullResponse @DeleteFlag(taskA_interrupted)
hi welcome back, lets see how task A went
@End
Code: Select all
set up task B
ok you can go now, turn off teaseAi and come back later @SetFlag(taskB_interrupted)
@End
(resume_task)
@NullResponse @DeleteFlag(taskB_interrupted)
hi welcome back, lets see how task B went
@End
The first time, since none of the flags still exist the script will output "here's a task" and go to line (Choose_task) and it will randomly choose a task. Let's say it chooses taskA.
A flag indicating that taskA has been chosen will be created, this way the script will not select it the next day,
It will run the script taskA.txt and stop at the point you want it to stop, creating a flag to indicate that it has to resume taskA, it will go back to custom/start.txt and output line "ok lets end" and close TAI (the @EndScript command).
When you run TAI again the script will check if any of the flags that indicate that a task is in progress has been created.
Flag "taskA_interrupted" exists so it will move to line "(Resume_taskA)" and resume the script taskA.txt from where you want it to resume (the ", resume_task" in the @CallReturn command will call the script taskA.txt from line "resume_task").
It will delete flag "taskA_interrupted" and check how you completed taskA then it will go back to custom/start.txt and output line "ok lets end" and close TAI.
The next day the script will choose another task and will repeat the same process. Since taskA has already been choosen the day before, if the @Goto command chooses again taskA the @CheckFlag command will take you back to line "(Choose_task)" and it will repeat the process.
If you have just 2-3 tasks I would remove the
Code: Select all
@NullResponse @CheckFlag(flag_taskA, Choose_task)
Code: Select all
@NullResponse @Goto(taskB)
Code: Select all
@NullResponse @Goto(taskB,taskC)
When all tasks have been executed the script will read line "@Flag(flag_taskA, flag_taskB) @NullResponse @DeleteFlag(flag_taskA, flag_taskB)": it gets executed once all the flags indicated in the @Flag() command exist and delete all the variables that indicate which task have been chosen and restart from scratch.
The script is modular so you can add all the tasks you want.
That's all. I hope the explanation is clear enough; it's quite late and I'm a bit tired...
If this is not how you wanted the script to work or need more help let me know.
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
You're welcome!
- avatarbr
- Experimentor
- Posts: 1187
- Joined: Fri Aug 18, 2006 3:33 am
- Gender: Male
- Sexual Orientation: Straight
Re: Tease Ai scripting: The HELP CORNER
Did you tried without the @RapidCodeOn to see if you still get the inconsistent behaviour?Xero wrote: ↑Thu Jul 25, 2019 10:03 pm hi
Im writing a script using teaseAI sweet patch version. I'm getting some seemingly inconsistent behaviour, where a piece of code will work many times in a row and then malfunction (as if it skipped setting a variable or reading a variable). The piece of code in question uses @RapidCodeOn and several @NullReponse lines with various operations (gotos, checking/setting/deleting flags)
is it possible that teaseAI can get a bit out of sync and execute lines in the wrong order? Or any other known issues where teaseAI behaves inconsistently?
thanks
Xero
I have a lot of code behind @RapidCodeOn without problems, but sometimes I think something goes wrong (it's hard to detect)
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
If you post the script (if you want) maybe we could help you checking if there's an error in the script or if it's a bug in the patch.
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
I just gave a quick read to your post, but I remember working on something like this for you in the past: viewtopic.php?f=26&t=16051&p=262205#p262205Xero wrote: ↑Fri Jul 26, 2019 9:18 am thanks for the help, I've attached a file which is a simplified complete personality, the 5 files involved in the issue are a start script, and 4 files in custom/day_task folder, nothing else is used. unfortunatly i couldnt make the example any smaller as i dont know where the bug is
Is this a new version of that script? Did the script I created work? If it's a newer version of the script I worked on I think you can adapt that to the new iteration.
I'll check your script now.
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
I checked your script and it looks correct. So assuming it was a bug in the patch I tested it with the latest patch 55, but still the error happened.Xero wrote: ↑Sat Jul 27, 2019 2:20 pm
yes its a more complicated version of what i asked about before. The script you gave me then was great and thanks again for it. This one is based of the concepts in your original one but i ended up changing it a fair bit as it became more complicated. Maybe I should have stuck closer to what you did or not complicated it so much
But not when I removed all those @CallReturn command in the start script and left only one and TAI turned off after every cycle. I tried it multiple times and it always worked (but maybe I've just been lucky, who knows?).
In the end...
- Spoiler: show
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
I'll try to check it tomorrow too. Maybe after a good night's sleep I'll notice something I didn't today.Xero wrote: ↑Sat Jul 27, 2019 3:30 pm thanks for trying! its a difficult one because its intermittent. It's useful to know you can also produce the bug though and its not jsut me, and also good to know the logic looks correct.
in practise the program would be turned off after every call, so if there is an issue with multiple callreturns then it will be ok
-
- Explorer
- Posts: 31
- Joined: Thu Mar 03, 2016 4:07 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: Tease Ai scripting: The HELP CORNER
hi Xero,Xero wrote: ↑Fri Jul 26, 2019 9:18 am the idea is that the task selector should be called twice per day, once in morning, once in evening. the evening call should refer to the same task as the morning so for example
task 3
task 3 followup2
would be a correct output from two calls, but sometimes i get
task 3
task 1
or other weird behaviour (but only after several correct outputs)
to complicate things further:
-there is code to stop the same task being called two days in a row
-module 1 and 2 have introductory sections that should be ran only the first time its called
-module 2 should never repeat and is marked as complete when finished (task 1 and 3 can repeat)
this all seems to mostly work, but occasionally goes wrong!
any help or even jsut knowing if you see a bug too would be great (it only appears after a while)
thanks
Xero
I just had a look at the scripts and while I currently can't test it myself, I think it is likely that the checks for "xero_task_*_complete" could be the culprit here.
In the first run, lets say you choose task 1, so you are redirected to 1. you check if the task has already been completed and if it was called yesterday. If not, you call it and set the progressing tag.
Next run, you check for this tag an go to (1p), clear the progressing flag and are then send to (1b). But here you only enter the task module, if it hasn't been completed yet. This check is unnecessary I think. Maybe it is causing you the issues?
(The flag is not set in the example, so I'm not quite sure)
malaru
-
- Explorer At Heart
- Posts: 202
- Joined: Sat May 30, 2015 10:18 am
- Gender: Male
- Sexual Orientation: Straight
Re: Tease Ai scripting: The HELP CORNER
The script looks correct to me. My guess is that Tease AI doesn't like going back to (select) at the top of task_select.txt so much, but I'm not sure. Here's how I would do this script:Xero wrote: ↑Fri Jul 26, 2019 9:18 am
thanks for the help, I've attached a file which is a simplified complete personality, the 5 files involved in the issue are a start script, and 4 files in custom/day_task folder, nothing else is used. unfortunatly i couldnt make the example any smaller as i dont know where the bug is
the idea is that the task selector should be called twice per day, once in morning, once in evening. the evening call should refer to the same task as the morning so for example
task 3
task 3 followup
would be a correct output from two calls, but sometimes i get
task 3
task 1
or other weird behaviour (but only after several correct outputs)
to complicate things further:
-there is code to stop the same task being called two days in a row
-module 1 and 2 have introductory sections that should be ran only the first time its called
-module 2 should never repeat and is marked as complete when finished (task 1 and 3 can repeat)
this all seems to mostly work, but occasionally goes wrong!
any help or even jsut knowing if you see a bug too would be great (it only appears after a while)
thanks
Xero
- Spoiler: show
pv
- avatarbr
- Experimentor
- Posts: 1187
- Joined: Fri Aug 18, 2006 3:33 am
- Gender: Male
- Sexual Orientation: Straight
Re: Tease Ai scripting: The HELP CORNER
Make sure to delete all the flags when starting a new test.Xero wrote: ↑Thu Aug 01, 2019 7:26 pm thank you all for the help, ive read all your responses carefully.
@pv my apologies for not mentioning this before but in the final version there will probably be more modules and more than one may be unrepeatable. Your example handles the test case really well and simplifies the logic well, unfortunately i think it would be more difficult to extend
Ive been testing my version with resets of teaseAI inbetween and so far it seems ok (instead of calling it many times in one session). My best guess is either:
1) theres a subtle bug none of us can see
2) the call return function overflows or doesnt reset correctly on many subsequent calls (since this would be a difficult function to write i suspect there may be a bug in the patch here)
One thing I remember having problems is something like (xero_task1_complete,select) sometimes don't work, but if you put a space after the "," works (xero_task1_complete, select) .
PS: After so many scripts, I didn't know you could use @CheckFlag to go to a specific line I just use @Flag(something) @Goto(Line)
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
You'll find it here.
@Flag() executes the line only the the flag you put inside the command exist(you can use multiple flags too. In this case the line will be executed only if all flags exist. Same for @NotFlag() but it works the opposite of @Flag())
I don't know, I haven't tried using @SetVar[] with text. Remember to use the square brackets after @SetVar[] though:
@SetVar[last_session]=[tease and denial]
Re: Tease Ai scripting: The HELP CORNER
Quick question!
I've used someone else's idea to add, effectively, two more Glitter contacts by 'faking' their entry and exit, and forcing images to show, and it works pretty well, though one glaring issue is that I have to use @SystemMessage to display their text (since anything else marks it as me) and with some font tags (added through a vocab file) I can get their name colored just like everyone else's, however, the time stamp at the beginning of the line is missing.
I assume this is because it's being rendered through @SystemMessage, however, is there possibly a command or var that can be used to fake the time stamp to further complete the illusion of the 4th and 5th Glitter contacts being added to the chat room (since they are not being added with @ContactX like the other three)?
Hopefully that made sense....
I've used someone else's idea to add, effectively, two more Glitter contacts by 'faking' their entry and exit, and forcing images to show, and it works pretty well, though one glaring issue is that I have to use @SystemMessage to display their text (since anything else marks it as me) and with some font tags (added through a vocab file) I can get their name colored just like everyone else's, however, the time stamp at the beginning of the line is missing.
I assume this is because it's being rendered through @SystemMessage, however, is there possibly a command or var that can be used to fake the time stamp to further complete the illusion of the 4th and 5th Glitter contacts being added to the chat room (since they are not being added with @ContactX like the other three)?
Hopefully that made sense....
- tigrotto
- Explorer At Heart
- Posts: 551
- Joined: Sat Jul 15, 2017 5:13 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: Tease Ai scripting: The HELP CORNER
Yes. You can add the command #CurrentTime in the vocab file you made and you'll have the current time. You'll probably have to add some font tags too to make it identical to the real time stamp.
You'll find it in TAI command guide selecting System keywords in the command type box.
Re: Tease Ai scripting: The HELP CORNER
Awesome, thank you!
I'll give that a try!
And thank you all for your hard work on this!
I'll give that a try!
And thank you all for your hard work on this!
Who is online
Users browsing this forum: Ahrefs [Bot], SubmissiveMartin and 13 guests