Updated Hyperica gate scripts

These scripts are for people who are thinking to themselves — now that Maria is hiring a researcher and putting them to work on updating the Hyperica directory, wouldn’t it be nice if I could just grab content from there for my own gates.

Well it would be nice, and yes you can.

For example, Hyperica has a snapshot of each destination, along with its hypergrid address. Some people might want to pull down that image to use as a background for their own hypergate system. Now, you can download the image manually, then upload it to your grid, then add it to the object.

But Hyperica has over 300 destinations — and new ones being added all the time. And old ones go down all the time, too, or change their locations. Just setting up the gates in the first place would be a nightmare, and then keeping them up to date would be a struggle.

And I have a solution. This is a script that automatically goes to the Hyperica website and downloads the region you want. That is, if you want a region in a particular category. Say, you want the highest-rated region in the shopping category. Or the second highest-rated. Or the fourth region in the grid welcome regions category. You could do that. You can set up a little hyperport with, say, the top ten shopping destinations, and if you touch it, it will automatically update itself. So all you have to do to keep it current is touch it once in a while. Or you can add a timer, if you’re an advanced user. Just don’t update it too often — if you do, you might break our servers, and we don’t have the money yet to set up an actual database to handle this stuff.

The way it works is that you change the description line of the object, touch it, and it’s programmed. No messing around with the script required — unless you want to.

Here are the lookup categories: http://www.hyperica.com/lookup/

For example, http://www.hyperica.com/lookup/?cat=1&region=5&sort=2 Would show the fifth most recent region in the Art and Culture category. To test it, just paste the link into your browser. You should get the computer-friendly info page for that destination. (I haven’t figured out how to get the footers and headers not to show up.)

Here’s the script to download. It’s a text file: Snapshot from Hyperica Lookup Script

LBSA on OSgrid snapshot in-world

Put it on a box with a Z-size of 0.010 meters, Top shear of Y=0.35, and Slice Begin and End of E=0.500.

The script uses two commands unique to OpenSim. First, it pulls an image down off the Web and puts it on the prim, without needing media-on-a-prim. So it works great with old viewers. And, second, it puts text right on the prim as well, because OpenSim has a function to write on a prim surface, in case the hanging text over the object isn’t visible.

Automatic hypergate

You can put the destination snapshot in a nice frame if you want — mine is just hanging in the air right now, looking stupid. Some day, I swear on my mother’s grave, I will make it look better.

The matching gate to the snapshot script works the same way. You put the lookup URL in the description, and drop the script onto any object you’d like to be the gate. When you touch the object, it updates itself. When you collide with the object, it triggers the teleport.

Here’s the script to download: Snapshot from Hyperica Lookup Script

I have the script in a typical watery animated circle, lying flat on the ground. It’s on a raised platform, though, so people don’t walk into it accidentally.

Hypergate with snapshot setup

You can see the full setup above. Nothing fancy.

When I step on the gate, a teleport windows pops up, offering to take me to the destination on the target grid. I can have it be automatic as well, without the confirmation window. The trick is in the first part of the script, the “PerformTeleport” section.

To teleport using the map: llMapDestination(SimAddress, LandingPoint, LookAt);

To teleport instantly without using the map: osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt );

In the script I uploaded, the second option has a double slash in front of it, meaning that it’s inactive. If your region has OpenSim scripts enabled and the threat level set appropriately, you can remove the slashes, and put them in front of the first option. If your region is hosted by a vendor, ask them to set the threat level so as to allow the osTeleportAgent function. It’s often not enabled on public grids because people can abuse it.

Imagine walking across a floor and stepping on an otherwise totally innocuous spot and being teleported to a nude lesbian beach grid. No, scratch that, who would mind? Make that a teleport to a spam grid that tries to sell you variable annuities. Oh, the horror, the horror!

You can also use the osTeleportAgent command to create bullets and swords and other weapons that, when touching an avatar, send them straight to hell. Bwa ha ha ha.


Maria Korolov

Maria Korolov is editor and publisher of Hypergrid Business. She has been a journalist for more than twenty years and has worked for the Chicago Tribune, Reuters, and Computerworld and has reported from over a dozen countries, including Russia and China.