de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Re: Several Questions
PostPosted: Sat Sep 27, 2014 9:39 am 
Offline
Site Admin
User avatar
Sorry, it was a mistake, I corrected above ("&" and not "and")


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat Sep 27, 2014 6:48 pm 
Offline
Addict
I tried it out last night and it would not recognise "and" so I tried "+" and then "&". I figured it was just a typo or something and was going to verify it with you today, but now no need. Thanks for the help

Thanks for all the quick answers so far as well :D

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat Sep 27, 2014 8:39 pm 
Offline
Active member
CBT wrote:
Thanks for all the quick answers so far as well :D


This is why I love being here as a writer too, from reading other posts and lurking I can see there is a great community here. It's what made me want to contribute.

If you have simple yes / no, on / off (like your hat example) consider using booleans (true or false) def hatOn = true; take off your hat ... hatOn = false; I think it takes less time for the computer to test your statement when you check the status of the hat.

Then when you are reading your own code it makes more sense if you run into problems needing to track down if hatOn got set to 3 or 4000 somewhere along the way. An if statment might make more sense when you read it with true false.


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat May 23, 2015 7:02 pm 
Offline
Addict
Yet another question.

I am trying to write a short chastity based script as a way to polish up my rusty coding skills before getting stuck back into script writing again after a long period.

The script will be based on a point system rather than time when it comes to the chastity periods. You start your chastity sentence with a set number of points rather that a set number of days or hours. You will have points removed each day automatically and will be able to remove further points by completing actions/tasks, as well as for doing things like housework and other variables.

I need the script to know how long it has been since the last time it was run (i.e. "it has been 26 hours since....), and/or if it has been run every day/24-36 hrs of the chastity period (i.e. "it has been too long...). I am envisioning the script removing something like 100 points for each day, but dont want people to be able to cheat by using the script more than once per day and tricking the script into removing 200 points or something.

Im the lines script I relied upon people being honest with the script about how long they ahd been away. That seemed to work but the temptation to add a few extra hours or somethng was always there.

Basically I need some code that will make that script work out and say things like:

"It has been 30 hours since you were last here, removing 125 points"
"It has been 48 hours, that is too long, removing 200 points but adding 100 back for being late"

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat May 23, 2015 8:33 pm 
Offline
Site Admin
User avatar
In the script, for example at the start (or at a strategic moment, in order to not count launch-then-stop), save the time :
Code:
save("myscript.lasttimehere", getTime())


Use it at the very beginning of the script to know and save the elapsed time ; I put here 0 hours if never launched before
Code:
def elapsedHours = 0
if(loadInteger("myscript.lasttimehere")!=null)
  elapsedHours = (getTime() - loadInteger("myscript.lasttimehere"))/3600


Use it everywhere
Code:
if(elapsedHours > 30)
  show("bad puppy, bad !")


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sun May 24, 2015 2:05 pm 
Offline
Addict
Many thanks doti. Am working on it now, was scratching my head at first but its all coming back to me now.

I have started a thread for this script, so if anyone has any suggestions for anything i.e. tasks/activities for reducing the chastity sentence/points that they would like in the script or added features, then let me know. I will be listing what I am thinking of there, as and when they come to me ;)

viewtopic.php?f=4&t=501

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Fri May 29, 2015 8:39 pm 
Offline
Addict
Back again ;)

The chastity script is turning out to be quite a bit bigger and more complex than I thought. I decided to skip the bare bones version and just go straight for the full size/comprehensive version.

A few (more) questions though:

How do I create a pull down list menu like the one on the primary page of the Jewell Script, and is it relatively easy to use one of those or do you need really good coding skills to use one in a script?

I will probably be using randomly selected images with tasks/challenges attached to them for the daily or random tasks i.e.:

image=getRandom(18);
setImage("Chastiy/ChosenMistress/"+image+".jpg")
if (image==1)
{show("Do This")}
if (image==2)
{show("Do That")}

My question is. If I attach a task to every image and want to be able go directly to a specific one, can they be selected non-randomly as easily as saying:

setImage("Chastity/ChosenMistress/"+image+".jpg")

or will I have to use some other code to acheive the same result. I am asking before I get to that partso that I dont waste time setting it up before finding out it wont work and having to scrap half the script and redesign.

My final question is. How do I get the program to skip and image/task if the user has already specified that they dont have the required item or dont like that fetish.

Will this work? :

if (image==1 & Item=1)
{show("Do This")}
else
{show("You cant do this because you dont have Item")}

or this? :

