Jump to content

Perg0

Resident
  • Posts

    35
  • Joined

  • Last visited

Posts posted by Perg0

  1. NGL when the first thing you read from the wiki is:

    //all these functions are untested functions that may have some very strange cases were they acd badly or where the comments are wrong
    //see them as buggy PSEUDO-code and consider yourself lucky if there are less than 2 wrong counters and 4 bad pointers/names.
    //they are more an example and a concept and unlikely fully functional AS IS.

    You get sketchy XD.

    Tho it looks to have promising offers- i re-downloaded my python 3 aswell as configured a Google-Sheets doc for it. Ontop LSL seams to read the website just fine if i don't post "code" on it.

    All in all it looks like 2021 might be a better year, since already now stuff is working better! ^^

    Thanks for the help again! imma keep looking into this.

  2. Bois... i think i finaly got in over my head big time.

    I'm working on a script that will work like a interactive cleverbot (because that seams like a good idear after 2020 >.<)

     

    I'm trying to make a script that can read the <p>Content</p> tags on my website-

    Tho i don't seam to be able to limit it.

    Here is the code and sorry for bad english in advance.

     

    key http_request_id;
     
    default
    {
        state_entry()
        {
            http_request_id = llHTTPRequest("https://purge-0.000webhostapp.com/SL.html", [], "");
        }
        
        http_response(key request_id, integer status, list metadata, string body)
        
        {
            if (request_id != http_request_id) return// exit if unknown
     
            vector COLOR_GREEN = <0.0, 1.0, 0.0>;
            float  OPAQUE     = 1.0;
     
            llSetText(body, COLOR_GREEN, OPAQUE);
        }
    }

     

    Thanks in advance for the help! this forum is the best! :D

    Link to the web ofc: https://purge-0.000webhostapp.com/SL.html

    ~Perg0

  3. Hi again Second life Fourms.

    It's a long while since i was on the game and i have been working on alot of scripts.
    Recently i re-watched the HBO chernobyl serie and got inspired to try and build a Powerplant in second life with a few friends.

    Tho i strongly recall that we all had 1 issue with the game. The prim count-

    Our main problem with Second life is that we would like a big building with alot of small rooms but it would take up 200+ prims.
    Dose anyone know of a program, designer and/or place you can make/buy/get buildings with a low-prim count?

     

    Thanks to everyone in advance and hope you have a wonderfull day! :3

    (also sorry for bad grammar-)

  4. This is what the script looks like now-

     

    integer listen_handle;
    integer channel = 0;


    default
    {
       
    attach(key id)
        {
           
    if (id)
            {
               
    llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
                listen_handle =
    llListen(channel, "", NULL_KEY, "");
            }
        }

        run_time_permissions( integer perm )
        {
           
    if (perm & PERMISSION_TRIGGER_ANIMATION)
            {
               
    llOwnerSay("Permissions has been granted automatically.");
            }
        }

        listen(integer channel, string name, key id, string message)
        {
           
    if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION )
            {
               
    if (llToLower(message) == "Bot sit")
                {
                   
    llSay(0, "Roger, Roger");
                    llStartAnimation("sit_ground");
                }
               
    else if (llToLower(message) == "Bot stand")
                {
                   
    llSay(0, "Roger, Roger");
                   
    llStopAnimation("sit_ground");
                   
    llStartAnimation("stand");
                }
            }
        }
    }

    • Like 1
  5. So it kinda works! :D

    I can now make the bot sit by using the following:

    (it's croped)

     listen(integer channel, string name, key id, string message)
        {
           
    if ( llGetPermissions() & PERMISSION_TRIGGER_ANIMATION )
            {
               
    if (llToLower(message) == "bot sit")
                {
                   
    llSay(0, "roger, roger.");
                   
    llStopAnimation("");
                   
    llStartAnimation("sit_ground");
                }
               
    if (llToLower(message) == "bot stand")
                {
                   
    llSay(0, "roger, roger.");
                   
    llStopAnimation("");
                   
    llStartAnimation("stand");
                   
    llResetAnimationOverride("");
                }
            }
        }

     

    As you can see i have been having issus trying to make the bot stand again...

    the llstopanimation and llresteanimationoverride dose not seam to make it stand back up. Any idears on how to make her stand? (i have also tried running the animation standup and Stand_1 ect...)

    I will go and read up on the WIKI and post if i find a solution- Thanks for all the help again, You guys are the best! ^w^

  6. Oh thanks! I will give it a quick try and see if i can make it work- I will also try to post the finished code here with a few edits so that ppl might be able to use it later as refmaterial- (or maybe it should be in "LSL lib?")

  7. 17 hours ago, KT Kingsley said:

    You can make your bot play a ground sit animation in the usual way with llStartAnimation.

    I was about to say you can use the built-in default animation, but looking at the wiki page for the internal animations, http://wiki.secondlife.com/wiki/Internal_Animations, I see there's two: "sit_ground" and "sit_ground_constrained", and I'm not sure what the difference is. My first guess is that the constrained version locks the avtar in place so it can't get bumped around, as with an actual ground sit. But that's just a guess.

    If your bot is using an AO with a ground sit animation of its own, you can also try using that.

    Anyhow, try llStartAnimation ("sit_ground") or llStartAnimation ("sit_ground_constrained"), or even llStartAnimation ("My AO groundsit animation") and see how that goes. Note that neither of the two built in animations have to be in the inventory of the object triggering them, but a custom animation of your own does. And if your bot's AO is using a set of stand animations that cycle, this will likely mess up its ground sit animation.

    I have been looking around but could not find the "sit_ground_constrained" in my inventory- But maybe im looking the wrong place? ^^ also thanks for the help :D

  8. 17 hours ago, Rolig Loon said:

    If you are scripting in an Experience, you can use the llSitOnLink function to force an avatar to sit on a specific object.  You'd usually use that in conjunction with the SLPPF parameters PRIM_ALLOW_UNSIT and PRIM_SCRIPTED_SIT_ONLY, to customize the environment.  The llSitOnLink function is meant to go into the object that you want someone to sit on, however, so it's not likely to be useful directly in a scripted object attached to your bot.  If that's what you are trying to do, I think you'll need to have the bot send a chat message to a scripted seat, triggering its script to seat your bot. 

    Thanks for that :D i will give it a try tho i'm not sure if i understand this correct-

     

    Are you saying i should create an object that i can attach to the bot which will make it sit or that i need to make an object it can sit on.

    incase it's an object for it to sit on, that is not what im looking for. I need a function that uses the "Sit here" function you normaly have when you right click on you avi.

  9. Hello again fourm-

    I have been working on my "bot" and was wondering if there is a LSL function or command to make an avatar sit on ground (Not on an object)?

     

    Here is the current code i'm working with (also thanks to Rolig Loon for making the original script this is based off from.)

     

    integer listen_handle;
    integer channel = 0;


    default
    {
       
    attach(key id)
        {
           
    if (id)
            {
               
    llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
                listen_handle =
    llListen(channel, "", NULL_KEY, "");
            }
        }

        run_time_permissions( integer perm )
        {
           
    if (perm & PERMISSION_TRIGGER_ANIMATION)
            {
               
    llOwnerSay("Permissions has been granted automatically.");
            }
        }

        listen(integer channel, string name, key id, string message)
        {
           
    if ( llGetPermissions() & PERMISSION_TRIGGER_ANIMATION )
            {
               
    if (llToLower(message) == "bot sit")
                {
                   
    llSay(0, "roger that.");
                   
    llSitTarget(<0,0,0>, ZERO_ROTATION); //This is the function i want to make it sit
                }
            }
        }
    }

    Thanks again you guys, I have gotten a real bite into this LSL stuff after a while! :D

    ~Perg0

  10. I have been working on some really fun project in LSL lately and wanted to give the AGENT and "BOT" functions a try too!

     

    You see i have an alt account that i would like to use... Tho i do not like the fact that i can use the "BUY $L" function on that account-

    Is there a way i can block that account incase of my code or anything else going totaly wrong- Don't wanna end up sleeping in a box on the street during this corona stuff. ^^'

     

    Thanks for your help and sorry for the bad grammar.

    I hope you all have a great day.

    ~Perg0

  11. 21 hours ago, Rolig Loon said:

    Take a look at this script, which I put in the LSL Scripting Library many years ago.  I think it's what you are trying to create.  If not, it's close.

     

    Thanks for the help! ^^

    I have gotten a better understanding of the code now and i even tried your code- unfortunately it seams to only go one direction.

    None the less i now have an idear of which part of the code dose what.

     

    Thanks again! ❤️

  12. Thanks! ^^ i will have a look if i can't make the other work.

    I'm taking a break from scripting all day so i will have a look later ^^

     

    Thanks again everyone :3 this is the sort of community i was missing back in the day when i started with other scripts.

    • Like 1
  13. This may be considert an "idiotic question" but i'm really curious-

    I'm working on a script that should make you able to sit on a poseball that is linked to other objects and move all of them, like if you were walking around "normaly".

     

    Do you NEED to use llVehicle functions, or can you use make it so the object can be attached to your avi and the object will still have functional poseballs?

     

    I hope this makes sense and thanks again for the help! This LSL scripting has really gotten me hooked during the Covid 19 crisis.

    ~Perg0

  14. WOW! Thanks so much for all the help- I didn't get any notif tho .w. so sorry for late respons-


    I figured it out on my own (with luck and wiki) here is the result i came up with :D

    think it's similar to @Xiija's version.

     

    Comm center:

    default
    {
       
    state_entry()
        {
           
    llWhisper(0, "O1 running!");
           
    llListen(71, "", NULL_KEY, "");
        }

        listen(integer channel, string name, key id, string message)
        {
           
    llWhisper(159, message);
        }
    }

    Radio (for 71)

    //https://lslwiki.digiworldz.com/lslwiki/wakka.php?wakka=llListen

    default
    {
       
    state_entry()
        {
           
    llListen(159,"O1","O1","");
        }
        
       
    listen(integer channel, string name, key id, string message)
        {
           
    if (llToLower(message) == message)
            {
           
    llWhisper(0, message);
            }
        }
    }

     

    And then i just change the channels from 71 if it needs to be another comm :D

    Thanks again everyone it's truely amazing to be a part of this community! ^^

     

    Hope you all have a fantastic day!

    ~Perg0

  15. I have already read and "passed" the Basic LSL Tutorial. Tho i still don't get it :/
    None the less i will try and re-read them and look online and maybe on youtube to see if i can find some more info.

     

    Thanks for the really quick respons! ^^

  16. Hello again dear forums! :D

    I have been working on a "comm" system for our sci-fi base, but have been unable to figur out a way to capture a normal chat message and then send it via "channel 159".

    I have gotten alot of help while learning code, but i'm have a hard time understanding certain part of it. Would anyone be willing/able to explain what the 4 values in "llListen" and "listen" do?

     

    I know that llListen is (Channel, the object name that it needs to listen too, something, something,)

    and have no clue how the () works on the "listen" function.

     

    Here is the code:

     

    default
    {
       
    state_entry()
        {
           
    llWhisper(0, "O1 running!");
           
    llListen(0,llDetectedKey(0),llDetectedKey(0),"");
        }

        listen(integer channel, string name, key id, string message)
        {
           
    llWhisper(159, message);
        }
    }

     

    Thanks alot again and hope you are all doing good! ^^

    ~Perg0

×
×
  • Create New...