Jump to content

satyajitdas20

Resident
  • Posts

    9
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Wulfie Reanimator Thanks, yes. Both of them worked. I find the second one better organized. That's the difference between the quality of scripting. Bothe the scripts solve the purpose but the second one is better. Thanks for teaching!
  2. Hi, First of all apologies, i know this might be very basic but I am learning scripting, so asking stupid questions. I am trying to make a simple contact giver script. When the object is clicked, it should show a pop up menu with a list of contacts which are meant to be shown. Something like the image i have uploaded. So I am using a URL giver script and trying to modify it. (The second picture here). What i have figured out is in place of URL, we can enter secondlife:///app/agent/UUID/about. 1. However, my script shows 'Go to page' and 'Cancel' instead of just the 'Ok' button. I dont see any button in the script, so how do I modify it. 2. Also, how do i change the color of the string info = " " text from the default white to black. 3. And the third line in the pop up says 'Owner of the object' without any line in the script that asks it to be displayed. How do i remove this line? Thanks in advance Jason. default { touch_start(integer num_detected) { key id = llDetectedKey(0); integer avatarInSameSim = (llGetAgentSize(id) != ZERO_VECTOR);// TRUE or FALSE if (avatarInSameSim) { string info = "Visit the Second Life website!"; // must start with either "http://..." or "https://..." string url = "secondlife:///app/agent/6614770b-0cc3-4c07-98a3-21e07d45fd4b/about"; llLoadURL(id, info, url); } else { llInstantMessage(id, "I can only open a URL dialog on your screen if you're in my sim!"); } } }
  3. @Fenix Eldritch Thank you for the detailed explanation. Now i understood the reason. The listening channel has to be same as the previous one. Thanks a lot!
  4. @rasterscan This makes the channel unique. And the call function in the other script recognizes it with the return (integer)
  5. @Fenix Eldritch @Quistess Alpha Ok, so i was able to do this, and it works fine. integer comChannel = 0; integer comHandle; default { touch_start(integer total_number) { llListenRemove(comHandle); comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llSetTimerEvent(120.0); // 2 minute allowance for response. comHandle = llListen(comChannel, "", llDetectedKey(0), ""); llTextBox(llDetectedKey(0), "\nPlease enter a test-string to broadcast to growl-enabled devices:\n", comChannel); } listen(integer channel, string name, key id, string message) { llMessageLinked(LINK_THIS, comChannel, message, id); llListenRemove(comHandle); // come to think of it though, you do need to remove it in the listen event as well to prevent double responses. llSetTimerEvent(0); } timer() { llSetTimerEvent(0); llListenRemove(comHandle); } } @Quistess Alpha I tried the second code with integer comChannel = -14523; However, it seems my other script dont recognize it anymore. And how do i setup the other code at the same channel, this is confusing me. This is the second code: string PROWL_API_KEY = "6e4533e1370953e10e72d3b818b5d5dd0646475c"; string PROWL_APPLICATION = "Prowler"; string PROWL_EVENT = "Tickled!"; ////////////////////////////////////////////////////////// // INTERNALS // ////////////////////////////////////////////////////////// default { link_message(integer sender_num, integer num, string str, key id) { integer cha = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; if(num != cha) return; string sLoad = "apikey=" + llEscapeURL(PROWL_API_KEY) + "&" + "application=" + llEscapeURL(PROWL_APPLICATION) + "&" + "event=" + llEscapeURL(PROWL_EVENT) + "&" + "description=" + llEscapeURL(str); llHTTPRequest("https://api.prowlapp.com/publicapi/add", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], sLoad); } on_rez(integer num) { llResetScript(); } }
  6. Hello again, I am using a Growl enabled script (used for Growl and Prowl clients using API) which does this. When i click on the Object with the script, a dialogue box opens and a message of upto 100 characters can be written and submitted. I receive an almost immediate notification with the complete message on my Prowl Client in my iPhone. This is good. But the problem here is: When i place the Object at my land and someone else clicks on it to send me a message, the dialog box doesnot open for them. It rather opens for me. (It doesnt matter if i am in the same region, or somewhere else). What i could figure out till now is that the script should be such that it should grab the UUID of the person clicking it and the message should be sent to the UUID of the person who is the owner of the Object. I understand there is something that needs to be changed at llGetOwner() but i am not able to figure out what needs to be changed and how. Here is the script: integer comChannel = 0; default { touch_start(integer total_number) { comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llListen(comChannel, "", llGetOwner(), ""); llTextBox(llGetOwner(), "\nPlease enter a test-string to broadcast to growl-enabled devices:\n", comChannel); } listen(integer channel, string name, key id, string message) { llMessageLinked(LINK_THIS, comChannel, message, id); } }
  7. Yes, thanks @Qie Niangao the llSetClickAction() worked like a charm. @Profaitchikenz Haiku I had to do it in all the child prims as they all had scripts with touch action. Luckily there were only 2, so it took 2 mins to do it. Thanks a lot for the help.
  8. Hi, I have a situation where I have a furniture (or any other created object) and added the scripts (modifiable) which works in the following way: If i type channel number and 'Hide' (which i have set manually inside the script) the object hides, and if i again type the same channel number and 'Show', it is visible again. But the point is, even after it is hidden, it is 'touchable' and brings up the menu of the furniture. What it should ideally do is, if it is hidden, it cant be touched at all so that no one knows it is there. (Unless they use Ctrl+Alt+T). And same way it should be again 'touchable' when it is visible. Is there is script (script lines) for that which can be added inside the Show/Hide script which is modifiable. Thanks in advance.
  9. Hi, Did you find the right land or are you still looking for it? Regards, Jason, Happy Life
×
×
  • Create New...