How do I run a bot? - SLUniverse Forums
Navigation » SLUniverse Forums > Development Discussion and Support > Scripting » How do I run a bot?


Scripting Discuss scripting and programming for SL and other platforms

 
Reply
 
LinkBack Thread Tools Display Modes
Old 06-28-2012, 08:12 PM   #1 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
How do I run a bot?

From what I've pieced together from some cryptic Malevay Studio blog posts, the new sim idling that LL is playing with may be the reason my meeroos are faring rather poorly. Since the point of breedables is breeding, it's beyond annoying that the roos are falling out of cycle and failing to breed. Where I used to get a nest every 5 days, I'm lucky if I get one every 8 or 9 days as each pair justles to get back in sync and continually fails.

My sim is a homestead that up until now has performed flawlessly, but it gets very little traffic, and I gather that's exactlly the situation that results in idling. So I'd like to keep an avatar present on the sim basically 24/7 to see if that fixes the issue.

I have no clue how to do this. I'd appreciate any pointers, especially if they are provided using small words spoken loudly and carefully enunciated so I don't lose focus.
__________________
Noob: "okay.... im in a house with cages and people in gags and the door just locked and i cant get out :c"
Beebo Brink is online now   Reply With Quote
Old 06-28-2012, 10:24 PM   #2 (permalink)
Senior Member
 
KT Kingsley's Avatar
Praying for intelligent life somewhere up in space, 'cause there's bugger all down here on Earth
 
Join Date: Jul 2011
Posts: 1,696
At the end of this post Qie mentions a way of doing this with a very simple script.

Presumably this simple:
Code:
default
{
    state_entry()
    {
        llSetTimerEvent(5.0);
    }
    timer()
    {
        llHTTPRequest("http://", [], "");
    }
}
though there's bound to be complications I haven't thought of.

If you'd prefer to go the bot route, first you need a computer that you're willing to keep running 24/7. Then you need an account you can keep logged in 24/7. Then you need a viewer to run that account.*

The Lab viewer won't do, as using it you get logged out automatically after (I think) 30 minutes of inactivity. I know Firestorm has an option to never log you out, and I'm sure plenty of other third party viewers do too. You might also want to consider using a text-only viewer for this. I only know METAbolt, which works fine, and includes some features that could be used to make the bot useful while it's logged in. Again, I'm sure other text viewers have many of the same features.

But you'd better hear what the grown-ups have to say about this first.

*I guess it's also probable that there are commercial bot runners out there who could host a bot for you 24/7.

PS: one thing METAbolt does is relog your bot after a few minutes if it does get logged out, for instance as a result of a sim restart.

ETA: Oops! I used what turns out to be a real website name in my example script (now changed). I wonder if llHTTPRequest checks for the legality (in HTTP terms) of the URL? If not then maybe using an illegal character in it would prevent the possibility of mounting an unintentional and pretty feeble denial of service attack on some unsuspecting victim. Otherwise, I'm sure someone can suggest a way of generating a URL that's legal but impossible.

ETA 2: I was able to check in-world, and found that llHTTPRequest does at least check that the URL begins with "http://" or "https://" and generates a script error if it doesn't. Using just that does generate an HTTP response, without an LSL error.

Last edited by KT Kingsley; 06-28-2012 at 11:58 PM.
KT Kingsley is offline   Reply With Quote
1 User Said Thanks:
Old 06-28-2012, 10:57 PM   #3 (permalink)
Senior Member
 
Darien Caldwell's Avatar
Mayan Time Lord
 
Join Date: Apr 2008
Location: Cali
Posts: 1,993
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Actorbot - Sine Wave Company

You can either get their free software and run it on your PC 24/7, or pay them a fee of L$5 per bot per hour to run it for you. you can go the scripted route of course, as KT outlines.
__________________
[H]arsh Styles
Darien Caldwell is offline   Reply With Quote
1 User Said Thanks:
Old 06-29-2012, 04:51 AM   #4 (permalink)
That Bitch

*SLU Supporter*
 
Void's Avatar
Innocent as far as you know
 
Join Date: Nov 2011
Location: Online
Posts: 6,200
My Mood:
SL Join Date: late 04... that account is deleted now
before you try any solution, it might be helpful to confirm that idling is the cause (I'm not sure it's been rolled to all regions yet)....

