Welcome, Guest |
You have to register before you can post on our site.
|
|
|
Sit camera positioner |
Posted by: steadymobbin - 02-18-2013, 03:08 AM - Forum: Communication Scripts
- No Replies
|
|
1. Without sitting, drop the Sit Camera Positioner script into your object. Don't accept the permission request yet.
2. Move your camera to where you want it to be.
3. Accept the permission to track your camera.
4. That's all! Sit to check whether it worked. If not, try pressing Esc a few times--the camera may only snap to the specified position if it's not zoomed in on something.
PHP Code: default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA); }
run_time_permissions(integer perm) { if(perm & PERMISSION_TRACK_CAMERA) { if(llGetPermissionsKey() == llGetOwner()) { vector object_pos = llGetPos(); rotation object_rot = llGetRot(); vector camera_pos = llGetCameraPos(); llSetCameraEyeOffset((camera_pos - object_pos) / object_rot); llSetCameraAtOffset(((camera_pos + llRot2Fwd(llGetCameraRot())) - object_pos) / object_rot); llOwnerSay("/me's camera position has been set!"); llRemoveInventory(llGetScriptName()); } } } }
Sit Camera Remover [/quote]default { state_entry() { llSetCameraEyeOffset(ZERO_VECTOR); llSetCameraAtOffset(ZERO_VECTOR); llOwnerSay("/me's camera position has been removed!"); llRemoveInventory(llGetScriptName()); } }
|
|
|
chat to IM |
Posted by: steadymobbin - 02-18-2013, 03:06 AM - Forum: Communication Scripts
- No Replies
|
|
PHP Code: // local chat to IM // put this script in an invisible prim and place it on the ground, you will get an IM of the local chat
string mess; integer channel = 0; default { on_rez(integer total_number) { llSetObjectName(" "); llInstantMessage(llGetOwner(), ""); llListen(0, "","",""); } listen(integer channel, string name, key id, string mess) { llInstantMessage(llGetOwner(),llKey2Name(id) + " : " +(string)mess);
}}
|
|
|
[zED] HoloPic Display (Tipjar XML & SCRIPT) |
Posted by: steadymobbin - 02-18-2013, 03:02 AM - Forum: Business Scripts
- No Replies
|
|
PHP Code: default { state_entry() { llParticleSystem([ PSYS_PART_FLAGS, 256, PSYS_SRC_PATTERN, 1, PSYS_PART_START_ALPHA, 1.000000, PSYS_PART_END_ALPHA, 1.000000, PSYS_PART_START_COLOR, <1.000000, 1.000000, 1.000000>, PSYS_PART_END_COLOR, <1.000000, 1.000000, 1.000000>, PSYS_PART_START_SCALE, <0.800000, 0.800000, 0.00000>, PSYS_PART_END_SCALE, <0.800000, 0.800000, 0.000000>, PSYS_PART_MAX_AGE, 5.000000, PSYS_SRC_MAX_AGE, 0.000000, PSYS_SRC_ACCEL, <0.000000, 0.000000, 0.000000>, PSYS_SRC_ANGLE_BEGIN, 0.000000, PSYS_SRC_ANGLE_END, 0.000000, PSYS_SRC_BURST_PART_COUNT, 5, PSYS_SRC_BURST_RATE, 3.000000, PSYS_SRC_BURST_RADIUS, 0.000000, PSYS_SRC_BURST_SPEED_MIN, 0.000000, PSYS_SRC_BURST_SPEED_MAX, 0.500000, PSYS_SRC_OMEGA, <0.000000, 0.000000, 0.000000>, PSYS_SRC_TARGET_KEY,(key)"", PSYS_SRC_TEXTURE, "87dfd082-f83b-673b-e86b-5fa2d64bedf8" ]); } }
PHP Code: integer totaldonated; string owner;
default { on_rez( integer sparam ) { llResetScript(); } state_entry() { owner = llKey2Name( llGetOwner() ); llSetText( "Ayudanos a continuar\ncon tu colaboracion!.\n" + (string)totaldonated + "L$ fueron donados ya!",<.25,1,.65>,1); }
money(key id, integer amount) { totaldonated += amount; llSetText( "Argentina punto AR\nte da las gracias\npor donarnos " + (string)amount + "$L\n" + (string)totaldonated + "L$ fueron donados ya!",<.25,1,.65>,1); llInstantMessage(id,"Gracias por tu colaboracion!!!!"); llInstantMessage(llGetOwner(),(string)llKey2Name(id)+" dono L$" + (string)amount); llSetTimerEvent(15.0); llSetText( "Ayudanos a continuar\ncon tu colaboracion!.\n" + (string)totaldonated + "L$ fueron donados ya!",<.25,1,.65>,1); } }
|
|
|
simple "set pos" |
Posted by: steadymobbin - 02-18-2013, 02:59 AM - Forum: Business Scripts
- No Replies
|
|
example 1
PHP Code: integer on = TRUE; default { touch_start(integer y) { if(on == TRUE) { llSetPos(llGetLocalPos()+<0,0,0.45>); llPlaySound("c416996b-38f2-dfb1-a5db-a0752ffb7acf",1.0); on = FALSE; } else if(on == FALSE) { llSetPos(llGetLocalPos()-<0,0,0.45>); llPlaySound("034a1292-3445-f08a-2f04-0a2d78459f80",1.0); on = TRUE; } } }
example 2
PHP Code: integer on = TRUE; default { touch_start(integer y) { if(on == TRUE) { llSetPos(llGetLocalPos()+<0,0,2>); on = FALSE; } else if(on == FALSE) { llSetPos(llGetLocalPos()-<0,0,2>); on = TRUE; } } }
|
|
|
Perfect MailBox |
Posted by: steadymobbin - 02-18-2013, 02:55 AM - Forum: Business Scripts
- No Replies
|
|
PHP Code: list lMail = []; // column 1 = notecard name, column 2 = read by user integer MAIL_UNREADED = 0; integer MAIL_READED = 1; integer DIALOG_CHANNEL = 49383; list DIALOG_CHOICE = ["Unread", "Read", "Delete"]; integer nLastCardCount = 0; integer nLastItemCount = 0; key owner1; string ownerName;
TxtRefresh() { // show the unreadable notecard integer nTotalCard = 0; integer nNotReaded = 0; integer nCount = 0; for (nCount = 0; nCount < llGetListLength(lMail); nCount += 2) { if (llList2Integer(lMail, nCount + 1) == MAIL_UNREADED) nNotReaded += 1; nTotalCard += 1; }
// total string string cPost = (string)nTotalCard + " card"; if (nTotalCard > 1) cPost += "s"; cPost += " Recu";
// unreaded string string cUnreaded = (string)nNotReaded + " Non Lu"; llSetText("MailBox of : " + (string)ownerName + "\n"+"Drag your notecard has the inside\n" + cPost + "\n" + cUnreaded, <.95, .75, 0>, 1); }
default { on_rez(integer n) { llSetText(" ",<0,0,0>,0.0); llResetScript(); } state_entry() { owner1 = llGetOwner(); ownerName = llKey2Name(owner1); // Allowing dropping of object llAllowInventoryDrop(TRUE); llListen(DIALOG_CHANNEL, "", NULL_KEY, ""); nLastCardCount = llGetInventoryNumber(INVENTORY_ALL); nLastItemCount = llGetInventoryNumber(INVENTORY_NOTECARD);
// Auto complete list integer nCardCount = llGetInventoryNumber(INVENTORY_NOTECARD); integer n_CurObj = 0; string c_Name = "NotEmpty"; while (c_Name != "") { c_Name = llGetInventoryName(INVENTORY_NOTECARD, n_CurObj); n_CurObj += 1; if (c_Name != "") { lMail += [c_Name]; lMail += MAIL_UNREADED; } } TxtRefresh(); }
touch_start(integer total_number) { llSay(0, "Drag a note card to leave a message"); //---- Change MY OWNER above to suit your likes and needs. // // if owner key id = llDetectedKey(0); if (id == llGetOwner()) { // Show a dialog llDialog(id, "What do you want to do ?", DIALOG_CHOICE, DIALOG_CHANNEL); } }
listen(integer channel, string name, key id, string message) { if (llGetOwner() == id && llListFindList(DIALOG_CHOICE, [message]) != -1) { integer i; string cName; list lRemove; integer nStatus; for (i = 0; i < llGetListLength(lMail); i += 2) { cName = llList2String(lMail, i); nStatus = llList2Integer(lMail, i + 1); if (message == llList2String(DIALOG_CHOICE, 0) && nStatus == MAIL_UNREADED) { // open un-readed llGiveInventory(id, cName); // mark for readed lMail = llListReplaceList(lMail, [MAIL_READED], i + 1, i + 1); } if (message == llList2String(DIALOG_CHOICE, 1) && nStatus == MAIL_READED) { // open readed llGiveInventory(id, cName); } if (message == llList2String(DIALOG_CHOICE, 2) && nStatus == MAIL_READED) { // delete readed llSay(0, cName); llRemoveInventory(cName); lRemove += i; } } // remove from the list if (llGetListLength(lRemove) > 0) { integer k; for (k = 0; k < llGetListLength(lRemove); k++) { i = llList2Integer(lRemove, k); lMail = llDeleteSubList(lMail, i, i+1); } } TxtRefresh(); } }
changed(integer change) { // dont accept other than a notecard integer nItemCount = llGetInventoryNumber(INVENTORY_ALL); if (nItemCount < 2) { // clear the list lMail = []; }
if (nItemCount != nLastItemCount) { // delete other item type than notecard string cName = "NotEmpty"; integer nCurObj = 0; integer nObjType = INVENTORY_NONE; list lRemove = []; while (cName != "") { cName = llGetInventoryName(INVENTORY_ALL, nCurObj); nCurObj += 1; nObjType = llGetInventoryType(cName); if (nObjType != INVENTORY_NOTECARD) { // add for deletion, its not a notecard lRemove += cName; } }
// delete other object than notecard integer nD = 0; for (nD = 0; nD < llGetListLength(lRemove); nD += 1) { // dont remove this script ! cName = llList2String(lRemove, nD); if (cName != llGetScriptName() && cName != "") { llSay(0, "Sorry " + cName + "is not a notecard"); llRemoveInventory(cName); } }
// search for a new notecard integer n_CurObj = 0; string c_Name = "NotEmpty"; while (c_Name != "") { c_Name = llGetInventoryName(INVENTORY_NOTECARD, n_CurObj); llSay(0, c_Name); n_CurObj += 1; // search for this card if (llListFindList(lMail, [c_Name]) == -1 && c_Name != "") { // ok its a new card lMail += [c_Name]; lMail += MAIL_UNREADED; llSay(0, c_Name + " ajouter a la MailBox"); } } } nLastItemCount = llGetInventoryNumber(INVENTORY_ALL); nLastCardCount = llGetInventoryNumber(INVENTORY_NOTECARD); // refresh the text TxtRefresh(); } }
|
|
|
|