Jump to content

joshua Bumbo

Resident
  • Posts

    13
  • Joined

  • Last visited

Everything posted by joshua Bumbo

  1. Thank you for your help. Mew_Bloodstar :3
  2. Hello, I have a question regarding lists. So I got this little bit of code to work. What I need to do is in stead of "del 1" is to be able to delete by name 'del Bob' and make it a list again. Any help is appriciated. Code: list fruit = ["Anthony", "Bob", "Charlie", "Diane", "Edgar", "Gabriela"]; TypeOutList(list data) { llOwnerSay("List Contains " + (string) llGetListLength(data) + " items.\n" + llList2CSV(data)); } default { state_entry() { llListen(0, "", llGetOwner(), ""); } touch_start(integer total_number) { TypeOutList(fruit); } listen(integer channel, string name, key id, string message) { if (llToLower(llGetSubString(message, 0, 3)) == "del ") { if ( (integer) llGetSubString(message, 4, -1) >= llGetListLength(fruit) +1) { llOwnerSay("sorry, but the list only has " + (string) llGetListLength(fruit) + " items in it!"); } else { fruit = llDeleteSubList(fruit, (integer) llGetSubString(message, 4, -1) -1 , (integer) llGetSubString(message, 4, -1) - 1); TypeOutList(fruit); } } } }
  3. I did not know that once someone sits they become a link Prim. Luckily I built a visual basics Project based off of building multi-layer menus. Thanks by the way for helping me so far.
  4. like make it 0.0 then move the root prim itself through a menu system?
  5. What the notecard is loading is the position and the rotation of the sit (so many avatars in so many sizes!) I was tring to make it really easy for the users to adjust there carts. Im seasoned in other scripting languages and not to mention love a challenage. I remember when i got my first car and i had to go into a script to edit the sit target i was so overwelmed with all the code even being use to looking at code.
  6. I have a Linkset of 27 Prims whitch is a go cart. Here is a chart of prims, note card and a partial script. What I need it to do is to load the note card as varibles and then set lines 1 - 3 as vectors. I need it to also always sit on prim 1 (Root Prim). I have been tring for 4 and a half hours to no avail any help would be appriciated. //---------------------------------------------Part List--------------------------------------------------------// //1 Sit Box 5 Tire Front Left 9 Tire Back Right 13 Balloon Middle 17 Balloon Stick Right //2 Main Body 6 Rim Front Right 10 Rim Back Left 14 Balloon Right //3 Motor 7 Tire Front Right 11 Tire Back Left 15 Balloon Stick Left //4 Rim Front Left 8 Rim Back Right 12 Balloon Left 16 Balloon Stick Middle //--------------------------------------------------------------------------------------------------------------////---SETTINGS NOTECARD---// POSITION=<-0.45,0.0,0.7> ROTATION=<0.0,0.0,0.0> COLOR=<1.0,0.0,0.0>Original Drivers Script (No Errors) integer Private = 1; // Change to 1 to prevent others riding. integer tt; integer Gear = 1; integer Run; integer oldn; vector Sitpos = <.8,0,.8>; vector SitrotV = <0,0,0>; rotation Sitrot; key oldagent; key agent; float forward_power = 3; //Power used to go forward (1 to 30) float forward_normal = 3; float crash_power_forward = 3; float reverse_power = -3; //Power ued to go reverse (-1 to -30) float turning_ratio = 1.3; //How sharply the vehicle turns. Less is more sharply. (.1 to 10) float Speed; string sit_message = "Ride"; //Sit message string not_owner_message = "You are not the owner of this vehicle."; //Not owner message string DrivingAnim = "Default"; //Animation to use when owner sits /////////////////////////////// go_up() { llSetStatus(STATUS_PHYSICS, FALSE); llSetRot(<0,0,0,0>); llSetStatus(STATUS_PHYSICS, TRUE); } setCamera(float degrees) { rotation sitRot = llAxisAngle2Rot(<0, 0, 1>, degrees * PI); llSetCameraEyeOffset(<-10, 0, 3> * sitRot); llSetCameraAtOffset(<4, 0, 3> * sitRot); llForceMouselook(FALSE); } setVehicle() { llSetVehicleType(VEHICLE_TYPE_CAR); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.1); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.2); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 0.2); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.10); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 0.2); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 0.2); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 0.1); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.5); } Init() { Run = 0; llSetVehicleType(VEHICLE_TYPE_NONE); llSetStatus(STATUS_PHYSICS, FALSE); Sound(0); vector rotv = llRot2Euler(llGetRot()); rotation rot = llEuler2Rot(<0,0,rotv.z>); llSetRot(rot); Sitrot = llEuler2Rot(DEG_TO_RAD * SitrotV); } Reset() { Run = 0; vector rotv = llRot2Euler(llGetRot()); rotation rot = llEuler2Rot(<0,0,rotv.z>); llSetRot(rot); llSetPos(llGetPos() + <0,0,0.5>); } integer LastSetMaterial = FALSE; SetMaterial() { if(LastSetMaterial == FALSE) { LastSetMaterial = TRUE; } } Sound(integer n) { if(n != oldn) { oldn = n; if(n == 2) { llStopSound(); } else if(n == 1) { //llLoopSound("plane",1); } else { llStopSound(); } } } default { state_entry() { Init(); llSetSitText(sit_message); llSitTarget(Sitpos, Sitrot); setCamera(0); } on_rez(integer rn) { llResetScript(); llSetPos(llGetPos() + <0,0,.5>); } link_message(integer sender, integer num, string message, key id) { if(message=="reset") { Reset(); } } changed(integer change) { if ((change & CHANGED_LINK) == CHANGED_LINK) { agent = llAvatarOnSitTarget(); if (agent != NULL_KEY) { if( (agent != llGetOwner())) { llSay(0, not_owner_message); llUnSit(agent); llPushObject(agent, <0,0,50>, ZERO_VECTOR, FALSE); } else { llSetStatus(STATUS_PHYSICS, TRUE); llSleep(.4); oldagent = agent; setVehicle(); SetMaterial(); llSetTimerEvent(0.3); llMessageLinked(LINK_SET, 0, "shift", "1"); llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); Sound(1); Run = 1; } } else { Run = 0; llReleaseControls(); llStopAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); Init(); llSetPos(llGetPos() + <0,0,0>); Sound(0); } } } run_time_permissions(integer perm) { if (perm) { forward_power = forward_normal; Gear = 2; llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_DOWN | CONTROL_UP | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE); llPlaySound("start",1.0); llMessageLinked(LINK_SET, 0, "shift", "2"); llSetPos(llGetPos() + <0,0,0.5>); llStartAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); llWhisper(0,"Hit M for mouselook, page up and down for thrust control. If you flip, Stand Up to flip the vehicle right-side up."); } } control(key id, integer level, integer edge) { if(Run == 0) { llStopAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); return; } integer reverse=1; vector angular_motor; vector vel = llGetVel(); Speed = llVecMag(vel); if ((level & edge & CONTROL_UP) || ((Gear >= 7) && (level & CONTROL_UP))) { Gear=Gear+1; if(Gear == 1) { llSay(0,"Gear 1"); //llLoopSound("gear1",1); llMessageLinked(LINK_SET, 0, "shift", "1"); } if(Gear == 2) { llSay(0,"Gear 2"); //llLoopSound("gear1",1); llMessageLinked(LINK_SET, 0, "shift", "2"); } if(Gear == 3) { llSay(0,"Gear 3"); //llLoopSound("gear2",1); llMessageLinked(LINK_SET, 0, "shift", "3"); } if(Gear == 4) { llSay(0,"Gear 4"); //llLoopSound("gear3",1); llMessageLinked(LINK_SET, 0, "shift", "4"); } if(Gear == 5) { llSay(0,"Gear 5"); //llLoopSound("gear4",1); llMessageLinked(LINK_SET, 0, "shift", "5"); } if(Gear == 6) { llSay(0,"Gear 6"); //llLoopSound("gear5",1); llMessageLinked(LINK_SET, 0, "shift", "6"); } if (Gear < 1) Gear = 1; if (Gear > 6) Gear = 6; } if ((level & edge & CONTROL_DOWN) || ((Gear >= 7) && (level & CONTROL_DOWN))) { Gear=Gear-1; if(Gear == 1) { llSay(0,"Gear 1"); //llLoopSound("gear1",1); llMessageLinked(LINK_SET, 0, "shift", "1"); } if(Gear == 2) { llSay(0,"Gear 2"); //llLoopSound("gear1",1); llMessageLinked(LINK_SET, 0, "shift", "2"); } if(Gear == 3) { llSay(0,"Gear 3"); //llLoopSound("gear2",1); llMessageLinked(LINK_SET, 0, "shift", "3"); } if(Gear == 4) { llSay(0,"Gear 4"); //llLoopSound("gear3",1); llMessageLinked(LINK_SET, 0, "shift", "4"); } if(Gear == 5) { llSay(0,"Gear 5"); //llLoopSound("gear4",1); llMessageLinked(LINK_SET, 0, "shift", "5"); } if(Gear == 6) { llSay(0,"Gear 6"); //llLoopSound("gear5",1); llMessageLinked(LINK_SET, 0, "shift", "6"); } if (Gear < 1) Gear = 1; if (Gear > 6) Gear = 6; } if(level & CONTROL_FWD) { llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 2.0, 1000.0>); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <Gear*forward_power,0,0>); llStartAnimation("Default"); reverse=1; } if(level & CONTROL_BACK) { llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 2.0, 1000.0>); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <Gear*reverse_power,0,0>); llStartAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); reverse = -1; } if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT)) { llStartAnimation("car right"); llStopAnimation("Default"); llStopAnimation("car left");; angular_motor.z -= Speed / (turning_ratio*Gear); } else { llStartAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); } if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT)) { llStartAnimation("car left"); llStopAnimation("Default"); llStopAnimation("car right"); angular_motor.z += Speed / (turning_ratio*Gear); } else { llStartAnimation("Default"); llStopAnimation("car left"); llStopAnimation("car right"); } llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor); } timer() { if(Run == 1) { vector pos = llGetPos(); float Z = pos.z; if(Z < 20) { llSetVehicleFlags(VEHICLE_FLAG_HOVER_WATER_ONLY); llSetVehicleFloatParam(VEHICLE_BUOYANCY, 1 ); llSetVehicleFloatParam(VEHICLE_HOVER_HEIGHT, 20); } else { llRemoveVehicleFlags(VEHICLE_FLAG_HOVER_WATER_ONLY); llSetVehicleFloatParam(VEHICLE_BUOYANCY, 0 ); } vector vel = llGetVel(); Speed = llVecMag(vel); if(Speed > 2.0) { Sound(2); } else if(Speed > 0.0) { llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <1.0, 2.0, 1000.0>); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0,0,0>); Sound(1); } llSetTimerEvent(0.3); } else { llSetTimerEvent(0.0); } } }
  7. I have recived this message aswell. I am a scripter and I made some hair. I had the script to color it in a debug state so I could see were it is in the script as its running. So I used this bit of code and, Keep in mind that the varible chkpt is the current count and the varible PrmCnt is the total number of prims in the link set. llSay(0, string(chckpt) + "/" + string(PrmCnt)); OUTPUT + 1/140 this is verry earitating to me as a scripter. Any updates?
  8. Thanks for getting back to me so quickly. The bandana has a link set of 10 prims that looks like it is on the face and then there is a different link set of 10 prims that looks like it is down around the neck. I am fimmiar with writing code logic it is just that I did not know how to move a whole linkset together as one. Not to mention the wiki is not much help. Sometimes the logic blocks get a little confusing in LSL. But I got it to work Thank you.
  9. I have this bandana mask that I made that has one on the face and one on the neck. The prim needs to move down by 0.08 on Z because there is a clickible I always wear (Not linked to mask) and when the mask is up it bocks the clickible tom make it more realistic . The clickiblemakes a click noise when clicked. There is 10 prims total and it listens for the command "maskup" or "maskdown" . If possible id like to make it not move if it's allready in the position requested. (ex. up or down) Here is what I have so far. Any will help will be much appreciated. Thank you, default { state_entry() { // listen on channel zero for any chat spoken by the object owner. llListen(2,"",llGetOwner(),""); } listen(integer channel, string name, key id, string message) { // check if the message corresponds to a predefined string. // llToLower converts the message to lowercase. // This way, "HELLO", "Hello" or "HeLLo" will all work the same way. if (llToLower(message) == "maskup") { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); //-----> needs to go up } else if (llToLower(message) == "maskdown") { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); //-----> needs to go down } else if (llToLower(message) == "maskhide") { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); //-----> need to go down } } }
  10. I have this bandana mask that I made that has one on the face and one on the neck. The prim needs to move down by 0.08 on Z because there is a clickible I always wear (Not linked to mask) and when the mask is up it bocks the clickible tom make it more realistic . The clickiblemakes a click noise when clicked. There is 10 prims total and it listens for the command "maskup" or "maskdown" . If possible id like to make it not move if it's allready in the position requested. (ex. up or down) Here is what I have so far. Any will help will be much appreciated. Thank you, default { state_entry() { // listen on channel zero for any chat spoken by the object owner. llListen(2,"",llGetOwner(),""); } listen(integer channel, string name, key id, string message) { // check if the message corresponds to a predefined string. // llToLower converts the message to lowercase. // This way, "HELLO", "Hello" or "HeLLo" will all work the same way. if (llToLower(message) == "maskup") { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); //-----> needs to go up } else if (llToLower(message) == "maskdown") { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); //-----> needs to go down } else if (llToLower(message) == "maskhide") { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); //-----> need to go down } } }
  11. Hello every one i'm getting into more lsl now and i am a lil stuck so please bear with me. ok so i have a link set that has 5 prims total and they are ears. (Diagram Below). _________________________ KEY: 0 - invisible 1 - visible _________________________ 0 0 <--- Ears folded back 0 <---- Root of Linkset 1 1 <---- Ears Normal _________________________ The ears will fold back when the phase "fold - t" on channel 3030 and when it is touched a dialog menu will pop up with buttons to interact with the ears. What I am stuck on is i need it to not to be able to actictivate the men when they are folded and when they are normal I need them to sense if it was the left or right ear. Thank you, Mew BloodStar (joshua Bumbo) --Apha Script -- //LIST OF PRIMS// // 1 - POS BALL // 2 - LFolded // 3 - RFolded // 4 - R // 5 - L default { state_entry() { llListen(3030,"",llGetOwner(),""); llSetLinkAlpha(1, 0.0, ALL_SIDES); llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetLinkAlpha(3, 0.0, ALL_SIDES); llSetLinkAlpha(4, 1.0, ALL_SIDES); llSetLinkAlpha(5, 1.0, ALL_SIDES); } listen(integer channel, string name, key id, string message) { if (llToLower(message) == "fold -t") { llSetLinkAlpha(2, 1.0, ALL_SIDES); llSetLinkAlpha(3, 1.0, ALL_SIDES); llSetLinkAlpha(4, 0.0, ALL_SIDES); llSetLinkAlpha(5, 0.0, ALL_SIDES); llSleep(15.0); llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetLinkAlpha(3, 0.0, ALL_SIDES); llSetLinkAlpha(4, 1.0, ALL_SIDES); llSetLinkAlpha(5, 1.0, ALL_SIDES); } if (llToLower(message) == "fold -m") { llSetLinkAlpha(2, 1.0, ALL_SIDES); llSetLinkAlpha(3, 1.0, ALL_SIDES); llSetLinkAlpha(4, 0.0, ALL_SIDES); llSetLinkAlpha(5, 0.0, ALL_SIDES); llSleep(15.0); llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetLinkAlpha(3, 0.0, ALL_SIDES); llSetLinkAlpha(4, 1.0, ALL_SIDES); llSetLinkAlpha(5, 1.0, ALL_SIDES); } if (llToLower(message) == "fold -t -m") { llSetLinkAlpha(2, 1.0, ALL_SIDES); llSetLinkAlpha(3, 1.0, ALL_SIDES); llSetLinkAlpha(4, 0.0, ALL_SIDES); llSetLinkAlpha(5, 0.0, ALL_SIDES); llSleep(15.0); llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetLinkAlpha(3, 0.0, ALL_SIDES); llSetLinkAlpha(4, 1.0, ALL_SIDES); llSetLinkAlpha(5, 1.0, ALL_SIDES); } if (llToLower(message) == "fold -h") { llSetLinkAlpha(2, 1.0, ALL_SIDES); llSetLinkAlpha(3, 1.0, ALL_SIDES); llSetLinkAlpha(4, 0.0, ALL_SIDES); llSetLinkAlpha(5, 0.0, ALL_SIDES); } if (llToLower(message) == "unfold") { llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetLinkAlpha(3, 0.0, ALL_SIDES); llSetLinkAlpha(4, 1.0, ALL_SIDES); llSetLinkAlpha(5, 1.0, ALL_SIDES); } } } --Dialog script for left only (Right is the same)-- list buttons = ["-", "Flick", "Bite", "Pull", "Tickle", "Scratch", "Kiss", "Play", "Poke", "Kiss OWEE"]; string dialogInfo = "\nPlease make a choice."; key ToucherID; integer dialogChannel; integer listenHandle; default { state_entry() { dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); } touch_start(integer num_detected) { ToucherID = llDetectedKey(0); key id = llDetectedKey(0); string name = llDetectedName(0); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); listenHandle = llListen(dialogChannel, "", ToucherID, ""); } //HERE'S OUR NEWLY ADDED LISTEN EVENT listen(integer channel, string name, key id, string message) { if (message == "-") { llDialog(ToucherID, dialogInfo, buttons, dialogChannel); } else if (message == "Flick") { llSay(0, name + " Flicks " + llKey2Name(llGetOwner()) + "'s Left Ear. OUCH!!"); } else if (message == "Bite") { llSay(0, name + " Bites " + llKey2Name(llGetOwner()) + "'s left ear hard. Ouch!! That really hurt " + name + "."); } else if (message == "Pull") { llSay(0, name + " pulls on " + llKey2Name(llGetOwner()) + "'s left ear hard. Ouch!! That really hurt " + name + "."); } else if (message == "Tickle") { llSay(0, name + " tickles " + llKey2Name(llGetOwner()) + "'s left ear lightly. " + llKey2Name(llGetOwner()) + "'s ear twitches a bit."); } else if (message == "Scratch") { llSay(0, name + " scratches behind " + llKey2Name(llGetOwner()) + "'s left ear lightly. " + llKey2Name(llGetOwner()) + "'s ear twitches a bit as he purrs."); } else if (message == "Kiss") { llSay(0, name + " Kisses " + llKey2Name(llGetOwner()) + "'s left ear lightly. " + llKey2Name(llGetOwner()) + "'s ear twitches a bit as he purrs."); } else if (message == "Kiss OWEE") { llSay(0, name + " Kisses " + llKey2Name(llGetOwner()) + "'s left ear lightly. " + llKey2Name(llGetOwner()) + "'s left ear feels much better."); } else if (message == "Play") { llSay(0, name + " plays with " + llKey2Name(llGetOwner()) + "'s left ear " + llKey2Name(llGetOwner()) + "'s ear twitches a bit."); } else if (message == "Poke") { llSay(0, name + " pokes " + llKey2Name(llGetOwner()) + "'s left ear " + llKey2Name(llGetOwner()) + "'s ear twitches a bit."); } } }
  12. (20 L$ to first who has my solution!!!) Hello, I have created a box and I need it to send me a email to my personal email adress. Here are the sever setings you will need. Incoming mail server: pop.mail.com Outgoing mail server: smtp.mail.com Incoming server: 110 (unchanged) Outgoing server: 587 (as suggested) this also suports the MAPI settings aswell but i have never had to use them, And before you ask yes it is a real email server. I am still new to LSL so if anyone could help it be appriciated. Thanks, Mew Bloodstar
×
×
  • Create New...