Jump to content

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests & Events
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
    • Sansar for Second Life Residents
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 230 results

  1. Hiya folks -- I have a large pendulum and am using the Dora Gustafson, Studio Dora swing script (below) from the outworlds script library. The text prims are set up and linked as such: pendulum (cube prim, tapered at the bottom), then a cylinder stretched out on z that acts like a rod and at the top, a small cube that is the root and contains the swing script. it works okay, i had to adjust the angle and the steps in the swing script to decrease the swing angle and slow it down -- well, it works mostly okay, it can be kinda jerky every now and then but I can live with that for now. What I'd like to do next is to rotate the root cube so the pendulum continues to swing but via the root, will also slowly rotate within a circular space on the ground so that if you attached a pencil to the pendulum end, it would act like a kind of spirograph. Not sure how to incorporate the rotation of the root prim into the swing script. I plopped in a target omega line of code but it didn't do anything - I'm guessing because I have no clue what I"m doing and that I read somewhere and can't find it there is a specific target omega for physical objects. (?) in an absolutely perfect world, the swing script would also randomly change the angle so that would alter the length of the path / lines. Appreciate any help. Thank you! This is the swing script: // :SHOW: // :CATEGORY:Pendulum // :NAME:Pendulum // :AUTHOR:Dora Gustafson, Studio Dora // :KEYWORDS: // :CREATED:2015-11-24 20:38:39 // :EDITED:2015-11-24 19:38:39 // :ID:1094 // :NUM:1870 // :REV:1 // :WORLD:Second Life // :DESCRIPTION: // Will swing a prim like a simple pendulum pivoting at an axis parallel to the prim's Y-axis // :CODE: // Pendulum motion by Dora Gustafson, Studio Dora 2012 // Will swing a prim like a simple pendulum pivoting at an axis parallel to the prim's Y-axis // The pivot axis will be at the top of a prim with the Z-axis pointing up // Quote from http://en.wikipedia.org/wiki/Pendulum_(mathematics) // • A simple pendulum is an idealization of a real pendulum using the following assumptions: // • The rod or cord on which the bob swings is massless, inextensible and always remains taut; // • Motion occurs only in two dimensions, i.e. the bob does not trace an ellipse but an arc. // • The motion does not lose energy to friction or air resistance. // The periode time increase with the Z dimension (the pendulum length)... // If it is too small the motion will not be well because of the time limitation with Key Framed Motions // The parameters set in the script works nice with a 3m long pendulum // If the pendulum is moved, rotated or resized the script must be reset to update the motion float angle=1.0; // max swing from resting (radians) //I CHANGED THIS TO 0.35 float steps=12.0; // number of Key Frames //I CHANGED THIS TO 48.0 float step=0.0; list KFMlist=[]; vector U; vector V; float angleU=0.0; float angleV; integer swing=TRUE; vector basePos; rotation baseRot; default { state_entry() { llSetMemoryLimit( llGetUsedMemory()+0x1000); llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]); basePos = llGetPos(); baseRot = llGetRot(); vector v1 = llGetScale(); float periode = TWO_PI*llSqrt( v1.z/9.81); float dT = periode/steps; dT = llRound(45.0*dT)/45.0; if ( dT < 0.11111111 ) dT = 0.11111111; v1.x = 0.0; v1.y = 0.0; v1 = -0.5*v1*llGetRot(); U = v1; while ( step < steps ) { step += 1.0; angleV = angle*llCos( TWO_PI*step/steps + PI_BY_TWO); V = v1*llAxisAngle2Rot(llRot2Fwd(llGetRot()), angleV); KFMlist += [V-U, llEuler2Rot(< angleV-angleU, 0.0, 0.0>), dT]; angleU = angleV; U = V; } } touch_start( integer n) { llSetKeyframedMotion( [], []); llSleep(0.2); llSetPrimitiveParams([PRIM_POSITION, basePos, PRIM_ROTATION, baseRot]); if ( swing ) llSetKeyframedMotion( KFMlist, [ KFM_MODE, KFM_LOOP]); swing = !swing; } on_rez( integer n) { llResetScript(); } }
  2. Hello all, with the help of a lot people from this forum i have this script what is working almost how i want, let me explain what it is. The script go in a object and the object is attached as hud to the avatar, when more people attach the object as hud and someone say "/66 hello" it comes on the screen of all who have the hud and it play a sound when someone sent a message, so far it is working how i want....now there is one thing i cant get to work. I have been told that when i use llregionsay it sent the message to everyone on the region with the hud but that not work, only people who are in 20 meter range get the message and when hit CTRL the people in 100 meter get the message but i want that everyone on the region with the hud get the message. To be clear, the message is not sent to the local chat but is sent to the hud so when you have the hud in the middle of your screen you see the message in the middle of your screen. The other thing i hope can be fixed is that now when someone say something with "/66 hello" it sent that to all others with the hud with the name of the one who have sent it but it use the usernames and i want that it sent the displayname. Hope someone can help me with this. integer transmit_channel = 66; integer listen_handle; ////////////////////////////// float MyFade; string MyMessage; say_message(string message) { llRegionSay(-3, message); llPlaySound("Horn",0.5); llSetTimerEvent(0.0); llSetText(message, <0.004, 1.000, 0.439>, 1.0); MyFade = 1.0; MyMessage = message; llSetTimerEvent(6.0); // tick every 1 seconds. } ////////////////////////////// transmit(string message) { llRegionSay(transmit_channel, message); } ////////////////////////////// show_help() { llOwnerSay("Bird Call Directions:"); llOwnerSay("/bc on: Turn on."); llOwnerSay("/bc off : Turn off."); llOwnerSay("/bc reset: Reset."); } ////////////////////////////// default { state_entry() { llOwnerSay("Bird Call enabled"); llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); state on; } } ////////////////////////////// state on { timer() { MyFade -= 0.3; // reduce by 1/5th each time llSetText(MyMessage, <0.004, 1.000, 0.439>, MyFade); if (MyFade == 0.0) llSetTimerEvent(0.0); } state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); } ////////////////////////////// attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } } } } ////////////////////////////// state off { state_entry() { llListen(0, "", llGetOwner(), ""); llOwnerSay("Bird Call off."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: OFF). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } } } } ////////////////////////////// state scan { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llSetTimerEvent(5); llOwnerSay("Channel Scanning...say \"bc stop\" to stop."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: SCANNING). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// timer() { transmit_channel++; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("stop") - 1) == "stop") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } state on; } } }
  3. We're looking for advanced scripters to help us with an in-world project. If you have the ability to create advanced scripts please contact us in-world through "CrocTechnologies Resident" via IM or Notecard to discuss further details.
  4. Hi fellow scripters and builders! I'm working on a control HUD to one of my upcoming projects, and I've kind of hit a dead end thanks to my insufficient trigonometry. What I need is the following: I've got a face on the HUD. It's middle point represents a pivot. The HUD wearer can click the face, and I need to be able to get the angle (calculated from the "upwards" Z axis) from that. The click provides coordinates in the form of a vector <u,v,0> where U is the horizontal coord, V is the vertical coord, and they both are a range from 0.0 to 1.0 - using function llDetectedTouchUV() I'm attaching a visualization of what I have in mind. I'm sure this is a trivial problem, but for someone who had long forgotten everything about trigonometry, it's a total blocker. Thank you to whoever will be able to help me out! ♥
  5. Hello! Help please with particles! I build a boat and I want to make such a wake on the water, which starts from the very nose and goes around the boats's hull. I saw it inworld so I believe its possible, I just dont know how. Particles does not go through the hull. They are slightly spraying forward and then circling the boat. But my particles go through without encountering obstacles. How can I simulate such particle wake? I have a particle script generator. I'm playing with sliders but I can not find the right one yet. Maybe someone has done this before and just tell the right parameter? This would greatly help. (Animation shows my particles going through obstacle)
  6. Hello friends, I'm new to programming scripts. My project is to create a boat. It has been easier to write the script separately for the lights, the horn, the ignition, movement of the helix, in short, several scripts. The problem is that I want to activate them by command but, in all, I used channel 0, using the function llListen, however, by putting all the scripts in their respective prims inside my boat, it seems that the instructions are mixed making several scripts respond simultaneously, how can I make everyone listen on a different channel? best regards.
  7. Hello! Im a professional scripter with 10 years of experience on the field, that offers a unique scripting service for second life, almost everything can be scripted or modified. Vehicles, breedables, RP systems, gambling, clothing , visuals, HUDs, tools, weapons, etc... I am also a web developer that uses JS/PHP/SQL for external http server communication with databases. My prices are affordable, and i charge similar than other less experienced scripters, contact me inworld with your request : Hao Zaytsev ( by notecard if possible ) Please do not reply this message or contact me throught the forum, better inworld. Cheers, Hao Zaytsev
  8. Hello! Please help to make a depth gauge for the boat. I have a script that shows the depth in the form of hovertext. But I need to turn it into an analog scale with an animated arrow texture or a fixed arrow with an animated scale for one mesh prim. How would I do it better? Thank you very much!
  9. Hello! Please help to make a depth gauge for the boat. I have a script that shows the depth in the form of hovertext. But I need to turn it into an analog scale with an animated arrow texture or a fixed arrow with an animated scale for one mesh prim. I can provide this script. Please, not very expensive, I dont want this gauge to be more expensive than my boat. I can wait as long as you need. You can leave this script no mod! More details .: that's how I see it. One prim mesh with two - three faces. One face for the background, the second for the arrow, the third for the body (not necessary). We need to animate one texture, depending on the depth. Mesh and textures I do myself. Simple scale from 0 to 20. I also have full perm scripted analog compass and altimeter gauges, if that helps. Thank you very much! _------------+------------_ THE PROBLEM SOLVED!
  10. Hello there! I have an attachment that is used to push/pull users for a combat weapon. The object uses llPushObject from an attachment. For some reason or another, the script just loses all power and can no longer move anything. It can SLIGHTLY move things but the power is significantly decreased. Using llGetEnergy returns that the object has plenty of energy left. Things I've tried: Changing mass of attachment Moving object to different attachment point. Resetting the scripts. Trying it on LIGHT objects/avatars. Relogging Changing sims. Taking the object off and putting it back on. Making the root prim bigger. Enable.disable phantom. The only thing that gets it working again is to rez out a new object, put the scripts in, then attach it. Nothing above worked except for this. The object I have made has multiple links and is a lengthy process to remake it every time it randomly quits. Is there something I am doing wrong or what? ;( Code Snippet: sensor( integer i ) { key id = llDetectedKey( 0 ); vector pos = llDetectedPos( 0 ); vector o_pos = llGetPos(); float mass = llGetObjectMass( id ); float dist = llVecDist( pos, o_pos ); float force = llPow( dist, 3.0 ) * push_force; // push_force = 150 vector local_pos = ( pos - o_pos ); // Convert global positions to local force. Target Pos - Current Pos llPushObject( id, local_pos * force * mass, ZERO_VECTOR, FALSE ); } Keep in mind, the code above is a shortly written example of my main code. This is to keep things simple. EDIT: I've singled out the issue. This only happens when going to another sim from the one I first created the object in. I.E if I make it in some random sim of my choice, it will work flawlessly, but if I go to another one, it doesn't work at all. And if I go back to the sim before, it no longer works there either.
  11. I will try to explain what I am looking for .. I want to be able to make a sticker (a panda for example) .. and once i click on the panda sticker it will show up in a sticker collections book. The original panda sticker can be trashed and cant be used any more and then you just go about getting more stickers to click on and add to a book It doesnt have to be a book either.. can be a board you put in your house (sort of like those chore charts that display a sticker when someone does a chore??) I have a million ideas for stickers but want a place where people can display the ones they own already.. plus if they already have .. the panda sticker they can sell it (like a gatcha resale item) or trade it ..until they get the complete set. I hope this makes sense! I dont know a thing about scripting .. I only know how to make the stickers and the boards/books lol
  12. Hello, I am wondering how does aeros production (HUD<->prims) or other separate objects communicate. I red that it works via linked-messages. But in wiki it writes that Linkedmessage function can communicate only in the same prim between scripts. Therefore, if there is 2 separate object, does the only solution is e.mail and http? Thank you ^^
  13. Hello! I have recently been attempting to convert one of my land-based planes into a seaplane. I have successfully installed floats on it, but find that my aircraft sinks like a rock. The aircraft in question is an mm_MXS-R 1.2 by Michie Yokosuka, and the mm_MXS-R_script_1.2 it contains is marked as 'no modify'. Therefore, I have since been trying to learn how to create a patch script which I can insert into my plane's root prim, that will allow my plane to float on water. Based on past forum posts, I have crafted the following script, but it does not seem to work: default { state_entry() { vector pos = llGetPos(); float altitude_sea = (pos.z - llWater(ZERO_VECTOR)); if (altitude_sea > 0 ) { llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 ); llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0 ); llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 10 ); llSetVehicleFloatParam( VEHICLE_BUOYANCY, .977 ); } else if (altitude_sea < 0 ) { llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 ); llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.2 ); llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 0.4 ); llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1.0 ); } } } I have also installed VICE on the plane via RCX's free installer program, and that process has been a resounding success. So currently the additional scripts installed on the plane's root prim are: RCX VICE+TCS LISTENER VICE Bomb Control v1.2.0 VICE+TCS ALA sensor The following VICE Patch: /** * @author: reconx86 (RCX Productions) * * @license: You are allowed to share this script full-perm with others and even use it in your own projects. * But do not sell the script seperately nor as part of a script package. * * This script is made to make any incompatible mod-vehicle work with VICE. * It's not recommended to use unless you really can't script the vehicle at hand, this script may cause glitches and interfere with the main-script functions. */ integer seated; key owner; integer links; integer prevLinks; default { state_entry() { owner = llGetOwner(); prevLinks = llGetNumberOfPrims(); } changed(integer change) { if (change & CHANGED_OWNER) { owner = llGetOwner(); } if (change & CHANGED_LINK) { integer link_nr; links = llGetNumberOfPrims(); for (link_nr = 0; link_nr <= links; link_nr++) { if (owner == llGetLinkKey(link_nr)) { if (!seated) { llMessageLinked(LINK_SET, seated = TRUE, "seated", owner); } prevLinks = links; } } if (seated && links == prevLinks - 1) { llMessageLinked(LINK_SET, seated = FALSE, "seated", NULL_KEY); } prevLinks = links; } } } I would really appreciate it if someone could help me perfect my seaplane patch script!
  14. I am a very experienced mesh and script writer who is looking for a team to join, or custom jobs. I have been around secondlife for 11 years, and can make just about anything. I am very reliable, and affordable. Contact me in world : kira Alena.
  15. Hello im looking for either a guide on how to make a RP hud/script. Im looking to start a new RP/Breedable system and need a guide that can help get me started or looking for people that are interested in the same thing and are looking for work Any help is appreciated ty!
  16. ParticleImage(string tex, vector scale) { list params; //set texture and size params += [PSYS_SRC_TEXTURE, tex]; params += [PSYS_PART_START_SCALE, scale]; //make particles follow source params += [PSYS_PART_FLAGS, PSYS_PART_FOLLOW_SRC_MASK]; //use drop pattern, which has no velocity params += [PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP]; llParticleSystem(params); } default { state_entry() { //make the prim invisible llSetAlpha(0.0, ALL_SIDES); if (llGetTexture(ALL_SIDES)) { string tex = llGetTexture("XXX-XXX-XXXXX-XX-XX-XXX"); ParticleImage(tex, <1.0, 1.0, 0.0>); } } } XXX-XXX-XXXXX-XX-XX-XXX - UUID of my texture (i hide it) Plz.. tell to me what i doing wrong. I want -> get static particle image by UUID.
  17. Raven Delgado

    script

    Hello every one, I have been searching for the script that strips mesh clothing in a 10 Stage Strip or less to put in my clothes, I can't find a scriptor who knows how this is done, if any one knows some one or where i can buy this script pleAse message me in world, thank you in advance- just removed like old days I'am not looking for- i need clothes removed in stages , like a sexy stripper opps & done by a click with public or private to strip you-thank you be blessed
  18. As part of my work on workarounds for region crossing problems, I need for a vehicle script to be able to talk to seated avatars during the semi-broken condition of a half-unsit, where a region crossing has failed. I want to tell the avatar to teleport itself back to the vehicle. This works when vehicle and avatar extension can communicate. The communication is a problem: llShout will work up to 100m across region boundaries, but sometimes the avatar is more than 100m from the vehicle. Seldom if ever more than a few hundred meters, though. llEmail has a lot of open bugs dated back to 2005. Discussions consider it broken. llTeleportAgent will work if the avatar is the owner of the vehicle. Otherwise not. llInstantMessage can't talk to an object. llRegionSayTo is only useful within a region. llMessageLinked can't talk to an attachment (and might not work when avatar and vehicle are in different regions, which is what this is all about) Setting up an external server for HTTP communication is a bit much. This isn't some big coordinated system under one owner. Have I missed anything?
  19. MIVIMEX

    Rotate at an angle

    Hello! Help please who can! I need to make the object (of a supposedly cylindrical shape) to rotate at an angle of 45 degrees to the root about a constant fixed axis. As if it were a globe on a stand. Should I use this script or something like that? default { state_entry() { llTargetOmega(<1.0,0.0,0.0>*llGetRot(),0.1,0.01); } } Many many many many thanks! _________________________________________________________________ Ok i think i found an answer! This is what needed. Works well so far!
  20. Looking for an experienced scripter who can made some modifications to a full perm script that I have. Please contact me in-world for details and discussion. Work will be paid. CalumCatan Resident
  21. Hello, I need your help. I've this script and I need to modify in order to allow it to split a 100% percentage to another avatar. The point is that this script opens a menu window that makes it possible to buy the item as a gift, for this reason I can't use a simple vendor script with the percentage split. I copy the script here. Can anyone please modify it for me? I really can't make it work. I'd like to reward the first one that will make it work, so please contact me inworld ( NymphaeaMK Resident ) or specify your name inworld and I'll be glad to offer you 50 L$ Thank you in advance for your help. xxx Nym //STRINGS string sBUTTON_BUY = "BUY NOW"; string sBUTTON_GIFT = "SEND AS GIFT"; string sBUTTON_INFO = "INFORMATION"; string sMESSAGE_BUY = "Right click this vendor and click pay to buy this product."; string sMESSAGE_BUY_SUCCESS = "Item successfully delivered!"; string sMESSAGE_GIFT = "Enter the full name of the recipient in local chat."; string sMESSAGE_GIFT_SUCCESS = "Item successfully delivered to the recipient "; string sMESSAGE_INFO = "Notecard is being sent."; string sMESSAGE_BUY_FOR_GIFTED = "Avatar found. Right click this vendor and click pay to send this item now."; string sDIALOGMESSAGE = "Please choose:"; string sERROR = "Name not found!"; //Name2key-error. float fTIMEOUT_RESERVED = 60; //Seconds before time out. float fTIMEOUT_NAME2KEY = 30; //Seconds before name2key times out. string sTIMEOUT = "Timed out."; vector vRESERVED_COLOR = <1.0, 1.0, 1.0>; float fRESERVED_ALPHA = 1.0; string sRESERVED = "Vendor is in use."; integer iCHANNEL_NAME2KEY = PUBLIC_CHANNEL; integer iCHANNEL_DIALOG = -4787644; string sINVALID_AMOUNT = "Invalid amount!"; dialog(key kAvatar) { llDialog(kAvatar, sDIALOGMESSAGE, [sBUTTON_BUY, sBUTTON_GIFT, sBUTTON_INFO], iCHANNEL_DIALOG); } string sPURCHASE_IM = " just bought "; string sPURCHASE_IM2 = " at a price of "; string sPURCHASE_IM3 = " L$ in region "; ownerPurchaseIM(string sItemname, string sAvatarname) { //Send IM to owner. string sPrice = (string)((integer)llGetObjectDesc()); string sSLURL = llGetRegionName() + getSLURLPos(llGetPos()); llInstantMessage(llGetOwner(), sAvatarname + sPURCHASE_IM + sItemname + sPURCHASE_IM2 + sPrice + sPURCHASE_IM3 + sSLURL); } string getSLURLPos(vector v) { //Returns SL-url-pos. return " (" + (string)((integer)(v.x)) + "," + (string)((integer)(v.y)) + "," + (string)((integer)(v.z)) + ")"; } string sURL = "http://w-hat.com/name2key"; //Name2key url. key reqid; integer iMAXLEN = 100; string sPARAM = "?terse=1&name="; httpdb_load(string sNAME) { //Perform name2key search. reqid = llHTTPRequest(sURL + sPARAM + llEscapeURL(sNAME), [HTTP_BODY_MAXLENGTH, iMAXLEN], "" ); } key kUSER; //Globals. string sGIFTEDNAME; integer iREADY_FOR_PAYMENT = FALSE; key kGIFTED; integer iLISTEN; default { state_entry() { //Request debit-permission from owner. llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetTimerEvent(0.0); //Stop timer. llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); } changed(integer change) { //Reset when changing owner. if (change & CHANGED_OWNER) { llResetScript(); } } run_time_permissions(integer perm) { if (perm & PERMISSION_DEBIT) { //Permissions granted, go to state perm. state perm; } } on_rez(integer start_param) { if (!(llGetPermissions() & PERMISSION_DEBIT) || llGetPermissionsKey() != llGetOwner()) { //Permissions invalid. llResetScript(); } } } state perm { state_entry() { //Permissions given. llSetTimerEvent(0.0); //Stop timer. kUSER = NULL_KEY; //Reset key. sGIFTEDNAME = ""; //Reset name. llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetText("", vRESERVED_COLOR, fRESERVED_ALPHA); } touch_start(integer total_number) { kUSER = llDetectedKey(0); state inuse; } changed(integer change) { //Reset when changing owner. if (change & CHANGED_OWNER) { llResetScript(); } } } state inuse { state_entry() { //Set up timeout for in-use-state. iREADY_FOR_PAYMENT = FALSE; //Reset ready-flag. kGIFTED = NULL_KEY; //Reset gifted-key. llSetPayPrice(PAY_HIDE, [(integer)llGetObjectDesc(), PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetTimerEvent(fTIMEOUT_RESERVED); llSetText(sRESERVED, vRESERVED_COLOR, fRESERVED_ALPHA); llListenRemove(iLISTEN); iLISTEN = llListen(iCHANNEL_DIALOG, "", kUSER, ""); dialog(kUSER); } listen(integer channel, string name, key id, string message) { if (channel == iCHANNEL_DIALOG && id == kUSER) { //Correct channel and user. if (message == sBUTTON_BUY) { //Buy-option chosen. llSay(PUBLIC_CHANNEL, sMESSAGE_BUY); } else if (message == sBUTTON_GIFT) { //Gift-option chosen. state name2key; } else if (message == sBUTTON_INFO) { //Info-notecard-option chosen. if (llGetInventoryNumber(INVENTORY_NOTECARD) > 0) { llGiveInventory(kUSER, llGetInventoryName(INVENTORY_NOTECARD, 0)); llSay(PUBLIC_CHANNEL, sMESSAGE_INFO); } } } } touch_start(integer num_detected) { if (llDetectedKey(0) != kUSER) { //Error message (non-user). llRegionSayTo(llDetectedKey(0), PUBLIC_CHANNEL, sRESERVED); } else { //Dialog. dialog(kUSER); } } money(key id, integer amount) { string sItem; if (amount != (integer)llGetObjectDesc()) { //Invalid amount! llTransferLindenDollars(id, amount); llSay(PUBLIC_CHANNEL, sINVALID_AMOUNT); return; } else { if (llGetInventoryNumber(INVENTORY_OBJECT) > 0) { //Give item. sItem = llGetInventoryName(INVENTORY_OBJECT, 0); llGiveInventory(kUSER, sItem); } llSay(PUBLIC_CHANNEL, sMESSAGE_BUY_SUCCESS); ownerPurchaseIM(sItem, llKey2Name(kUSER)); state perm; //Return to state perm. } } timer() { //Time's up for user. Go back to state perm. state perm; } changed(integer change) { //Reset when changing owner. if (change & CHANGED_OWNER) { llResetScript(); } } } state name2key { state_entry() { //Setting up listener for name2key-query. iREADY_FOR_PAYMENT = FALSE; //Reset ready-flag. kGIFTED = NULL_KEY; //Reset gifted-key. llListen(iCHANNEL_NAME2KEY, "", kUSER, ""); llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetTimerEvent(fTIMEOUT_NAME2KEY); llSay(PUBLIC_CHANNEL, sMESSAGE_GIFT); } listen(integer channel, string name, key id, string message) { if (channel == iCHANNEL_NAME2KEY && id == kUSER) { //User said name. sGIFTEDNAME = message; httpdb_load(sGIFTEDNAME); } } money(key id, integer amount) { string sItem; if (!iREADY_FOR_PAYMENT) { //Not ready for payment. return; } else { if (amount != (integer)llGetObjectDesc()) { //Invalid amount! llTransferLindenDollars(id, amount); llSay(PUBLIC_CHANNEL, sINVALID_AMOUNT); return; } else { if (llGetInventoryNumber(INVENTORY_OBJECT) > 0) { //Give item. sItem = llGetInventoryName(INVENTORY_OBJECT, 0); llGiveInventory(kGIFTED, sItem); } llSay(PUBLIC_CHANNEL, sMESSAGE_GIFT_SUCCESS + sGIFTEDNAME); ownerPurchaseIM(sItem, llKey2Name(kUSER)); state perm; //Return to state perm. } } } timer() { //Timeout of name2key (user did not enter name in chat, or name2key did not return a result). llSay(PUBLIC_CHANNEL, sTIMEOUT); state inuse; } changed(integer change) { //Reset when changing owner. if (change & CHANGED_OWNER) { llResetScript(); } } http_response(key id, integer status, list meta, string body) { //Response from Name2Key-request. if (id == reqid) { reqid = NULL_KEY; if((key)body == NULL_KEY) { //No key found. llSay(PUBLIC_CHANNEL, sERROR); } else { //Key found. llSetPayPrice(PAY_HIDE, [(integer)llGetObjectDesc(), PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSay(PUBLIC_CHANNEL, sMESSAGE_BUY_FOR_GIFTED); kGIFTED = (key)body; iREADY_FOR_PAYMENT = TRUE; } } } }
  22. My boyfriend and I are starting a club, however any time we leave scripts will stop working. Rezzers won't work, games stop functioning, basically anything with a script in it dies until we log back in. Obviously we need to know how to fix this. We don't have anything set to group only and we have scripts enabled on the parcel. Please help!
  23. float sun_height;vector sun_position; default{ state_entry() { llSetTimerEvent(150); } timer() { sun_position = llGetSunDirection(); sun_height = sun_position.z; if(sun_height < 0.0) { llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.4]); } else { llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); } }} float glow;float time; //------------------------------------- // Main program default { state_entry() { llSetColor(<1.0, 1.0, 1.0>, ALL_SIDES); state begin; }} //------------------------------------- // Begin state state begin { state_entry() { glow = (integer) llRound(llFrand(1)); // Random on or off time = (float) llFrand(2); // Random wait time llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1.0, 1.0, 1.0>, glow, 5.0, 0.5, PRIM_GLOW, ALL_SIDES, glow]); // Set prim light on/of state wait; // Go to the Wait State } } //------------------------------------- // Wait state state wait { state_entry() { llSetTimerEvent(time); //Wait } timer() { llSetTimerEvent(0.0); //remove the timer state begin; // Go back to the Begin State } }
  24. I need a couple of new scripts for a WIP. Maybe they already exist and I just haven't found them yet, or maybe I need something from scratch. Here's the project needs: 1. lighting: I have a linked set that needs multiple faces (on each set) to light up and some to glow on touch (and shut off again on touch). I want only one touch on the object to control the whole thing. 2. texture changer: I have a texture changer that allows for the change of individual faces, but i want all of the faces to change at once. for 3 separate themes. They won't look good to mix and match, I think. I don't know if they'll need to be on the same script, since both operate by touch, or if a hud would be needed for the texture change, so it doesn't affect the light switch. please contact me by IM in-world, here, or email at ellieannesilverfall@gmail.com if you are interested.
  25. Hello, I am Tomix, and I am new to scripting LSL. I was wondering how I would be able to create a touch limit on an Object. The Limit being one, I already have the object playing a sound and increasing a count by one per click, sort of like signing a guestbook. vector color = <0.5, 1.0, 1.0>; string default_text = "//default_text// \n "; string text; string sound1 = "sound1"; //uuid or name of item in inventory string sound = "sound"; //uuid or name of item in inventory integer count=0; default { state_entry() { text = default_text; llSetText(text, color, 1.5); llTargetOmega(<0,0,.2>,PI,1.0); } touch_start(integer total_num) { llTriggerSound(sound1, 2.0); llTriggerSound(sound, 2.0); } touch_end(integer number) { count = count + 1; text = (string)count + "//new_text// \n"; llSetText(text, color, 1.5); } }
×
×
  • Create New...