Jump to content

Gayngel

Resident
  • Posts

    183
  • Joined

  • Last visited

Everything posted by Gayngel

  1. To demonstrate what Frionil means: //Doctor touches a bracelet that sends message to this button (this script). //Script/button checks if message was sent by doctor. //Then script/button checks if the doctor is within range (2.5 meters). //--intial parameters here //--functions here //--doctor touches the button (this object) and pairs to this button, assigning themself as the doctor. //------------- (STATE PAIRED) --------------- state PAIRED //start listening { sensor (integer num_detected) //***sensor will check if paired doctor is withing 2.5 meters of this script. { string message = "Detected " + (string)num_detected + " avatar(s): " + llDetectedName(0); isDoctorNear=0; // start new search integer index = 0; // LSL is a zero-indexed language while (index < num_detected) DetectedName=llDetectedName(index++); CurrentName=llDetectedName(index-1); message += ", " + DetectedName; //check if searched avatar is found in results if (doctorName==CurrentName) { isDoctorNear = 1; //isDoctorNear will be 1 if doctor is in range, or 0 if too far away foundName=CurrentName; } // llOwnerSay ("State Paired + sensor, isDoctorNear="+(string)isDoctorNear); //debug // move your processing stuff here if (isDoctorNear==0) { //state PAIRED; //doctor not in range - go back to beginnine // since you are in state PAIRED already and you have not closed the listener you dont need to call state PAIRED; again. The listener is still listening for commands. // calling a state within the same state will do nothing. } else{ //do nothing and move foward to command processing below } //------------------- //--Process commands here based on command received from the bracelet } no_sensor() { isDoctorNear=0; //doctor is not found within range llRegionSayTo(doctorKey, PUBLIC_CHANNEL, "*Out of Range* Please come closer to the VSM Exam Table."); // llOwnerSay ("State Paired + NO sensor, isDoctorNear="+(string)isDoctorNear); //debug state PAIRED; // start over } state_entry() //for paired state { // llOwnerSay("state PAIRED"); //LISTENERS llListen (ChInCmdLine220, "", "", ""); //COMMAND CHANNEL - listens to bracelet on CH -220 for commands } //end state_entry listen (integer channel, string name, key id, string message) { if (ChInCmdLine220==channel) //CH -220 //=================START CHANNEL -220/COMMAND { //***Checks if paired doctor is within range of 2.5 meters each time a command is heard from bracelet llSensor(doctorName, NULL_KEY, AGENT_BY_LEGACY_NAME, 2.5, PI); //***<---CALLING LLSENSOR() }//end channel } // end listen } //end state PAIRED
  2. You can have your item to be upated ping a free external web service like to a Google spreadsheet or a 00webhost. If there is an update written into the database then the server can contact your drop box to deliver an update. https://community.secondlife.com/forums/topic/478616-persistent-url-server-scripts-store-an-inworld-servers-url-and-other-data-persistently-via-a-google-sheet/#comment-2366793
  3. integer lhandle; default { state_entry() { llSetPayPrice(PAY_HIDE,[1]); } // if the customer right clicks and select Pay from the menu money(key id, integer amount) { llGiveMoney(id,amount); llGiveInventory(id, llGetInventoryName(INVENTORY_OBJECT,0)); } // if the customer right clicks and selects Touch from the menu touch_end(integer num) { // llGiveInventory(id, llGetInventoryName(INVENTORY_OBJECT,0)); // either give the item directly or bring up a dialog menu to deliver the item llListenRemove(lhandle); lhandle = llListen(-777,"","",""); llDialog(llDetectedKey(0),"Select deliver to get your free item!",["Deliver"],-777); } listen(integer chan, string name, key id, string msg) { if(chan == -777) { if(msg == "Deliver") { llGiveInventory(id, llGetInventoryName(INVENTORY_OBJECT,0)); llListenRemove(lhandle); } } } }
  4. On the right click menu the Pay button will give the pay dialog with the pay buttons and the Touch button can either give an llDialog menu (blue pop-up menu) where the customer can select Deliver and the item be delivered from the listen event, or the Touch button can just deliver the item directly from the touch event without a dialog.
  5. The Caspervend multi-vendor does it two ways. Either you pay L$1 / get L$1 or you can right click and select touch for a dialog menu and select the deliver button and deliver the item from the listen event. I'm not sure how your vendor is set up but a 3rd possible way is to on display of a free item disable the actual Buy button on the right click menu with llSetPayprice(PAY_HIDE,[PAY_HIDE]) and change the "Touch" button on the right click menu to "Buy" with llSetTouchText and set llSetClickAction to touch and then in a touch event deliver the item.
  6. You can set the price to 0 with llSetPayPrice but paying L$0 doesn't trigger any event. To turn a prim into a vendor that you can buy the contents for L$0 just edit the vendor prim and under the general tab select the "For Sale" check mark and set the price to 0 and then from the drop down select contents then select Apply. You can then set the click action to "buy object". Put in what you want to sell in the contents of the vendor.
  7. I highly recomend you switch from saving data to an object's description to saving it in linkset data. https://wiki.secondlife.com/wiki/Category:LSL_LinksetData
  8. I am a programmer with 8 years experience in scripting with LSL. I enjoy building custom systems ground-up and will provide low lag solutions to my customer's specifications. I can: - Write simple, minor fixes to existing scripts -Create tip jars, club systems, dialog menus, detections, HUDs and vendors,etc -Make more advanced systems such as pose systems, RLV, vehicles, pathfinding, weaponry, SL experiences and HTTP for external coms to websites and databases. - Also experienced in HTML/CSS, php, SQL, Ruby, Rails, Python and Javascript -I can also do scripting in Open Sim if needed. Script adaptations and library resources if used will be fully cited. I work closely with my clients providing working demos of their products with full perm models on completion and delivery. Note: Models will be mockups to present the functioning script, clients must finalize prim designs and builds themselves. Price: $7 USD an hour. Paypal or Linden Dollars accepted. Scripts will be full perm on final payment . Delivery may be a few hours to weeks also dependent on script complexity and work load. IM me inworld. If I'm offline IMs will go to email and will get back to you ASAP. (Forwarning: Adult rated profile) Copy/paste this link to the nearby chat window in your viewer, press enter then click on my name in chat to open my profile: secondlife:///app/agent/a9ba2797-81af-429d-9833-51127ad5593c/about Discord: Gayngel#0431 Marketplace Store: https://marketplace.secondlife.com/stores/149734
  9. I am a programmer with 8 years experience in scripting with LSL. I enjoy building custom systems ground-up and will provide low lag solutions to my customer's specifications. I can: - Write simple, minor fixes to existing scripts -Create tip jars, club systems, dialog menus, detections, HUDs and vendors,etc -Make more advanced systems such as pose systems, RLV, vehicles, pathfinding, weaponry, SL experiences and HTTP for external coms to websites and databases. - Also experienced in HTML/CSS, php, SQL, Ruby, Rails, Python and Javascript -I can also do scripting in Open Sim if needed. Script adaptations and library resources if used will be fully cited. I work closely with my clients providing working demos of their products with full perm models on completion and delivery. Note: Models will be mockups to present the functioning script, clients must finalize prim designs and builds themselves. Price: $7 USD an hour. Paypal or Linden Dollars accepted. Scripts will be full perm on final payment . Delivery may be a few hours to weeks also dependent on script complexity and work load. IM me inworld. If I'm offline IMs will go to email and will get back to you ASAP. (Forwarning: Adult rated profile) Copy/paste this link to the nearby chat window in your viewer, press enter then click on my name in chat to open my profile: secondlife:///app/agent/a9ba2797-81af-429d-9833-51127ad5593c/about Marketplace Store: https://marketplace.secondlife.com/stores/149734
  10. $stmt=$pdo->prepare("INSERT INTO UserData (uuid, name, column) VALUES ('".$uuid."', '".$name."', '".stats."')"); $stmt->execute();
  11. I am a programmer with 8 years experience in scripting with LSL. I enjoy building custom systems ground-up and will provide low lag solutions to my customer's specifications. I can write simple, minor fixes to existing scripts, tip jars, club systems, dialog menus, detections, HUDs and vendors to more advanced systems such as pose systems, RLV, vehicles, pathfinding, weaponry, SL experiences and HTTP for external coms to websites and databases. (Also experienced in HTML/CSS, php, SQL, Ruby, Rails, Python and Javascript ) I can also do scripting in Open Sim if needed. Script adaptations and library resources if used will be fully cited. I work closely with my clients providing working demos of their products with full perm models on completion and delivery. Note: Models will be mockups to present the functioning script, clients must finalize prim designs and builds themselves. Price: $7 USD an hour. Paypal or Linden Dollars accepted. Scripts will be full perm on final payment . Delivery may be a few hours to weeks also dependent on script complexity and work load. IM me inworld. If I'm offline IMs will go to email and will get back to you ASAP. (Forwarning: Adult rated profile) Copy/paste this link to the nearby chat window in your viewer, press enter then click on my name in chat to open my profile: secondlife:///app/agent/a9ba2797-81af-429d-9833-51127ad5593c/about Marketplace Store: https://marketplace.secondlife.com/stores/149734
  12. @Xiija Thank you! I have a working database now.
  13. Recently I've been learning PHP and SQL and I now have a project that requires an external server as LSD wont have sufficient data storage. I can create and retrieve data from a table within my PHP script but I have no clue how to connect it to an inworld source. I've looked at some of the PHP server examples on the wiki but they are just too involved for me to understand. I would like a simple example of POSTING/GETTING a message to a PHP script (for example llHTTPRequest(example.com/example.php, [HTTP_METHOD,"POST"], "Greet" )) and an example php script that receives the post and sends a message back ("Hello World") to the LSL script and then I reckon I can build up to retrieving data from the database from there. Can anyone show me how to do this? Thanks in advance. Edit: I know the LSL parts, keeping track of the URL and all that, I'm really more interested in the PHP side.
  14. I have to recommend using Google App Script to a spreadsheet or doc as an external service because I've had virtually no downtime in the last 10 years using the service.
  15. There is a place called the College of Scripting & Music Science that has tutorials you can follow on the sim or buy the books. Just don't join the group. https://maps.secondlife.com/secondlife/Horsa/177/244/2165 You can also watch this youtube series: https://www.youtube.com/playlist?list=PLRd7gXP3GzYmCBHMk1COFFQp2Rs3m4S-a
  16. Well with Valentines Day coming up I'll assume you're looking for a Secret Valentine type script. What you can do is have the script in the mailbox read the notecard, delete it and store the text, and then send the text to whoever via an instant message. Unless they leave a name in the text the IM will not give away their name, the sender will show up as the mailbox.
  17. This is a great video series for learning LSL:
  18. This is a great video series for learning LSL:
  19. Atom with an LSL extension is great as it has rapid development features. Just save a text file in a project folder with the .lsl file extension and syntax will highlight. You can also get an extension that autosaves text files as you stop typing. Get Atom from http://atom.io https://i.imgur.com/zMvBcuu.gif
  20. You can join the "Unofficial Avsitter Support Group" inworld for help with Avsitter
  21. The avatar doesn't have to be online to receive an inventory offer BUT if their offline message cap is reached before the offer is sent via a llGiveInventory call then they won't get the inventory offer.
×
×
  • Create New...