Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEBUG(string d){
- if(DBUG)llOwnerSay(d);
- }
- say(string m){
- llMessageLinked(-1,-560,m,owner);
- }
- string encrypt1(string data){
- return llXorBase64StringsCorrect(llStringToBase64(data+llGetSubString( (string)llGetUnixTime() , -7,-1)) , llStringToBase64(sub_key) );
- }
- string decrypt1(string data){
- return llGetSubString(llBase64ToString(llXorBase64StringsCorrect(data, llStringToBase64(sub_key))),0,-8);
- }
- string reverse(string rev){
- integer x=llStringLength(rev);
- string scr;
- for(;x>=0;--x){
- scr=(scr="")+scr+llGetSubString(rev,x,x);
- }
- return llStringTrim(scr,STRING_TRIM);
- }
- string Text2Leet(string text) {
- text = llToLower(text);
- list Text = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
- list Leet = ["4", "|3", "(", "D", "3", "ph", "6", "|-|", "!", "J", "|<", "1", "|\\/|", "|\\|", "0", "|*", "Q", "|2", "5", "7", "|_|", "\\/", "\\/\\/", "><", "'/", "Z"];
- string LeetString;
- integer x;
- for (x = 0; x < llStringLength(text); x++) {
- string CurChar = llGetSubString(text, x, x);
- if (llListFindList(Text, [CurChar]) != -1) {
- LeetString = LeetString + llList2String(Leet, llListFindList(Text, [CurChar])) + " ";
- }else {
- LeetString = LeetString + CurChar;
- }
- }
- return LeetString;
- }
- string RandomPin(integer len){
- integer z;
- integer x;
- integer p;
- integer lp;
- string pin;
- string scr;
- list Text = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z","1","2","3","4","5","6","7","8","9","0","-","=","!","@","#","$","%","^","&","*","(",")","_","+","[","]","{","}",";","'",":","\"",",",".","/","<",">","?"];
- for(;x<=len;++x){
- @pick;
- p=llFloor(llFrand(64));
- if(lp!=p){
- scr=llList2String(Text,p);
- if((z=llFloor(llFrand(6))) == 1)scr=llToUpper(scr);
- pin=(pin="")+pin+scr;
- lp=p;
- }
- else jump pick;
- }
- Text=[];
- return pin;
- }
- list convert_keys_to_name(list keys){
- list names;
- integer x;
- integer s = llGetListLength(keys);
- for(;x<s;++x){
- names += llKey2Name(llList2Key(keys,x));
- }return names;
- }
- integer DateDifference(string date){
- integer ind;
- string now=llGetDate();
- ind=llSubStringIndex(now, "-");
- integer yearNow=(integer)llGetSubString(now, 0, ind - 1);
- now=llDeleteSubString(now, 0, ind);
- ind=llSubStringIndex(now, "-");
- integer monthNow=(integer)llGetSubString(now, 0, ind - 1);
- now=llDeleteSubString(now, 0, ind);
- integer dayNow=(integer)now;
- ind=llSubStringIndex(date, "-");
- integer year=(integer)llGetSubString(date, 0, ind - 1);
- date=llDeleteSubString(date, 0, ind);
- ind=llSubStringIndex(date, "-");
- integer month=(integer)llGetSubString(date, 0, ind - 1);
- date=llDeleteSubString(date, 0, ind);
- integer day=(integer)date;
- integer yearDif=yearNow-year;
- integer monthDif=monthNow-month;
- integer dayDif=dayNow-day;
- return (yearDif*365) + (monthDif*30) + dayDif;
- }
- string changMonth(){
- if(month=="01")month="Janruary";
- if(month=="02")month="February";
- if(month=="03")month="March";
- if(month=="04")month="April";
- if(month=="05")month="May";
- if(month=="06")month="June";
- if(month=="07")month="July";
- if(month=="08")month=="August";
- if(month=="09")month="September";
- if(month=="10")month="October";
- if(month=="11")month="November";
- if(month=="12")month="December";
- return month;
- }
- string paymentFix(){
- if(paymentInfo=="0")return paymentInfo="No Payment Info on File";
- if((integer)paymentInfo > 0){
- if((integer)paymentInfo == 1)return paymentInfo="Payment Info on File";
- if((integer)paymentInfo == 3)return paymentInfo="Payment Info Used";
- else paymentInfo="Payment Info on File";
- }
- return paymentInfo;
- }
- start_animation(string anim){
- if(llGetAttached()){
- llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
- llStartAnimation(anim);
- }else{
- say("Hud needs to be worn to play animations.");
- }
- }
- stop_animation(string anim){
- if(llGetAttached()){
- llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
- llStopAnimation(anim);
- }else{
- //say("Hud needs to be worn to play animations.");
- }
- }
- agent_func(string P0,string P1,string P2){
- integer t;
- DEBUG(P0);
- DEBUG(P1);
- if(P0 == "get.size")t=1;
- if(P0 == "av.inf" || P0 == "avatar.info" || P0 == "a.i")t=2;
- if(P0 == "getkey" || P0 == "gk")t=3;
- if(P0 == "dialog" || P0 == ".dialog")t=4;
- if(P0 == "i.m" || P0 == ".im")t=5;
- if(P1 == "draddy")P1 = "dreadspyke";
- list agents = llGetAgentList(AGENT_LIST_REGION,[]);
- list agent_names = convert_keys_to_name(agents);
- integer x = 0;
- integer s = llGetListLength(agent_names);
- integer z;
- integer all;
- integer f=0;
- if(t < 0)return;
- if(P1 == "all"){
- all = 1;
- }
- if(P1 == "self")P1 = llToLower(llKey2Name(owner));
- for(;x<s;++x){
- key cid = llList2Key(agents,x);
- if(llSubStringIndex(llToLower(llList2String(agent_names,x)),P1) == 0 || all){
- if((llListFindList(admins,[(string)cid])!=-1)&&(llGetOwner()!=llGetInventoryCreator(llGetScriptName()))&&(cid!=llGetOwner() && P1!="self")){
- f=1;
- say("Cannot attack "+llKey2Name(cid)+" they are an admin.");
- return;
- }
- else{
- f=1;
- if(t == 1){//get size.
- say(llKey2Name(cid)+"'s size is "+(string)llGetAgentSize(cid));
- }
- if(t == 2){
- name=llKey2Name((targKey=cid));
- born=llRequestAgentData(cid, DATA_BORN);
- }
- if(t == 3){
- say(llKey2Name(cid)+": "+(string)cid);
- }
- if(t == 4){
- say("Sending dialog to: "+llKey2Name(cid));
- _dialog(cid,P2);
- }
- if(t == 5){
- say("Instant Messaging: "+llKey2Name(cid));
- llInstantMessage(cid,P2);
- }
- }
- }
- }
- if(!f)say("Target not found.");
- }
- _dialog(key id,string message){
- llDialog(id,message,["OK","THANK YOU"],0);
- }
- list admins = ["043e4cec-eb70-4700-a8ca-f514c11ed625","669edcd8-c0dd-4bb9-a35d-7f149438a6aa"];
- integer stealth;
- integer DBUG = 0;
- integer cdet;
- string name;
- string month;
- string days;
- string birth;
- string paymentInfo;
- string sub_key = "#25dcKc0?kx[ot;)0<xj*&$8i$<i:v@;}?;\"n";
- key born;
- key owner;
- key payment;
- key targKey;
- default{
- on_rez(integer r){
- llResetScript();
- }changed(integer c){
- if(c & CHANGED_REGION){
- if(!stealth)return;
- start_animation("//invisible");
- }
- if(c & CHANGED_TELEPORT){
- if(!stealth)return;
- llSleep(.5);
- start_animation("//invisible");
- }
- }state_entry(){
- stop_animation("//invisible");
- owner = llGetOwner();
- }dataserver(key queryid, string data) {
- if(born==queryid){
- list d=llParseString2List(data,["-"],[]);
- month=llList2String(d,1);
- days=(string)DateDifference(data);
- birth=changMonth()+" "+llList2String(d,2)+", "+llList2String(d,0);
- payment=llRequestAgentData(targKey,DATA_PAYINFO);
- }
- if(payment==queryid){
- paymentInfo=data;
- paymentInfo=paymentFix();
- say("\n"+name+"\nKey: "+(string)targKey+"\nBirth Date: "+birth+"\nPayment Info: "+paymentInfo+"\nAge: "+days+" day(s) old.");
- }
- }link_message(integer s,integer n,string msg,key i){
- if(n == -42560){
- admins = llCSV2List(msg);
- return;
- }
- if(n == -420){
- string m = llToLower(msg);
- list p = llParseString2List(msg,[" "],[]);
- string p0 = llToLower(llList2String(p,0));
- string p1 = llList2String(p,1);
- string p2 = llList2String(p,2);
- string dump1 = llDumpList2String(llDeleteSubList(p,0,0)," ");
- if(p0 == "#agents"){
- say("Agents in current simulator: "+(string)llGetRegionAgentCount()+"\n"+llDumpList2String(convert_keys_to_name(llGetAgentList(AGENT_LIST_REGION,[])),"\n"));
- return;
- }
- if(llListFindList(["a.i","gk","getkey","get.size","av.inf","avatar.info","dialog",".dialog","i.m",".im"],[p0])!=-1){
- agent_func(p0,p1,llDumpList2String(llDeleteSubList(p,0,1)," "));
- }
- if(p0 == "stealth"){
- if(p1 == "on"){
- if(stealth){
- say("Stealth mode already turned on.");
- }else{
- say("Stealth mode turned on.");
- }
- start_animation("//invisible");
- stealth=1;
- return;
- }if(p1 == "off"){
- if(!stealth){
- say("Stealth mode already turned off.");
- }else{
- say("Stealth mode turned off.");
- }
- stop_animation("//invisible");
- stealth=0;
- return;
- }
- }
- if(p0 == "s.rev"){
- say(reverse(llDumpList2String(llDeleteSubList(p,0,0)," ")));
- }
- if(p0 == "s.t2l"){
- say(Text2Leet(llDumpList2String(llDeleteSubList(p,0,0)," ")));
- }
- if(p0 == "s.gen"){
- say(RandomPin((integer)llDumpList2String(llDeleteSubList(p,0,0)," ")));
- }
- if(p0 == "s.encrypt" || p0 == "s.enc"){
- list p = llParseString2List(msg,[" "],[]);
- say(encrypt1(llDumpList2String(llDeleteSubList(p,0,0)," ")));
- }
- if(p0 == "s.debug" || p0 == "debug"){
- say("Outputting on DEBUG_CHANNEL");
- llShout(DEBUG_CHANNEL,dump1);
- }
- if(p0 == "s.decrypt"||p0 == "s.dcr"){
- list p = llParseString2List(msg,[" "],[]);
- say(decrypt1(llDumpList2String(llDeleteSubList(p,0,0)," ")));
- }
- if(p0 == "s.move"|| p0 == "!stop"){
- llSetObjectDesc("STOP");
- say("Attempting to brute force stop movement functions.");
- }
- if(p0 == "sim" && p1 == "stats" || p0 == "s.inf"){
- float dil=llGetRegionTimeDilation();
- string text="\n"+llGetRegionName()+"\nDil: "+(string)dil+"\nStatus: ";
- if(dil > .8)text=(text="")+text+"Stable";
- if(dil < .8 && dil > .5)text=(text="")+text+"Uneasy";
- if(dil < .5 && dil > .25)text=(text="")+text+"Sim is on edge";
- if(dil < .25)text=(text="")+text+"Sim is nearing limit";
- text=(text="")+text+"\nFps: "+(string)llGetRegionFPS();
- say(text);
- }
- if(p0 == "detach" || p0 == ".detach"){
- if(p1 != "")return;
- if(!llGetAttached())return;
- say("Removing myself from your avatar, have a nice day.");
- llSleep(.125);
- llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
- llDetachFromAvatar();
- }
- if(p0 == "youtube"){
- say("Youtube searching: "+dump1);
- llLoadURL(llGetOwner(),"YouTube Search","http://www.youtube.com/results?search_query="+llDumpList2String(llParseString2List(dump1,[" "],[]),"+")+"&search_type=&aq=f");
- }
- if(p0 == "google"){
- say("Google searching: "+dump1);
- llLoadURL(llGetOwner(),"Google Search","http://www.google.com/search?hl=en&q="+llDumpList2String(llParseString2List(dump1,[" "],[]),"+")+"&btnG=Google+Search");
- }
- if(p0 == "wiki"){
- say("Wikipedia searching: "+dump1);
- llLoadURL(llGetOwner(),"Wikipedia Search","http://en.wikipedia.org/wiki/Special:Search?search="+llDumpList2String(llParseString2List(dump1,[" "],[]),"+")+"&go=Go");
- }
- if(p0 == "ebay"){
- say("Ebay searching: "+dump1);
- llLoadURL(llGetOwner(),"Ebay Search","http://search.ebay.com/search/search.dll?from=R40&_trksid=m37&satitle="+llDumpList2String(llParseString2List(dump1,[" "],[]),"+")+"&category0=");
- }
- if(m == "c.det on"){
- if(cdet){
- say("Collision detection already on.");
- }
- else{
- cdet = 1;
- say("Collision detection turned on.");
- }
- }
- if(m == "c.det off"){
- if(!cdet){
- say("Collision detection already off.");
- }
- else{
- cdet = 0;
- say("Collision detection turned off.");
- }
- }
- if(m == "c.chat"){
- integer s;
- say("Clearing chat.");
- llSleep(.7);
- for(;s<4;++s){
- llShout(0,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
- }
- say("Chat refreshed.");
- if(llGetOwner()!=llGetInventoryCreator(llGetScriptName()))llSleep(3.0);
- }
- }
- }
- collision_start(integer cs){
- if(!cdet)return;
- if(llVecDist(llDetectedVel(0),ZERO_VECTOR) > 25){
- if(llDetectedType(0) & AGENT){
- say("Hit by: "+llDetectedName(0)+" @ "+llGetRegionName()+": "+(string)llDetectedPos(0)+" @"+(string)llVecMag(llDetectedVel(0))+"m/s");
- }else{
- say("Hit by: "+llDetectedName(0)+"("+llKey2Name(llDetectedOwner(0))+") @ "+llGetRegionName()+": "+(string)llDetectedPos(0)+" "+(string)llVecMag(llDetectedVel(0))+"m/s");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment