User:Damian Darkwyr

From Second Life Wiki
Revision as of 10:47, 14 March 2011 by Damian Darkwyr (talk | contribs)
Jump to navigation Jump to search

I made these contributions.... lol


Specific Contents Giver random giver script

-s8OpenRelay- WHAT IS THE OpenRelay System?

The OpenRelay system is a bounce(proxy) server that bypasses the restrictions set by hosting providers on the required ports for LSL HTTP IN. Linden Lab, by their own admittal think that the restriction on ports is stupid. Kelly Linden has acknowledged on the scripter's email list that this retardation exists but will say no more on the matter except that it's "unfortunate".

What is it exactly that is being blocked? When you open a website with a shared host 90% of the time said host will not allow fsockopen connections on ports 12046 and 12043. They will usually only allow ports 80 and 443. This is an issue because Linden Lab requires ports 12046 and 12043. Else failure to connect and well you end up with a very angry scriptor.

So what are your alternatives? Well it means that if you want your awesome new web page to send info to sl you have to do one or more of the following, Stop using http in from web pages. but that is what we are doing isnt it. Use Email instead. which is slower than molasses. Pay for a VPS or Dedicated server. which could run you upwards of 75-100x dollars a month. add your own alternative here. or.... use s8OpenRelay.

OpenRelay is the cheapest and quickest answer. Its FREE and allows your pages to connect and fire messages to second life without lag, without delay, and without paying hundreds of dollars a month.

OpenRelay acts as a basic proxy for your website to connect to your second life scripts. Your page sends a request to the OpenRelay server and OpenRelay sends the message for you. Either on port 12046 or port 12043 which ever you have configured your prims inworld for.

This removes the headache worry of weither or not your webscripts are going to work with your httpin lsl scripts. They will always work with OpenRelay.


OpenRelay is brought to you by the creators of Carbon8 Android2SL Remote. The first android application that allows you to send AND recieve messages from second life on your android devices. And the Uriel Core AIO(Carbon8) Utility Device which allows you to control your weapons play from anywhere in the world without the teather of your computer.


Developer Damian Darkwyr has multiple patches in production with TPV compliant clients, as well as helped develop many open source projects for Second Life. A college student at the University of Phoenix majoring in Information Systems and Technology with a focus in Software Engineering.

WE HAVE DECIDED TO LAUNCH THIS SERVICE FOR FREE. TO HELP THE MANY PROGRAMMERS OUT THERE WHO COULD BE CAPABLE OF DOING SO MUCH MORE.

􀀀 if this link is invalid we have moved. Please check Damian Darkwyr's profile for the new link.



Usage of the OpenRelay System is simple. Here is a quick and dirty tutorial to get you started.


Step 1.

Use a link similar to the one below in an http request in your webpage. ex. http://s3kshun8.dyndns-remote.com/s8openrelay.php?url=http://sim4414.agni.lindenlab.com:12046/cap/39cb22a8-4e71-97b9-df84-1b688d696162&mes=test


a simple php example.

<?php $returnedstring = file_get_contents("http://s3kshun8.dyndns-remote.com/s8openrelay.php?url=http://sim4414.agni.lindenlab.com:12046/cap/39cb22a8-4e71-97b9-df84-1b688d696162&mes=test") or die("couldnt read file"); echo $returnedstring; ?>

the main url is our personal servers. http://s3kshun8.dyndns-remote.com/s8openrelay.php

? <----- means you are sending arguments

url is your second life prim's url. this is retrieved by using llRequestURL();

mes is all of the data you want to send to that prim. be creative.

THE STRING SENT IN CAN BE DIVIDED ANYWAY YOU LIKE AND PROCESSED LSL SIDE HOWEVER YOU LIKE.

Please enjoy the service if you need help feel free to ask. <lsl> /*Hippo Vendor Crowd Discount Plugin by Damian Darkwyr

*
*Create prim.
*Place this script inside prim.
*Link this prim to your Hippo Vendor
*DONE
*/

float setting = 0.5;//change this to effect the amount of discount. it will be 0.5*0.numberofscanned avatars integer i; integer fil; list keys; key buyer; default {

   state_entry()
   {
       llSetText("Earn a (0.5*x) discount for each person you get within 25m of this vendor when you make your purchase.",<1,1,1>,1);
       llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);
   }
   run_time_permissions(integer p)
   {
       if(p & PERMISSION_DEBIT)
       {
           
       }else
       {
           llResetScript();
       }
   }
   link_message(integer s,integer r,string str,key id)
   {
       if(r == -147900)
       {
           list d = llParseString2List(str,["^"],[]);
           buyer = (key)llList2String(d,0);
           llSetObjectDesc(llList2String(d,2));
           llSensor("","",AGENT,25,PI);
       }
   }
   sensor(integer x)
   {
       keys = [];
       i = 0;
       do
       {
           fil = llListFindList(keys,[(string)llDetectedKey(i)]);
           if(fil == -1)
           {
               keys += [(string)llDetectedKey(i)];
           }
           i++;
       }while(i < x);
       string avcount = "0."+(string)llGetListLength(keys);
       float pS = setting * (float)avcount;
       if(pS >= 0.86)pS = 0.85;
       integer pricepaid = (integer)llGetObjectDesc();
       float client_rake = (float)pricepaid * pS;
       integer owner_rake = pricepaid - (integer)client_rake;
       pricepaid = pricepaid - owner_rake;
       //llOwnerSay((string)pricepaid);
       llInstantMessage(buyer,"thank you for bringing a crowd. Here is you discount.");
       llGiveMoney(buyer,pricepaid);
   }
   no_sensor()
   {
       
   }

} </lsl>


-Key2Name- <lsl> /* PHP-LSL HTTPRequest Key2Name by: Damian Darkwyr This script is OPEN SOURCE Please keep it that way. I only ask that I get my cookies. ;)


This can also be called from any webscript. Or Mobile app to translate a key to a name.



What are cookies? Credits. I made this. I expect to be given credit as the creator. You can use it however you want. But please dont claim you wrote it.

  • /



/*PHP SOURCE <?php $inkey = $_GET["key"]; $f = file_get_contents("http://search.secondlife.com/web/search/people/?q=".$inkey) or die("could not find server"); $search = "<a href=\"http://my.secondlife.com/"; $search2 = "\">"; $a1 = explode($search,$f); $f = $a1[1]; $a1 = explode($search2,$f); $f = $a1[0]; echo $f; ?>

  • /

default {

   touch_start(integer x)
   {
       integer i = 0;
       do{
           llHTTPRequest("http://www.nanocat.co.cc/sl/key2name.php?key="+(string)llDetectedKey(i),[],"");
           i++;
       }while(i < x);
   }
   http_response(key id,integer s,list data,string body)
   {
       llOwnerSay("Your Name as detected by HTTPRequest is: "+body);
   }

}

</lsl>