Jump to content

bobsknief Orsini

Resident
  • Posts

    224
  • Joined

  • Last visited

Posts posted by bobsknief Orsini

  1. Better formatted would be:

    integer total_inv = llGetInventoryNumber(INVENTORY_ALL);
    integer new_number = total_inv - 2;

    Alternatively assuming you want to exclude something specific from your count you could do:
    integer i;
    integer count = 0;
    for(i = 0; i < total_inv ; i++){
       string inv_name = llGetInventoryName(INVENTORY_ALL, i); 
       if(inv_name != "blabla" && inv_name != "somename"){
          count++;
       }
    }
    llSay(0, (string)count);

  2. Don't forget functions that have a delays or timers. If you have a script that is constantly working and needs to send for example im messages. Adding a additional script to send out the im message prevents the main script from sleeping for 2 seconds.

    In regards to timers it mainly depends what it does. Its generally better to have one script that constantly runs some "small code" then putting everything into one script running a "large code" constantly.

    • Like 1
  3. Make sure to disable limited selection distance in your viewer. And check for missing items as it often doesn't select everything. You can add these to your selection holding down shift and clicking them.

    You also want to rez a box in exactly the center of your land and select this box in your selection as last so its the (kind of) root of your selection. And then on the new parcel, also rez a box exactly in the center and drop your item ontop of that box so that its in the exact same location and you don't have to worry about stuff being returned because it rezed outside of your parcel.

    Finally, probably the most practical thing. Make sure you have the build window open when you rez so that when you rez it everything is selected and you can move it without having to re-selecting everything.

  4. You send a message with a separator and convert it to a list.

    For example: llSay(channel, "123#30e14cf8-7faa-06da-1433-f6afde2c336a");

    On the receiving prim:
    list my_list = llParseString2List(msg,["#"],[]);
    string var1 = llList2String(my_list,0);
    string var2 = llList2String(my_list,1);

    if(var1 == "123"){
          llSetTexture(var2,ALL_SIDES);
    }

  5. You could just store the data in a second script using a linkmessage. If you never reset this script it should store the data indefinitely. It generally depends on how important the "data" is or how long the "end user" needs to input the data.

  6. Tracking locations with LSL scripts is technically impossible in that sense. Yes it is possible when its a attachment or you are in the same sim as in the script. So they are using a other way. Most likely a bot or alt.
    First off, in your friends list... remove "can locate on map" from everyone and see if that helps. If it does then someone in your friends list is the cause of your problem.

    If it doesn't, they may be using bots that go from sim to sim and collect avatar names (including UUID's). If that is the case. There isn't much you can do apart from reporting it to LL. If they manage to setup a custom viewer or bot that does this then changing your name wont fool them.

  7. Assuming it is one object and you don't want the object to be used unless you are sitting on it. 
    Simply set a unsit() when the key is not the llGetOwner(). When the owner sits disable this function until the owner gets of the object.

    • Thanks 1
  8. Want to blog about something else but clothes?
    If your answer yes then read on because i do not make any clothes.

    My Store BobsCreation has been in SL since 2012 and features some of the best selling products on marketplace. I am currently releasing at least 1 new product a month.
    For a overview of what kind of products i make have a look on my marketplace here: https://marketplace.secondlife.com/stores/44883

    I am looking for serious bloggers or vloggers that are interested in reviewing or writing about my products.

    Send me a (private) message on this forum or a notecard in-world.

  9. Think the smallest a parcel can be is 8x8. You can make a script that just checks all those positions on the sim.

    Make a loop... start at pos <0.0.0>... +=8 to x and y..... until you reach >= 256
    Use something like llGetParcelDetails to get the ID of the parcel and make 2 lists one with the id and one with the pos.
    Use llGetParcelFlags on the list.

×
×
  • Create New...