a simple test script should do the job
Code:
default{
    state_entry(){
        llSetText( "No Idling detected yet", <0.0, 1.0, 0.0>, 1.0 );
        llSetTimerEvent( 600.0 );
    }
    
    timer(){
        if ((integer)llGetEnv( "region_idle" )){
            llSetText( "Region Idling confirmed at " + (string)llGetTimestamp(), <1.0, 0.0, 0.0>, 1.0 );
            llSetTimerEvent( 0.0 );
        }
    }
}
if it has the red message any time after you come back, Try Qie's solution first... i'm not sure it'll work (LL was a bit vague about outgoing requests), but change that 5.0 to at least 30.0 if not 60.0 (which is the timeout period for http requests) which should be short enough if the region is de-idling on outgoing request.... otherwise a more complicated setup like a bot may be neccessary
__________________
- These eyes can do more than see
Quote:
Originally Posted by Cajsa Lilliehook View Post
It's not enough to care about liberty if the only liberty you care about is your own.
Quote:
Originally Posted by Jupiter Firelyte View Post
Why doesn't anyone ever ask, "What is the real meaning of the winter solstice?"
Quote:
Originally Posted by Eboni Khan View Post
Thanks for being passive agressive.
Void is offline   Reply With Quote
1 User Said Thanks:
Old 06-29-2012, 05:16 AM   #5 (permalink)
Friendly Biker 100%
 
Amigo Uriza's Avatar
thumbs up
 
Join Date: Mar 2010
Posts: 148
SL Join Date: June 2007
Client: Firestorm
You can use Radegast Viewer.

It is very light client, but you will need to keep a computer working.
The viewer minimizes in the icon tray and you can also configure that the avatar reconnects after a few minutes (5, 10 etc) in case you lose connection or the region restarts. This can happen while you are sleeping, for example.

You can access the inventory and you can have a perspective of the region with the 3d viewer in case you want to know what's going on.
There is an important option in the viewer that allows to auto-respond to everybody that tries to contact you, without being in busy mode. This is very helpful in case someone wants to contact your "bot".

In the past I used to notice some lag when I used it, but the last versions have no significant impact.
Amigo Uriza is offline   Reply With Quote
Old 06-29-2012, 05:24 AM   #6 (permalink)
ガンバレ日本

*SLU Supporter*
 
eku Zhong's Avatar
rotisserie compulsive
 
Join Date: Mar 2009
Location: 田舎
Posts: 11,157
My Mood:
SL Join Date: 9/29/2007
Business: Culprit
Client: LL beta
you can use metabolt and just log an alt in. METAbolt homepage - open source, non graphical metaverse text client
idling is definitely playing havoc with certain things..

you can register an alt as a scripted account on your alts dashboard if you dont want it just to be an avatar on your sim.

i doubt ppl will complain that theres one avatar logged in all the time...
__________________
Culprit Blog * Culprit Store
eku Zhong is offline   Reply With Quote
1 User Said Thanks:
Old 06-29-2012, 07:53 AM   #7 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
Thanks everyone!

I'll start with Void's script to confirm the issue. If idling's to blame, I'll try KT's script.

If I need the most drastic remedy, Metabolt is a great suggestion for the bot. My home computer is on all the time anyway, and I have some alts not doing anything to justify the Lindens I give them. And since it's my sim, there's no one to complain.
Beebo Brink is online now   Reply With Quote
1 User Agreed:
Old 06-29-2012, 07:57 AM   #8 (permalink)
Nasty Brit
 
Innula Zenovka's Avatar
Wants *things*
 
Join Date: May 2009
Posts: 6,952
SL Join Date: 17 June 2007
Business: Something Spunky
Quote:
Originally Posted by Void View Post
before you try any solution, it might be helpful to confirm that idling is the cause (I'm not sure it's been rolled to all regions yet)....
I think it was rolled out everywhere by the end of May -- Deploys for the week of 2012-05-21 - Second Life
__________________
Innula Zenovka is online now   Reply With Quote
1 User Said Thanks:
2 Users Agreed:
Old 06-29-2012, 07:59 AM   #9 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
Quote:
Originally Posted by Innula Zenovka View Post
I think it was rolled out everywhere by the end of May -- Deploys for the week of 2012-05-21 - Second Life
And that would be around when my roos started having issues. I can't tell you how pleased I am with the Lindens right now, for the weeks of frustration they've caused me with this friggin "improvement" to my SL experience.
Beebo Brink is online now   Reply With Quote
Old 06-29-2012, 08:13 AM   #10 (permalink)
Nasty Brit
 
Innula Zenovka's Avatar
Wants *things*
 
Join Date: May 2009
Posts: 6,952
SL Join Date: 17 June 2007
Business: Something Spunky
I know that there have been a few weird issues since then with time that don't seem directly related to region idling -- more to do with simulators getting confused about whether they're working on Pacific Time or UDT (I can look out the jiras if necessary).

For what it's worth, I set up a couple of tests, because I was worried about the effect of region idling on long timers, and things went nuts for about 10 days earlier this month (in ways that don't seem immediately connected to with region idling -- the timers were running way too fast, or at least firing well before they should have done) but they seem to have gone back to normal now.

