Jump to content

childhoodbestfriend489

Resident
  • Posts

    68
  • Joined

  • Last visited

Everything posted by childhoodbestfriend489

  1. I think so too, thanks a loat @panterapolnocy
  2. suppose note card contains: Place|Surl now how to use if then else to get Surl in a channel?
  3. @redpurple Carpaccio But you used v*llGetRot() instead v+llRot2Euler(llGetRot()), Why?
  4. @redpurple Carpaccio Couldn't understand you reply at that time. Now it's clear and working, thanks.
  5. Need an example page link for move <...> @ redpurple Carpaccio
  6. I mean, not derectly, using that script, when I am not on ground.
  7. Whatever I do, go up, want to go to all directions integer prm; default { attach(key id) { if (id) { llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS); } } run_time_permissions(integer perm) { if (perm) { prm = TRUE; llTakeControls(CONTROL_UP|CONTROL_DOWN|CONTROL_FWD|CONTROL_BACK, TRUE, FALSE); } } control(key id, integer level, integer edge) { if (prm==TRUE) { if (CONTROL_UP) { llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(llGetPos()+<0,0,1>,.1); } else if (CONTROL_DOWN) { llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(llGetPos()-<0,0,1>,.1); } else if (CONTROL_FWD) { llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(llGetPos()+<0,1,0>,.1); } else if (CONTROL_BACK) { llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(llGetPos()-<0,1,0>,.1); } } } }
  8. After attaching object isn't asking permission: integer prm; default { attach(key id) { if (id) { llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS); } } run_time_permissions(integer perm) { if (perm) { prm = TRUE; llTakeControls(CONTROL_UP|CONTROL_DOWN, TRUE, FALSE); } } control(key id, integer level, integer edge) { if (prm == TRUE) { if (CONTROL_UP) { llMoveToTarget(llGetPos()+<0,0,1>,10); } } } }
  9. If Mouse look button pressed then do something, what the LSL will be?
  10. (14, 71): Error: Function call mismatches type or number of arguments. (14, 71) is 0 How to correct it: llRezObject("Web",llGetPos()+<1,0,0>,llGetCameraPos(),<0,0,0>,0); N.B. Didn't write the whole script here.
  11. Buttons are not showing on payment string UserName = "childhoodbestfriend489"; // change this to your main avatar's name list dialogAmounts = ["1","5","10","20"]; integer balance = 0; integer total; integer opChannel; integer listenHandle; presentDialog() { opChannel = llFloor((llFrand(1000000) * -1)-1000000); // creates random operation channel to // prevent spying on withdrawal amounts listenHandle = llListen(opChannel, "", llName2Key(UserName), ""); llSetTimerEvent(60); llTextBox(llName2Key(UserName), "Balance: L$"+(string)balance+"\n \nType amount to withdraw.",opChannel); } removeListens() { llListenRemove(listenHandle); llSetTimerEvent(0); } updateText() { string str = UserName + "'s Tip Jar\n"; if( total>0 ) str+= (string)total + " donated so far."; else str+= "Empty"; llSetText(str, <0,1,0>, 1); } default { on_rez(integer omitted) { llResetScript(); } state_entry() { llSetPayPrice(0,dialogAmounts); updateText(); opChannel = llFloor((llFrand(1000000) * -1)-1000000); llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); } touch_start(integer number_detected) { integer n; for(;n<number_detected;++n) { if(llDetectedKey(n)==llName2Key(UserName)) { if(balance==0)llDialog(llName2Key(UserName), "Balance: L$0", [], opChannel); else { presentDialog(); } } } } listen( integer channel, string name, key id, string message ) { removeListens(); integer amountToGive = (integer)message; llGiveMoney(llName2Key(UserName), amountToGive); balance -= amountToGive; llInstantMessage(llName2Key(UserName), "New balance = L$"+(string)balance); } money(key id, integer amount) { if(id == llName2Key(UserName)) // only display balance if money came from you { balance += amount; llInstantMessage(llName2Key(UserName), "New balance = L$"+(string)balance); } else // remove this else block if you want to allow other people // to put money into your safe { balance += amount; llSay(0, "Thanks for the "+(string)amount+llKey2Name(id)); total+=amount; updateText(); } } timer() { llInstantMessage(llName2Key(UserName), "timed out"); removeListens(); } }
  12. http://wiki.secondlife.com/wiki/No_Auto-Return_NR Does this (anti-return script) work on all type of regions? It is telling me "NR: This will not work in the current region."
  13. stopFollowing(), startFollowingName(string name), keepFollowing(), What are these called? Can I use any word to use such function? They are used here: AvatarFollower - Second Life Wiki
  14. When I am giving thus commands in console, it is showing this: > @tpto:<82>/<85>/<59>=force ERR: @tpto:<82>/<85>/<59>=force (invalid option)
  15. And what's the working highest limit of the range of llSensor? It even worked at 1000
  16. Here, this is used. Can't while(peeps<13) be used? and does that mean loop less than 13 times? sensor(integer peeps) { while(peeps--) { button += llKey2Name(llDetectedKey(peeps)); }
  17. But sometime the follower/listener cannot detect people
  18. You are right, it's working in one prim object.
  19. I tested and found that sender can send correct information. Sender script : integer schannel = 489; string dmsg = "Choose the name of person to magically follow:"; list button =["Off"]; default { touch_start(integer total_number) { llSensor("",NULL_KEY,AGENT,100,PI); llSetTimerEvent(30); } sensor(integer peeps) { while(peeps--) { button += llKey2Name(llDetectedKey(peeps)); } llDialog(llGetOwner(),dmsg,button,schannel); llListen(schannel,"",llGetOwner(),""); } no_sensor() { llRegionSayTo(llGetOwner(),0,"No avatar in range, please move closer."); } listen(integer channel, string name, key id, string cmd) { llMessageLinked(LINK_THIS, 1, cmd, ""); llResetScript(); } timer() { llRegionSayTo(llGetOwner(),0,"Dialog menu timeout."); } }
  20. Questions: 1. Is there any code to reset only the script the code is in? 2. This script cannot receive message from another script, why? integer schannel = 489; float DELAY = 0.5; // Seconds between blinks; lower for more lag float RANGE = 3.0; // Meters away that we stop walking towards float TAU = 1.0; // Make smaller for more rushed following // Avatar Follower script, by Dale Innis // Do with this what you will, no rights reserved // See https://wiki.secondlife.com/wiki/AvatarFollower for instructions and notes float LIMIT = 60.0; // Approximate limit (lower bound) of llMoveToTarget integer lh = 0; integer tid = 0; string targetName = ""; key targetKey = NULL_KEY; integer announced = FALSE; stopFollowing() { llTargetRemove(tid); llStopMoveToTarget(); llSetTimerEvent(0.0); llOwnerSay("No longer following."); } startFollowingName(string name) { targetName = name; llSensor(targetName,NULL_KEY,AGENT_BY_LEGACY_NAME,96.0,PI); // This is just to get the key } startFollowingKey(key id) { targetKey = id; llOwnerSay("Now following "+targetName); keepFollowing(); llSetTimerEvent(DELAY); } keepFollowing() { llTargetRemove(tid); llStopMoveToTarget(); list answer = llGetObjectDetails(targetKey,[OBJECT_POS]); if (llGetListLength(answer)==0) { if (!announced) llOwnerSay(targetName+" seems to be out of range. Waiting for return..."); announced = TRUE; } else { announced = FALSE; vector targetPos = llList2Vector(answer,0); float dist = llVecDist(targetPos,llGetPos()); if (dist>RANGE) { tid = llTarget(targetPos,RANGE); if (dist>LIMIT) { targetPos = llGetPos() + LIMIT * llVecNorm( targetPos - llGetPos() ) ; } llMoveToTarget(targetPos,TAU); } } } default { on_rez(integer x) { llResetScript(); // Why not? } link_message(integer sender_num, integer num, string msg, key id) { if (num==1) { if (msg == "Off") { stopFollowing(); } else { startFollowingName(msg); } } } no_sensor() { llOwnerSay("Did not find anyone named "+targetName); } sensor(integer n) { startFollowingKey(llDetectedKey(0)); // Can't have two ppl with the same name, so n will be one. Promise. } timer() { keepFollowing(); } at_target(integer tnum,vector tpos,vector ourpos) { llTargetRemove(tnum); llStopMoveToTarget(); } }
×
×
  • Create New...