Jump to content

Ackley Bing

Resident
  • Posts

    223
  • Joined

  • Last visited

Everything posted by Ackley Bing

  1. Aw Thank You Rolig Hey, with enough invention we'll be getting vehicles with 4 different wheels!
  2. Yes. Circular is what i'm looking for because my of Next Idea, which, btw, is sacret, for now. There is still a bug in this here. When you click thru... it's producing [a][z] and [a][y][z].
  3. In your case, maybe having more than 1 script is the way to go. You have a main script in the hud/object. And sell 'add-on' scripts seperately. Each one of these scripts has it's own particle settings. That way you might make more L$
  4. Thanks again I gave both of you credit in my final posting on the wiki https://wiki.secondlife.com/wiki/User:Ackley_Bing/List2DialogButtons
  5. The Formula was 100% correct!! But not needed because SL has % !!! :catlol:
  6. Your wrap does the trick. Thanks to everyone here is what I finally came up with. list Gdummylist=["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"];integer Gindex;list List2DialogButtons(list chain, integer i){ list buttons; integer j=llGetListLength(chain); if (j>12) buttons = ["<<",llList2String(chain,(i+9)%j),">>"] + wrap(chain,(i+6)%j,(i+8)%j) + wrap(chain,(i+3)%j,(i+5)%j) + wrap(chain,i,(i+2)%j); else { integer k; do buttons+=llList2List(chain,k,k); while(++k<j); } return buttons;}list wrap(list c, integer x, integer y){ if(x<=y) return llList2List(c, x, y); return llList2List(c,x,-1)+llList2List(c,0,y);}default{ state_entry() { llListen(1,"",llGetOwner(),""); } touch_start(integer index) { Gindex=0; llDialog(llGetOwner()," ",List2DialogButtons(Gdummylist,Gindex),1); } listen(integer channel, string name, key id, string message) { if(message=="<<"|message==">>") { integer j=llGetListLength(Gdummylist); if (message=="<<") Gindex=(Gindex-10)%j; else if (message==">>") Gindex=(Gindex+10)%j; llDialog(llGetOwner()," ",List2DialogButtons(Gdummylist,Gindex),1); } else { integer find_index=llListFindList(Gdummylist,[message]); if(~find_index) { llOwnerSay(message); //actions... } } }}
  7. Thanks Nova This a lot less crazy yet i'm still getting button ordering like [a] [y] [z].
  8. Yes. Also I made the script seamlessly connect the end with the beginning, with no gaps For example: x,y,z,a,b,c,d,e... instead of just x,y,z. Ordering is fine: [a] [b] [c][d] [e] [f][g] [h] [i][<] [j] [>][j] [k] [l][m] [n] [o][p] [q] [r][<] [s] [>] Up until the end, where it does this: [s] [t] [u][v] [w] [x][a] [y] [z][<] [b] [>] Notice the buttons, a,y,z. The problem is in the wrap(). I will fix it with enough trial and error... I am no mathematician. I was hoping there might be some standard math equation to do this instead of my crazy formula. integer wrap(integer x,integer max){return (((x<0)*(x+max))+((x>=0&&x<max)*x)+((x>=max)*(x-max)));}
  9. I made this script which resulted in me having to make a wrap() function for numbers that exceed a maximum. I'm not a mathematician, but I wrote this crazy formula myself. It seems to work, but now that I almost finished with my script, it seems to be giving incorrect results. Does anyone know of a standard math equation to do the same thing? Or how I can fix this formula? // List2DialogButtons() for llDialog use // example: llDialog(id,"",List2DialogButtons(Gdummylist,Gindex),1); // Uses "<<" & ">>" dialog buttons for navigation list Gdummylist=["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 Gdummylist=["1","2","3","4","5","6","7","8","9","10","11","12"]; integer Gindex; list List2DialogButtons(list chain, integer i) { list buttons; integer j=llGetListLength(chain); if (j>12) buttons= ["<<"] +llList2List(chain,wrap(i+9,j),wrap(i+9,j)) +[">>"] +llList2List(chain,wrap(i+6,j),wrap(i+8,j)) +llList2List(chain,wrap(i+3,j),wrap(i+5,j)) +llList2List(chain,wrap(i,j),wrap(i+2,j)); else { integer k; do buttons+=llList2List(chain,k,k); while(++k<j); } return buttons; } integer wrap(integer x,integer max){return (((x<0)*(x+max))+((x>=0&&x<max)*x)+((x>=max)*(x-max)));} default { state_entry() { llListen(1,"",llGetOwner(),""); } touch_start(integer index) { Gindex=0; llDialog(llGetOwner()," ",List2DialogButtons(Gdummylist,Gindex),1); } listen(integer channel, string name, key id, string message) { if(message=="<<"|message==">>") { integer total=llGetListLength(Gdummylist); Gindex=Gindex+((message==">>")*9)-((message=="<<")*9); if(Gindex>=total)Gindex=Gindex-total; else if(Gindex<0)Gindex=total-Gindex-2; llDialog(llGetOwner()," ",List2DialogButtons(Gdummylist,Gindex),1); } else { integer find_index=llListFindList(Gdummylist,[message]); if(~find_index) { //Gindex=find_index; //Action(Gindex); } } } }
  10. You should use 1 script, unless you know that multiple scripts are going to be more effective or efficient. If I was going to make what you are talking about, I'd only use 1 script.
  11. Madelaine McMasters wrote: TV was a forbidden object in my home until very recently. Even though I now own a very large HDTV, it's not connected to an antenna and I don't have cable. I sometimes watch movies on it, but mostly watch TED talks and YouTube videos of puppies and kittens. I don't mind at all that TV is forbidden here. ;-). Realy... ?!?! My SL *is* my only TV. In RL, i would totally die if it was banned. And then i would have to Protest.
  12. Pamela Galli wrote You have been told why: it is an anti-griefing tool. Throw away alts are not likely to have given their real life info to LL. You grief your own potential, if there is any grief at all.
  13. The Vibe of Vegas 181.fm seems to be popular with a lot of places i've been to in SL, so I even use it on my own land. It does has some ads, but not too bad
  14. SL is the stepping stone to anything that will replace it imho. You may be out of step if you're intending to do anything with Sansar, if you arent familiar with the "late' SL.
  15. Your private parts are also not so private in SL. Does that mean we should require you to wear see-thru underpants? :smileylol:
  16. I agree with you tish. It totally as if someone wanted accounts with financial data to be publicly identified to anyone #&$^ Why did they think there is such a need to expose everyone wholesale? When a transaction is processed, the information is already checked by the system. Why expose everyone more than that? Misguided policy.
  17. Recent Avatar Scanner by Ackley Bing. Put this script in a prim. Wear the object as a HUD. Touch it to see a list of recently collected names. Stores up to 100 names. Adjust 100 to 1000 or whatever you want, just beware of script memory use or you will get a Stack Heap Collision. Modify it to suit your particular use in another Hud, weapon, or whatever you want. <3 --Ackley Bing // Recent Avatar Scanner by Ackley Bing // PUt this in a prim. Wear as a HUD. // Touch it to see your current list of Recent Avatars list RecentAgents; integer MaxRecent=100; Process_Region_Agents() { list RegionAgents=llGetAgentList(AGENT_LIST_REGION,[]); integer TotalAgentsInRegion=llGetListLength(RegionAgents); integer i; for(i=0;i<TotalAgentsInRegion;i++) { integer Test; key Agent = llList2Key(RegionAgents, i); Test=llListFindList(RecentAgents,[Agent]); if (Test == -1 && Agent!=llGetOwner() ) { //llOwnerSay("NEW AVATAR: secondlife:///app/agent/" + (string)Agent + "/inspect added to your RECENT AVATAR list"); RecentAgents += (key)Agent; if (llGetListLength(RecentAgents)>MaxRecent) RecentAgents=llDeleteSubList(RecentAgents,0,0); llSleep(0.03); } } llSetTimerEvent((float)llGetListLength(RecentAgents)/8.0); } default { state_entry() { llSetTexture("6a571ff9-efba-7327-7bc3-0cf3b98bae37",4); llSetTimerEvent(5.0); } timer() { llSetTimerEvent(0.0); Process_Region_Agents(); } touch_start(integer index) { integer TotalRecentAgents=llGetListLength(RecentAgents); llOwnerSay ((string)TotalRecentAgents+" recent avatars:"); llSleep(0.03); if (TotalRecentAgents) { integer i=0; for (i;i<TotalRecentAgents;i++) { key recentagentskey=llList2Key(RecentAgents,i); llOwnerSay ("secondlife:///app/agent/" + (string)recentagentskey + "/inspect "); llSleep(.03); } } } attach(key id) { if (id) llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS ); } changed(integer change) { if ( change & CHANGED_OWNER ) llResetScript(); } run_time_permissions(integer perms) { if ( perms & PERMISSION_TAKE_CONTROLS ) llTakeControls(CONTROL_BACK, TRUE, TRUE); } }
  18. I love this thing. =D I can use it to write a simple working script, on the fly. It's not just a learning tool!
  19. It's been "closed-off" for a week now. http://wiki.secondlife.com/wiki/Special:RecentChanges I hope it's going to open again. I have to edit my most recent post to fix a mistake :matte-motes-smitten:
  20. A 2 prim HUD targets nearby players names, profiles and user key Save this into the root prim of 2 linked prims. Modify it to suit your particular use in another Hud, weapon, or whatever you want. <3 Ackley // Target Crosshair HUD // by Ackley Bing // Save this script into the root prim of 2 linked prims // // This is based on my Basic Target Scanner HUD http://wiki.secondlife.com/wiki/Basic_Target_Scanner_HUD // Now you get a crosshair that follows your target // thanks to // HUD Dots Radar http://wiki.secondlife.com/wiki/HUD_Dots_Radar integer AgentListindex; key HUDtarget; string showName; string legName; string dispName; key photoReq; string missingtexture="1a6e02aa-23a8-7a5f-0525-44d724144f89"; float gFOV = 1.7320508075688774; vector gOffScreen = <-1000., -1000., -1000.>; integer HUDattachpoint=ATTACH_HUD_CENTER_1; integer AgentCount() { list AgentCountList; integer ownerindex; integer num_agents; AgentCountList=llGetAgentList(AGENT_LIST_REGION,[]); ownerindex=llListFindList( AgentCountList, (list)llGetOwner() ); AgentCountList=llDeleteSubList( AgentCountList, ownerindex, ownerindex ); num_agents = llGetListLength(AgentCountList); return num_agents; } key Identify(integer selected) { list IdentifiedAgentList; integer ownerindex; key IdentifiedAgent; list nameParts; IdentifiedAgentList=llGetAgentList(AGENT_LIST_REGION,[]); ownerindex=llListFindList( IdentifiedAgentList, (list)llGetOwner() ); IdentifiedAgentList=llDeleteSubList( IdentifiedAgentList, ownerindex, ownerindex ); if ( llGetListLength(IdentifiedAgentList)==0 ) { AgentListindex = 0; llSetText(" ", <1,1,1>, 1.0); llSetTexture(missingtexture, 0); return NULL_KEY; } else { if ( selected>llGetListLength(IdentifiedAgentList) ) { AgentListindex = 0; IdentifiedAgent = llList2Key(IdentifiedAgentList, 0); } else IdentifiedAgent = llList2Key(IdentifiedAgentList, selected); legName = llKey2Name(IdentifiedAgent); nameParts = llParseString2List(legName,[" "],[]); if (llList2String(nameParts, 1) == "Resident") legName = llList2String(nameParts, 0); showName = legName; dispName = llGetDisplayName(IdentifiedAgent); if (dispName) if (llToLower(dispName) != llToLower(legName)) llSetText(showName+"\n(" + dispName + ")\n"+(string)IdentifiedAgent, <1,1,1>, 1.0); else llSetText(showName+"\n"+(string)IdentifiedAgent, <1,1,1>, 1.0); llOwnerSay("("+(string)(AgentListindex+1)+"/"+(string)(AgentCount()) +") Current Target: secondlife:///app/agent/" + (string)IdentifiedAgent + "/inspect " + (string)IdentifiedAgent); photoReq=llHTTPRequest("http://world.secondlife.com/resident/"+(string)IdentifiedAgent,[],""); return IdentifiedAgent; } } UpdateCrosshair(key lockedtarget) { if (lockedtarget!=NULL_KEY) { vector cPos; rotation cRot; vector myPos; vector targetPos; float dist; vector localhudpos; vector childPos; string crosshairtext; list SuspectList; integer lockedtargetindex; SuspectList=llGetAgentList(AGENT_LIST_REGION,[]); lockedtargetindex=llListFindList( SuspectList, (list)lockedtarget ); if (~lockedtargetindex) { cPos = llGetCameraPos(); cRot = llGetCameraRot(); myPos = llGetPos(); targetPos = llList2Vector(llGetObjectDetails(lockedtarget,[OBJECT_POS]),0); dist = llRound(llVecDist(myPos, targetPos)); localhudpos = llGetLocalPos(); localhudpos = <localhudpos.z, localhudpos.y, localhudpos.x>; childPos = Region2HUD(targetPos + <0,0,0.5>, cPos, cRot); if (dispName) if (llToLower(dispName) != llToLower(legName)) crosshairtext = showName+"\n( " + dispName + " )\n"+(string)dist+"m"; else crosshairtext = showName+"\n"+(string)dist+"m"; if (childPos!=gOffScreen) llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,childPos-localhudpos,PRIM_COLOR,ALL_SIDES,llVecNorm(<dist,llAbs(64-(integer)dist),0>),1,PRIM_TEXT,crosshairtext,llVecNorm(<dist,llAbs(64-(integer)dist),0>),1]); else llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,<.02,0,0>,PRIM_COLOR,ALL_SIDES,llVecNorm(<0,0,0>),0,PRIM_TEXT,"",llVecNorm(<0,0,0>),0]); } else { llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,<.02,0,0>,PRIM_COLOR,ALL_SIDES,llVecNorm(<0,0,0>),1,PRIM_TEXT,"",llVecNorm(<0,0,0>),0]); llSetTimerEvent(0.0); } } else { llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,<.02,0,0>,PRIM_COLOR,ALL_SIDES,llVecNorm(<0,0,0>),0,PRIM_TEXT,"",llVecNorm(<0,0,0>),0]); llSetTimerEvent(0.0); } } vector Region2HUD(vector objPos, vector camPos, rotation camRot) { objPos = (objPos - camPos) * (ZERO_ROTATION / camRot); objPos = <-objPos.y, objPos.z, objPos.x>; float Xcrosshair = (objPos.x * gFOV) / objPos.z; if (Xcrosshair > -3. && Xcrosshair < 3.) { float Ycrosshair = (objPos.y * gFOV) / objPos.z; if (Ycrosshair > -1. && Ycrosshair < 1.) { float Zcrosshair = (objPos.z - 2) / objPos.z; if (Zcrosshair > -1. && Zcrosshair < 1.) return <Ycrosshair / 2., -Xcrosshair / 2.,0>; } } return gOffScreen; } default { state_entry() { AgentListindex=0; HUDtarget=NULL_KEY; llSetScale(<0.1, 0.15, 0.1>); llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <2.0, 0.5, 1.0>, <0.0, 0.0, 0.0>, PRIM_ROT_LOCAL, <0.000000, -0.707107, 0.000000, 0.707107>, PRIM_COLOR, 0, <1.0,1.0,1.0>, 1.0, PRIM_COLOR, 1, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 3, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 2, <1.0,1.0,1.0>, 0.0, PRIM_COLOR, 4, <1.0,1.0,1.0>, 0.0]); llSetTexture(missingtexture, 0); llRotateTexture(270.0*DEG_TO_RAD,0); llSetText("", <0.0, 1.0, 0.0>, 1.0); llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,<.02,0,0>,PRIM_COLOR,ALL_SIDES,llVecNorm(<1,1,1>),0,PRIM_SIZE,<0.075,0.075,0.075>,PRIM_TEXT,"",llVecNorm(<0,0,0>),0,PRIM_TEXTURE, ALL_SIDES, "3e86b422-b3a9-c42d-bb87-044279cd4fd5", <1,1,1>, <0,0,0>, 0.0]); llSetTimerEvent(0.0); llRequestPermissions(llGetOwner(),PERMISSION_ATTACH|PERMISSION_TAKE_CONTROLS|PERMISSION_TRACK_CAMERA); } touch_start(integer n) { if ( llGetAttached() ) { integer AgentTotal; AgentTotal = AgentCount(); AgentListindex=AgentListindex+(llDetectedTouchFace(0)==1)-(llDetectedTouchFace(0)==3); AgentListindex = ((AgentListindex<0)*(AgentTotal-1))+((AgentListindex>=0)*(AgentListindex*(AgentListindex!=AgentTotal))); HUDtarget=Identify(AgentListindex); llSetTimerEvent(0.1); } } timer() { UpdateCrosshair(HUDtarget); } http_response(key request_id, integer status, list metadata, string body) { if( request_id == photoReq ) { string photoID; integer StartIndex=llSubStringIndex(body,"<title>"); integer EndIndex=llSubStringIndex(body,"</title>"); if( StartIndex!=-1) { integer tempIndex=llSubStringIndex(body,"imageid")+18; if(tempIndex>17)photoID=llGetSubString(body,tempIndex,tempIndex+35); } if ( photoID==NULL_KEY || photoID=="" ) photoID=missingtexture; llSetTexture(photoID, 0); } } attach(key id) { if (id) { llSetScale(<0.1, 0.15, 0.1>); llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <2.0, 0.5, 1.0>, <0.0, 0.0, 0.0>, PRIM_ROT_LOCAL, <0.000000, -0.707107, 0.000000, 0.707107>, PRIM_COLOR, 0, <1.0,1.0,1.0>, 1.0, PRIM_COLOR, 1, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 3, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 2, <1.0,1.0,1.0>, 0.0, PRIM_COLOR, 4, <1.0,1.0,1.0>, 0.0]); llRotateTexture(270.0*DEG_TO_RAD,0); HUDattachpoint=llGetAttached(); llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS|PERMISSION_TRACK_CAMERA); } } on_rez(integer param) { if ( !llGetAttached() ) { AgentListindex=0; HUDtarget=NULL_KEY; UpdateCrosshair(HUDtarget); llRequestPermissions(llGetOwner(),PERMISSION_ATTACH); } } run_time_permissions(integer perms) { if ( perms & PERMISSION_ATTACH ) llAttachToAvatar(HUDattachpoint); if ( perms & PERMISSION_TAKE_CONTROLS ) llTakeControls(CONTROL_BACK, FALSE, TRUE); } }
  21. To help you, other scripters here need you to post at least part of your script. We have no clue what you are doing wrong, otherwise.
  22. What people are pointing out to you is that you're trying to enter high school when you haven't completed grade school. What you want would be so simple in your own eyes if you learn the basic theories instead of trying to achieve a practical first. My suggestion is you forget about learning scripting if you don't want to spend a lot of time studying the basic theories first. You're better off trading your mesh services with someone who's willing to offer their scripting services. And again, this particular forum is not for that. This one is: http://community.secondlife.com/t5/Wanted/bd-p/Wanted
  23. Do you see an option here that detects when your prim is renamed or its description is changed? http://wiki.secondlife.com/wiki/Changed If you dont, then what you want it not simply possible as you want it. So, the way you can do it is to use a timer that automatically updates every few seconds. It would work but is a waste of resources.
  24. After seeing this (link) I did some experimentation but can't get this script function llAvatarOnLinkSitTarget to work. Can anyone help me figure out why isn't this simple test giving my key when I sit on it? I am able to get my key with llGetLinkKey(llGetNumberOfPrims()) but llAvatarOnLinkSitTarget(LINK_THIS) wont. default { changed(integer change) { key newlinkkey; key sitavkey; if (change & CHANGED_LINK) { newlinkkey=llGetLinkKey( llGetNumberOfPrims() ); sitavkey=llAvatarOnLinkSitTarget(LINK_THIS); llOwnerSay("new link key: "+(string)newlinkkey); llOwnerSay("llAvatarOnLinkSitTarget(LINK_THIS)=="+(string)sitavkey); } } }
  25. After seeing this (link) I did some experimentation but can't get this script function llAvatarOnLinkSitTarget to work. Can anyone help me figure out why isn't this simple test giving my key when I sit on it? I am able to get my key with llGetLinkKey(llGetNumberOfPrims()) but llAvatarOnLinkSitTarget(LINK_THIS) wont. default { changed(integer change) { key newlinkkey; key sitavkey; if (change & CHANGED_LINK) { newlinkkey=llGetLinkKey( llGetNumberOfPrims() ); sitavkey=llAvatarOnLinkSitTarget(LINK_THIS); llOwnerSay("new link key: "+(string)newlinkkey); llOwnerSay("llAvatarOnLinkSitTarget(LINK_THIS)=="+(string)sitavkey); } } }
×
×
  • Create New...