So, while it might well be region idling, I wouldn't discount the possibility that whatever was happening earlier this month knocked your roos out of synch and they're stayed that way.
Innula Zenovka is online now   Reply With Quote
1 User Said Thanks:
Old 06-29-2012, 08:41 AM   #11 (permalink)
Adorable.
 
Charlemagne Allen's Avatar
 
Join Date: Sep 2007
Posts: 6,383
My Mood:
SL Join Date: February 2007
Blog Entries: 1
It's simple: put the robot on a treadmill and let it go.


__________________
Charlemagne Allen: YOU'RE A RACIST!
Charlemagne Allen: I HAVE CHATLOGS!
smokergirl Lowenhar: HOMOPHOBE
smokergirl Lowenhar: CONTENT THIEF
Charlemagne Allen: RELIGION SUCKS DONKEY BALLS!
smokergirl Lowenhar: KISS MY ASS YOU CLOSE MINDED HYPOCRIT
Charlemagne Allen: YOU WERE AN ESCORT FOR BARN ANIMALS!
Charlemagne Allen: ZOMG BIG SIG!

Pretty things:
http://www.flickr.com/photos/charlemagneallen/
Charlemagne Allen is offline   Reply With Quote
3 Users Laughed:
Old 06-29-2012, 09:59 AM   #12 (permalink)
Senior Member
 
KT Kingsley's Avatar
Praying for intelligent life somewhere up in space, 'cause there's bugger all down here on Earth
 
Join Date: Jul 2011
Posts: 1,696
Ideally, of course, you should selectively breed the meeroos for resistance to region idling problems.
KT Kingsley is offline   Reply With Quote
1 User Likes This:
Old 06-29-2012, 11:02 AM   #13 (permalink)
Ginger Supremacist
 
Ramen Jedburgh's Avatar
Heya ^_^
 
Join Date: Apr 2010
Location: Illinois, USA
Posts: 1,849
My Mood:
SL Join Date: 3/9/2006
Looks like you got your replies but I was going to suggest Metabolt as well. There is another text only client but I forget what it is called.
__________________
--
Ramen Jedburgh
Abusively Cute ^_^
Ramen Jedburgh is offline   Reply With Quote
Old 06-29-2012, 11:19 AM   #14 (permalink)
Junior Member
 
Carn Windlow's Avatar
 
Join Date: Aug 2009
Posts: 14
SL Join Date: 11-05-2008
Radegast? I actually like it better.
__________________
“If you tell the truth, you don't have to remember anything.”
Mark Twain
Carn Windlow is offline   Reply With Quote
1 User Agreed:
Old 06-29-2012, 11:26 AM   #15 (permalink)
Eternal n00b
Who? Me?
 
Join Date: Dec 2010
Posts: 1,542
My Mood:
Client: Restrained Love Viewer (v2.8.3.5)
Radegast has a rudimentary 3D scene capability, as well as many of the text features. And it's free, as is METAbolt, until you feel guilty enough to make a contribution. Both can be run on a backup computer or laptop, and they aren't blocked by my office firewall like SL.
Brianna Ort is offline   Reply With Quote
Old 06-29-2012, 06:21 PM   #16 (permalink)
Senior Member
 
KT Kingsley's Avatar
Praying for intelligent life somewhere up in space, 'cause there's bugger all down here on Earth
 
Join Date: Jul 2011
Posts: 1,696
I had a play with this myself just now. What I found was that with a 30 second llHTTPRequest loop the (main server channel) region I was using would go idle after about 5 seconds and wake up again about 30 seconds later, repeatedly. Using a 5 second loop it wouldn't go idle at all.

Presumably a region goes idle after 5 seconds of inactivity.

I guess what's needed is a real HTTP server URL, but one which will acknowledge the HTTP request and not respond to it, thus timing out the llHTTPRequest after 60 seconds, rather than causing an immediate error.

Either that, or stick with the 5 second loop.
KT Kingsley is offline   Reply With Quote
Old 06-29-2012, 06:35 PM   #17 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
I set out Void's idling script before dinner and an hour later it had confirmed my sim is idling. Moving on to scripts that will keep that from happening again.

ETA: So far so good. The Idling monitor still shows clear.

Last edited by Beebo Brink; 06-29-2012 at 07:42 PM.
Beebo Brink is online now   Reply With Quote
2 Users Said Yay!:
Old 06-29-2012, 06:52 PM   #18 (permalink)
That Bitch

*SLU Supporter*
 
Void's Avatar
Innocent as far as you know
 
Join Date: Nov 2011
Location: Online
Posts: 6,200
My Mood:
SL Join Date: late 04... that account is deleted now
Quote:
Originally Posted by KT Kingsley View Post
I had a play with this myself just now. What I found was that with a 30 second llHTTPRequest loop the (main server channel) region I was using would go idle after about 5 seconds and wake up again about 30 seconds later, repeatedly. Using a 5 second loop it wouldn't go idle at all.

