Jump to content

Need help with spanking script! (nsfw maybe?)


FurryWolf45
 Share

You are about to reply to a thread that has been inactive for 999 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Okay so I have a spanker on my Avatar and I wanted to see who is spanking me so I created a script that does that but I want it to say different things for each spank. I created a script that seems correct but it keep giving me a Syntax error in the same spot every single time no matter what. I have no idea what is wrong. 

default
{
    touch_start (integer num)
    {
        list Roleplay = [" spanked Lillian's butt!", " made Lillian's butt jiggle with a good spank!",  " slapped Lillian's bouncy butt!",  " made Lillian's butt bounce with a hard spank!", " made Lillian dance with a firm slap on the butt!", " slapped Lillian's butt so hard, it's turning red!", " spanked Lillian's butt, making her wiggle with excitement!"];
integer Choice = (integer)llFrand(llGetListLength(Roleplay));   llSay(0, llGetDisplayName(llDetectedKey(0) + (string)((integer)llList2String(Roleplay,Choice));
    } 

 

it always says there is a syntax error at the very end of the scripte right after (string)((integer)llList2String(Roleplay,Choice))

in between the ) and ;
what is wrong here!? It worked when I did the single line but not here?

Edited by FurryWolf45
spelling
Link to comment
Share on other sites

You can also just use the llListRandomize() function in this case.

default
{
    touch_start (integer num)
    {
        list Roleplay = [
            "spanked Lillian's butt!",
            "made Lillian's butt jiggle with a good spank!",
            "slapped Lillian's bouncy butt!",
            "made Lillian's butt bounce with a hard spank!",
            "made Lillian dance with a firm slap on the butt!",
            "slapped Lillian's butt so hard, it's turning red!",
            "spanked Lillian's butt, making her wiggle with excitement!"
        ];
        llSay(0, llGetDisplayName(llDetectedKey(0)) + " " + llList2String(llListRandomize(Roleplay, 1), 0));
    }
}

 

Edited by panterapolnocy
  • Thanks 1
Link to comment
Share on other sites

Could I politely request that people making spankers please consider using llRegionSayTo and llOwnerSay rather than spamming everyone within 20 metres with their frightfully amusing toys?   

Same for people make (shudder) Tummy Talkers (which I am sure are illegal under international humanitarian law if they use public chat and, if they're not, they should be).

Edited by Innula Zenovka
  • Like 6
  • Thanks 3
Link to comment
Share on other sites

6 hours ago, panterapolnocy said:

You can also just use the llListRandomize() function in this case.

randomizing a list just to get a random element seems rather computationally expensive to me,


putting that together with Innula's suggestion:

list Roleplay = [
          	" spanked $o's butt!",
            " made $o's butt jiggle with a good spank!",
            " slapped $o's bouncy butt!",
            " made $o's butt bounce with a hard spank!",
            " made $o dance with a firm slap on the butt!",
            " slapped $o's butt so hard, it's turning red!",
            " spanked $o's butt, making her wiggle with excitement!"
        ];
integer len;
string uDisplayName(key ID)
{return "secondlife:///app/agent/"+(string)ID+"/inspect";
}
string strReplace(string str, string search, string replace) {
  //http://wiki.secondlife.com/wiki/Combined_Library
    return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace);
}
default
{
	state_entry()
	{
		integer index = len =llGetListLength(Roleplay);
		list temp;
		string ownerName = uDisplayName(llGetOwner);
		while(--index>=0)
		{
			temp+=strReplace(llList2String(Roleplay,index),"$o",ownerName);
		}
		Roleplay=temp;
	}
  changed(integer c)
  {	if(c&CHANGED_OWNER)
    llResetScript();
  }
    touch_start (integer num)
    {	key ID = llDetectedKey(0);
		string rand = uDisplayName(ID)+llList2String(Roleplay,(integer)llFrand(len));
        llRegionSayTo(llGetOwner(),0,rand); //regionSayTo has a more visible font than ownersay in my viewer.
     	llRegionSayTo(ID,0,rand);
    }
}

 

Link to comment
Share on other sites

8 hours ago, FurryWolf45 said:

in between the ) and ;
what is wrong here!? It worked when I did the single line but not here?

You're missing a matching ) if I glanced at it correctly. Using an editor that highlights matching characters '() [] {}' or adding gratuitous formatting can help spot these kinds of errors.

Link to comment
Share on other sites

1 hour ago, Innula Zenovka said:

Could I politely request that people making spankers please consider using llRegionSayTo and llOwnerSay rather than spamming everyone within 20 metres with their frightfully amusing toys?   

   Nuuu, 'cause, then how will everyone know what a doubtfully dubious dom you are, or what superb super sub you are, if it doesn't alert everyone and their grandmother that you're engaging in totally not borderline vanilla impact play in public?!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

15 hours ago, panterapolnocy said:

You can also just use the llListRandomize() function in this case.


default
{
    touch_start (integer num)
    {
        list Roleplay = [
            "spanked Lillian's butt!",
            "made Lillian's butt jiggle with a good spank!",
            "slapped Lillian's bouncy butt!",
            "made Lillian's butt bounce with a hard spank!",
            "made Lillian dance with a firm slap on the butt!",
            "slapped Lillian's butt so hard, it's turning red!",
            "spanked Lillian's butt, making her wiggle with excitement!"
        ];
        llSay(0, llGetDisplayName(llDetectedKey(0)) + " " + llList2String(llListRandomize(Roleplay, 1), 0));
    }
}

 

This fixed it! Had a couple syntax errors working on it but i was able to fix them. This helped WONDERS ❤️❤️❤️ THANK YOU!!

Link to comment
Share on other sites

  • 2 months later...
On 5/21/2021 at 10:47 AM, Quistess Alpha said:

randomizing a list just to get a random element seems rather computationally expensive to me,


putting that together with Innula's suggestion:

list Roleplay = [
          	" spanked $o's butt!",
            " made $o's butt jiggle with a good spank!",
            " slapped $o's bouncy butt!",
            " made $o's butt bounce with a hard spank!",
            " made $o dance with a firm slap on the butt!",
            " slapped $o's butt so hard, it's turning red!",
            " spanked $o's butt, making her wiggle with excitement!"
        ];
integer len;
string uDisplayName(key ID)
{return "secondlife:///app/agent/"+(string)ID+"/inspect";
}
string strReplace(string str, string search, string replace) {
  //http://wiki.secondlife.com/wiki/Combined_Library
    return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace);
}
default
{
	state_entry()
	{
		integer index = len =llGetListLength(Roleplay);
		list temp;
		string ownerName = uDisplayName(llGetOwner);
		while(--index>=0)
		{
			temp+=strReplace(llList2String(Roleplay,index),"$o",ownerName);
		}
		Roleplay=temp;
	}
  changed(integer c)
  {	if(c&CHANGED_OWNER)
    llResetScript();
  }
    touch_start (integer num)
    {	key ID = llDetectedKey(0);
		string rand = uDisplayName(ID)+llList2String(Roleplay,(integer)llFrand(len));
        llRegionSayTo(llGetOwner(),0,rand); //regionSayTo has a more visible font than ownersay in my viewer.
     	llRegionSayTo(ID,0,rand);
    }
}

 

My post was /finally/ approved, over 2 months later. Seems the mods have a large back-catalogue.

Link to comment
Share on other sites

Just now, Quistess Alpha said:

My post was /finally/ approved, over 2 months later. Seems the mods have a large back-catalogue.

   Yeah, I just had one approved from April 5th. In a dead thread. Oh well.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 999 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...