Jump to content

Trying to find a script for hunt objects


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

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

Recommended Posts

Maybe someone can point me in the right direction, because I can't for the life of me find this and I know it exists.  :)

In a nutshell, I am hosting a hunt to bring attention to a womens center I am opening in second life.  I thought a hunt would be a fun open house week event as I have run a shop for five years and can put some nice gifties in the hunt objects for people who come out.  Now, I have done some hunts in the past (not in a long while) and I remember there is a script that can be put into the hunt objects to change the names of them randomly to other objects around that will discourage the hunters from cheating.  Ive been all over marketplace and in world and cant find this.  I'd like to encourage people to travel around the center to hunt so they can find the library, meditation room, etc.

My question (finally!  lol) is this... does anyone know where I can find this script or something similar to it?  This is for a good cause and any help finding this would be appreciated!

 

Arielle Simondsen

Link to post
Share on other sites

There is most likely a script out there, but there are other ways to find hunt objects that you cannot (really cannot) negate. So I suggest thinking of the hunt items as "gifts" which has always been my policy and let those that WANT to hunt, hunt and those that want to "gather" gather :D.

Just a thought.   So much negativity out there this week it would be good I think to opt on the side of generosity (this isn't just YOU of course, it is ALL OF US!)

 

 

  • Like 2
Link to post
Share on other sites

I just like it to at least be a fun challenge.  ;)  either way they are getting free goodies and hopefully having some fun. I'm giving away some really good stuff from my shop so either way I hope people will enjoy and make a landmark of the center and maybe it will benefit some who will have need of it.  :)

Link to post
Share on other sites

There are various ways to go about this, however there are still ways which I will not disclose to find such hunt items, but not many people know about it(it requires digging deep into the SL protocol).

Although I am posting it here, it is much prettier to read on github, because github has the LSL syntax highlighting: https://gist.github.com/FelixWolf/ff4cd9068d26d46bf93d5efdcab89dec

Method 1 - Randomize the name completely:

Pros:

  • Quick and simple
  • Very small script

Cons:

  • Easily recognizable in area search
  • Some scripts have been designed to detect these
/*
The MIT License (MIT)
=====================

Copyright (c) `2017` `Chaser Zaks`

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*<Config>*/
//How short and long the random name should be
integer nameMinLength = 4;
integer nameMaxLength = 63;
//What characters to use(By default, it uses all characters that are USABLE)
//Be careful with this, as using unicodes can cause it to malfunction.
string nameChars = " !\"#$%&'()*+-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{}~";
/*</Config>*/

maskName(){
    //Set up out empty variables
    string result = "";
    integer i = 0;
    //Randomize the length of the name
    integer length = nameMinLength+(integer)llFrand(nameMaxLength-nameMinLength);
    //Count the number of random characters we can use
    integer charLen = llStringLength(nameChars);
    for(; i<length; i++){
        //FILL NAME! :D
        integer rand = (integer)llFrand(charLen);
        result = result + llGetSubString(nameChars, rand,rand);
    }
    //And set it
    llSetObjectName(result);
}
default{
    state_entry(){
        llSetMemoryLimit(0x2000);
        maskName();
    }
    on_rez(integer id){
        maskName();
    }
    changed(integer c){
        if(c&CHANGED_REGION_START){
            maskName();
        }
    }
}

Method 2 - Adjective + Noun merging:

Pros:

  • Very random, makes it hard to detect
  • Scripts cannot detect this unless you publish the noun list

Cons:

  • Requires a bit more customization
  • Sometimes visible if it makes no sense (EG: rubber concrete)
  • You'll need to enter a custom noun list to prevent people from leeching off this list to make a scanner.
/*
The MIT License (MIT)
=====================

Copyright (c) `2017` `Chaser Zaks`

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*<Config>*/
list adjectives = [
    //Colours
    "Red",
    "Blue",
    "Green",
    "Yellow",
    "Orange",
    "Pink",
    
    //Opinions
    "Pretty",
    "Beautiful",
    "Strange",
    "Cute",
    
    //Facts
    "Big",
    "Small",
    "Round",
    "Square",
    "Wide",
    "Thin",
    "Long"
];
list nouns = [
    "House",
    "Cat",
    "Dog",
    "Thing",
    "Box",
    "Sphere",
    "Fruit",
    "Bowl",
    "Plate",
    "Tree",
    "TV",
    "Plush"
];
/*</Config>*/

maskName(){
    llSetObjectName(
        llList2String(adjectives,
            llFloor( //We use floor instead of (integer) as to not overflow the list!
                llFrand(
                    llGetListLength(adjectives)
                )
            )
        )
        + " " + //Add a space
        llList2String(nouns,
            llFloor( //We use floor instead of (integer) as to not overflow the list!
                llFrand(
                    llGetListLength(nouns)
                )
            )
        )
    );
}
default{
    state_entry(){
        llSetMemoryLimit(0x2000);
        maskName();
    }
    on_rez(integer id){
        maskName();
    }
    changed(integer c){
        if(c&CHANGED_REGION_START){
            maskName();
        }
    }
}

Method 3 - Random near by object:

Pros:

  • Extremely random
  • Names that make sense
  • Hard to tell from other objects

Cons:

  • Limited to the nearest 16 objects
  • Can be weird sometimes(EG: Why two "Visitor managers")
/*
The MIT License (MIT)
=====================

Copyright (c) `2017` `Chaser Zaks`

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*<Config>*/
//How far away we search(EG: 96 meters around the object)
float distance = 96;
//What should we look for? Static objects or scripted objects, or both?
//NOTE: Since we cannot do OR functions in function definition, we have to
//      do math, so I wrote down the numbers here, with their meaning
//      By default, we match 
//4  = Non-physical = PASSIVE
//2  = Physical = ACTIVE
//12 = Scripted non-physical = PASSIVE|SCRIPTED
//10 = Scripted physical = ACTIVE|SCRIPTED
//6  = Any object = ACTIVE|PASSIVE
integer matching = 6;
/*</Config>*/

default{
    state_entry(){
        llSetMemoryLimit(0x2000);
        llSensor("", "", matching, distance, PI);
    }
    on_rez(integer id){
        llSensor("", "", matching, distance, PI);
    }
    changed(integer c){
        if(c&CHANGED_REGION_START){
            llSensor("", "", matching, distance, PI);
        }
    }
    sensor(integer numDetected){
        //This code's comments are best read in reverse
        
        llSetObjectName( //And set it as ours
            llDetectedName( //We get the name
                llFloor( //And since the max value is a empty value, we floor the value
                    llFrand(numDetected) //We use this to randomize it
                )
            )
        );
    }
    no_sensor(){
        //Alert us if it doesn't work
        llOwnerSay("WARNING: This object has not been renamed! Try increasing the Matching variable to match more things!");
    }
}

Conclusion:

All have their pros and cons, but they will stop most users from cheating. Keep in mind, some people will still cheat.

Personally, I'd go with option 3, but I listed all of the options to make a well decided choice.

Hope this helps!

Edited by Chaser Zaks
Forgot the change on region start bit in the first and second code
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 1295 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...