Presumably a region goes idle after 5 seconds of inactivity.

I guess what's needed is a real HTTP server URL, but one which will acknowledge the HTTP request and not respond to it, thus timing out the llHTTPRequest after 60 seconds, rather than causing an immediate error.

Either that, or stick with the 5 second loop.
ouch... yeah it's probably idling as sonn as the message is recieved with no av's around... their notes didn't suggest it was so restrictive... it can be done the other way around... but that's messy and requires something pinging an inwolrd LSL-HTTP server... once a minute without response... it's simper overall than running a client, but it's a pain to set up

5 seconds it is I guess =/
Void is offline   Reply With Quote
Old 06-29-2012, 07:15 PM   #19 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
If enough people get fed up with the performance issues caused by this "new feature" and use some kind of disruptive script or log in 24/7 bots, the advantage will have been lost.

Can't say I'm crying over that possibility. I'm still royally pissed.
Beebo Brink is online now   Reply With Quote
Old 06-29-2012, 08:15 PM   #20 (permalink)
ガンバレ日本

*SLU Supporter*
 
eku Zhong's Avatar
rotisserie compulsive
 
Join Date: Mar 2009
Location: 田舎
Posts: 11,157
My Mood:
SL Join Date: 9/29/2007
Business: Culprit
Client: LL beta
its LLs way to boost concurrency or however you spell it.
we have one ava on each sim at all times.... otherwise some scripts reset themselves.. and go back to use by owner only
which is stupid in a shop
eku Zhong is offline   Reply With Quote
Old 06-29-2012, 08:44 PM   #21 (permalink)
┌( ಠ_ಠ)┘

*SLU Supporter*
 
yure4u Sosa's Avatar
animating
 
Join Date: Apr 2009
Location: ekus house
Posts: 858
My Mood:
Business: Kinki Animations
you have to check them for now and them for sim restart make the alts go down and your sim still going to go iddle and i was wondering what will happend if you register your alt as a bot? if that will or wont count for going the sim iddle or not?
yure4u Sosa is offline   Reply With Quote
Old 06-29-2012, 10:05 PM   #22 (permalink)
Friendly Biker 100%
 
Amigo Uriza's Avatar
thumbs up
 
Join Date: Mar 2010
Posts: 148
SL Join Date: June 2007
Client: Firestorm
Quote:
Originally Posted by yure4u Sosa View Post
you have to check them for now and them for sim restart make the alts go down and your sim still going to go iddle and i was wondering what will happend if you register your alt as a bot? if that will or wont count for going the sim iddle or not?
Techinically, Radegast is not a bot software, in my opinion it wouldn't be necessary to register an alt as a bot. You can keep the avatar logged in to chat with customers, for example, or get IM's from groups.


As I said before, I like Radegast because it allows auto-connecting, but it s not a perfect solution. Maybe it would be a good idea to contact Radegast developer and ask for some other options to help with this issue in particular; like forcing the avatar to stay in a region.
Amigo Uriza is offline   Reply With Quote
1 User Said Thanks:
Old 06-30-2012, 08:53 PM   #23 (permalink)
Senior Curmudgeon

*SLU Supporter*
 
Beebo Brink's Avatar
I'm the woman your mother warned you about.
 
Join Date: Jul 2007
Posts: 13,617
My Mood:
SL Join Date: October 2006
Client: v3 + Starlight
I set up KT's script on Friday and since then four meeroo pairs laid their nests right on schedule. As far as I'm concerned that's all the proof I need to justify thwarting the idle feature. I plan on keeping running for the foreseeable future.
Beebo Brink is online now   Reply With Quote
Old 06-30-2012, 09:17 PM   #24 (permalink)
That Bitch

*SLU Supporter*
 
Void's Avatar
Innocent as far as you know
 
Join Date: Nov 2011
Location: Online
Posts: 6,200
My Mood:
SL Join Date: late 04... that account is deleted now
of course now the root question is.... how do they synch up, and what's preventing it.

I can think of one ugly way offhand that they might work around that internally, but I'd love to know what it is they're doing that's being interfered with.
Void is offline   Reply With Quote
Old 06-30-2012, 09:40 PM   #25 (permalink)
Senior Member
 
Darien Caldwell's Avatar
Mayan Time Lord
 
Join Date: Apr 2008
Location: Cali
Posts: 1,993
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Quote:
Originally Posted by Void View Post
of course now the root question is.... how do they synch up, and what's preventing it.

I can think of one ugly way offhand that they might work around that internally, but I'd love to know what it is they're doing that's being interfered with.
I was kind of wondering myself. Idiling shouldn't affect timers unless they are running at sub-second rates. I certainly hope breedables aren't doing that.
Darien Caldwell is offline   Reply With Quote
Reply

Tags
bots

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On