if (image==1)
{
if (Item=1)
{show("Do This")}
else
{image=getRandom(18);
setImage("Chastiy/ChosenMistress/"+image+".jpg")}

or some other variant or code I dont know about?

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Fri May 29, 2015 10:35 pm 
Offline
Site Admin
User avatar
The pull down menu is created by getSelectedValue(). I shown buttons or list depending on size.

For the numerous tasks, they are more than one strategy, depending on the size of a task (1 instruction ? 10 ? 100 ? on average), and how much they are similar.

This code is ok
Code:
if (image==1 & Item=1)
{show("Do This")}
else
{show("You cant do this because you dont have Item")}

It will probably be much like :
Code:
if (image==1 & loadBoolean("toys...."))
{show("Do This")}
else
{show("You cant do this because you dont have Item")}


The last code you propose works also, but it don't do just the same thing. For more than 1 possible task, this 2nd one is probably better.


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Fri May 29, 2015 10:55 pm 
Offline
Veteran
User avatar
Ha Doti beat me to it :geek:

Not sure if I would make a list of tasks, only adding in the ones that the user has the correct toys/fetish for... will be cleaner to select or get a random task...

along the lines of:
Code:
def List<String> task = []

if (okwithwithwatersports )
  task.add("Task1")

.... repeat with other tasks.....

def randomtask = getRandom(task.size())
def selectedtask = getSelectedValue("Select task",task)
show("Task = "+task[selectedtask])
or do a switch statement on task[selectedtask] ...


_________________
Liz

You can't take something off the Internet - it's like taking pee out of a pool.
https://play-clan.site profile: Liz


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat May 30, 2015 6:59 pm 
Offline
Addict
Thanks to both of you for the quick answers. Doti's answers/code for the tasks part uses code I do know (still massive gaps, but learning more each time).Though Liz's code intrigues me and seems to have greater promise of doing what I need, but I am having trouble wrapping my head around it. I learn by trial and error and by doing. Have I got it right here?:

def List<String> task = ["Do This.",
"Do That",
"Do the Other"]

This is the unconditional list of tasks, i.e ones that dont require an item or fetish, that everyone cas/has to do?

if (Whip)
task.add("Whip Yourself")
if (Collar)
task.add("Wear a Collar")

This adds more tasks to the list based on what items you have and your previously indicated fetishes? If so, do I place it at the start of the script, after the list?

----

def randomtask = getRandom(task.size())
def selectedtask = getSelectedValue("Select task",task)

Do these two lines go at the start of the script, with the other "def" values?. Also, do they stay as they are or do I need to add some info/values to them first?

----

show("I want you to "+task[selectedtask] for me slave")

Is this right, or have I mucked it up?

If I,v gotten any (or all) of it wrong, could you provide a working example based on my incorrect attempt above?

Finally, I was going to use the list idea in almost the same way as the jewell script does, as a Main menu type of deal. i.e.:

What was my daily Task?
May I have another task?
Gamble some points
May I have a punishment
etc.

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Sat May 30, 2015 7:32 pm 
Offline
Site Admin
User avatar
Quote:
Do these two lines go at the start of the script, with the other "def" values?. Also, do they stay as they are or do I need to add some info/values to them first?

Put one of them (random or choosen ?) after defining the task list, as it find a task inside this list

Then (look at the quotes) :
Code:
show("I want you to "+task[selectedtask]+" for me slave")


So a working sample :
Code:
def List<String> task = ["Do This.",
  "Do That",
  "Do the Other"]
if (getBoolean("toys.whip"))
  task.add("Whip Yourself")

def randomtask = getRandom(task.size())

show("I want you to "+task[randomtask]+" for me slave")


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Tue Jun 02, 2015 7:05 pm 
Offline
Addict
Thanks. Sorry for the late reply, been ill for a few days.

Will this also work?:

def List<String> task = ["Do This.",
"Do That",
"Do the Other"]
if (Whip=1)
task.add("Whip Yourself")

If so it would fit better with my existing code and methodology.

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Wed Jun 03, 2015 4:25 pm 
Offline
Veteran
User avatar
CBT wrote:
Thanks. Sorry for the late reply, been ill for a few days.

Will this also work?:

def List<String> task = ["Do This.",
"Do That",
"Do the Other"]
if (Whip=1)
task.add("Whip Yourself")

If so it would fit better with my existing code and methodology.


yes, but "if (Whip=1)" should be "if (Whip == 1)"

_________________
Liz

You can't take something off the Internet - it's like taking pee out of a pool.
https://play-clan.site profile: Liz


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Thu Jun 04, 2015 7:51 pm 
Offline
Addict
Course :oops: . Always making that mistake and then catching it in the SS checker when it fails. :lol:

Thanks again.

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
 Re: Several Questions
PostPosted: Fri Jun 05, 2015 7:44 pm 
Offline
Addict
Hopefully this will be the last question for a while ;)

Think Iv got everything else I need to know to get stuck into this script now.

Two parts:

How do I create an item checklist like the one used when you first run the SS program?

and

How do I have it set each item as 0 or 1 (i.e. have or dont have). So I can use it with this code:

def Hat = loadInteger("Chastity.Hat")
if(Hat==null)
Hat = 0
def Shoes = loadInteger("Chastity.Shoes")
if(Shoes==null)
Shoes = 0

So that the result is set to 1 if you have the item, and 0 if you dont. This is to save me doing something like this for every item:

if(getBoolean("Got a Hat?", "Yes", "No"))
{show("Good.")
Hat=1}
else
{show("Bad.")
Hat=0}

Since I think I will be probably be asking about quite a few items, this would be rather time consuming and would probably result in me loosing my mind ever so slightly. :cry:

_________________
"There are so many more flavors in the world than Vanilla, so why limit yourself in either life or in ice cream"
- Me being introspective one day -


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.