-
Posts
35 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Perg0
-
-
Thanks- i will experiment with it and see what i can get to work.
-
i should mention by "limit" i mean that the script litteraly reads the entire HTML code like:
!DOCTYPE html
<head>
<Title> SL </title></head>
<Body.....
-
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!
Link to the web ofc: https://purge-0.000webhostapp.com/SL.html
~Perg0
-
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-)
-
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");
}
}
}
}- 1
-
Wow that worked (both of you)
THANSK! now when i read it i can see the falut *face palm*. Guess i don't have such a good grip after all ^^'
Thanks again tho! you guys are the best
-
So it kinda works!
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^
-
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?")
-
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
-
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 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.
-
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!
~Perg0
-
Alright thanks! ^^
I must have added payment to the account at a point by accident then-
-
Yes that is correct!
But will that not also remove the ability to "buy L$" from my main ("perg0" this one)
-
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
-
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! ❤️
-
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.
- 1
-
Well thanks!
i will give "llTakeControls" a try then! ^^
I'm happy for your help.
-
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
-
I have had a closer look on the code and now understand it better.
Thanks again guy's you're the best! ❤️ ^w^ -
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 withthink 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
Thanks again everyone it's truely amazing to be a part of this community! ^^
Hope you all have a fantastic day!
~Perg0
-
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! ^^
-
Hello again dear forums!
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
-
Oh nvm- just read it and re-attached it.
I't works now!
- 2
-
Thanks! ^^
Tho it dosen't work. The animation "Butt" dosen't play (and it is in the same object "the slapper").
Website (http) communication.
in LSL Scripting
Posted
NGL when the first thing you read from the wiki 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.