Jump to content

Xuander

Resident
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Xuander

  • Rank
    Newbie
  1. Hello all, with the help of a lot people from this forum i have this script what is working almost how i want, let me explain what it is. The script go in a object and the object is attached as hud to the avatar, when more people attach the object as hud and someone say "/66 hello" it comes on the screen of all who have the hud and it play a sound when someone sent a message, so far it is working how i want....now there is one thing i cant get to work. I have been told that when i use llregionsay it sent the message to everyone on the region with the hud but that not work, only people who are in 20 meter range get the message and when hit CTRL the people in 100 meter get the message but i want that everyone on the region with the hud get the message. To be clear, the message is not sent to the local chat but is sent to the hud so when you have the hud in the middle of your screen you see the message in the middle of your screen. The other thing i hope can be fixed is that now when someone say something with "/66 hello" it sent that to all others with the hud with the name of the one who have sent it but it use the usernames and i want that it sent the displayname. Hope someone can help me with this. integer transmit_channel = 66; integer listen_handle; ////////////////////////////// float MyFade; string MyMessage; say_message(string message) { llRegionSay(-3, message); llPlaySound("Horn",0.5); llSetTimerEvent(0.0); llSetText(message, <0.004, 1.000, 0.439>, 1.0); MyFade = 1.0; MyMessage = message; llSetTimerEvent(6.0); // tick every 1 seconds. } ////////////////////////////// transmit(string message) { llRegionSay(transmit_channel, message); } ////////////////////////////// show_help() { llOwnerSay("Bird Call Directions:"); llOwnerSay("/bc on: Turn on."); llOwnerSay("/bc off : Turn off."); llOwnerSay("/bc reset: Reset."); } ////////////////////////////// default { state_entry() { llOwnerSay("Bird Call enabled"); llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); state on; } } ////////////////////////////// state on { timer() { MyFade -= 0.3; // reduce by 1/5th each time llSetText(MyMessage, <0.004, 1.000, 0.439>, MyFade); if (MyFade == 0.0) llSetTimerEvent(0.0); } state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); } ////////////////////////////// attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } } } } ////////////////////////////// state off { state_entry() { llListen(0, "", llGetOwner(), ""); llOwnerSay("Bird Call off."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: OFF). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } } } } ////////////////////////////// state scan { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llSetTimerEvent(5); llOwnerSay("Channel Scanning...say \"bc stop\" to stop."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llGetDisplayName(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: SCANNING). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// timer() { transmit_channel++; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("stop") - 1) == "stop") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } state on; } } }
  2. Thank Callum i did what you said but now if i type /66 (message) in local i not get the message on the screen and also not on the screen of the receiver
  3. Thanks so much for helping me, i did what you said above and it works really good....i get the message i type in local with /66 on the screen and also on the screen from the other person who wear the hud and it fade away in a couple seconds so that works perfect.....Now there is one thing what not works and that is that the other person only get the message on the screen when they are in chat range so in 20 meter from each other, if they are 21 meter from each other the receiver don't get the message on the screen...ill hope you can help me with that......again thanks so much for all you do
  4. integer transmit_channel = 66; integer listen_handle; ////////////////////////////// say_message(string message) { // llOwnerSay(message); llSetText(message, <1.0, 0.0, 0.0>,1.0); llSetColor(<0, 1, 0>, ALL_SIDES); llSleep(0.5); llSetColor(<1, 1, 1>, ALL_SIDES); } ////////////////////////////// transmit(string message) { llRegionSay(transmit_channel, message); llSetColor(<1, 0, 0>, ALL_SIDES); llSleep(0.5); llSetColor(<1, 1, 1>, ALL_SIDES); } ////////////////////////////// show_help() { llOwnerSay("Bird Call Directions:"); llOwnerSay("/bc on: Turn on."); llOwnerSay("/bc off : Turn off."); llOwnerSay("/bc reset: Reset."); } ////////////////////////////// default { state_entry() { llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); state on; } } ////////////////////////////// state on { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } ////////////////////////////// attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } } } } ////////////////////////////// state off { state_entry() { llListen(0, "", llGetOwner(), ""); llOwnerSay("Bird Call off."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: OFF). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } } } } ////////////////////////////// state scan { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llSetTimerEvent(5); llOwnerSay("Channel Scanning...say \"bc stop\" to stop."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: SCANNING). Type \"/bc help\" for directions."); } } ////////////////////////////// changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } ////////////////////////////// timer() { transmit_channel++; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } ////////////////////////////// else if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("stop") - 1) == "stop") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } ////////////////////////////// else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } state on; } } } Thanks a lot you wanna look at it...here is what i have so far
  5. Thanks so much this is what i wanted....now i did try to figure out how the text can fade away after a couple seconds but cant get that to work...maybe you have a idea to get that work?
  6. thanks all, ellestones that what you say is what i wanted, both people wear it as a hud and when they type in local ''/5 bandage'' then they see that message. Now i am very new in scripting but can you explain how to do that llSetText and where in the script i have to put it and how to change the color of the text? Thanks
  7. thanks all, ellestones that what you say is what i wanted, both people wear it as a hud and when they type in local ''/5 bandage'' then they see that message. Now i am very new in scripting but can you explain how to do that llSetText and where in the script i have to put it and how to change the color of the text? Thanks
  8. Hello all, i have this script what i can place in a object and then when i wear it and someone els also wear it we can chat and only the people who wear the script can see the message. Now it gives a message in local chat but i want that it gives the message big on the screen for a couple seconds and then fade away and also that i can give the message a color. Here is the script and i hope someone can help me with it.. integer transmit_channel = 66; integer listen_handle; say_message(string message) { llOwnerSay(message); llSetColor(<0, 1, 0>, ALL_SIDES); llSleep(0.5); llSetColor(<1, 1, 1>, ALL_SIDES); } transmit(string message) { llRegionSay(transmit_channel, message); llSetColor(<1, 0, 0>, ALL_SIDES); llSleep(0.5); llSetColor(<1, 1, 1>, ALL_SIDES); } show_help() { llOwnerSay("Bird Call Directions:"); llOwnerSay("/bc on: Turn on."); llOwnerSay("/bc off : Turn off."); llOwnerSay("/bc reset: Reset."); llOwnerSay("/bc scan: Scan channels."); } default { state_entry() { llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); state on; } } state on { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (To sent a message to your team, type in local for example /5 bandage me). Type \"/bc help \" for directions."); llOwnerSay("Bird Call on."); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } } } } state off { state_entry() { llListen(0, "", llGetOwner(), ""); llOwnerSay("Bird Call off."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: OFF). Type \"/bc help\" for directions."); } } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("scan") - 1) == "scan") { state scan; } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } } } } state scan { state_entry() { llListen(0, "", llGetOwner(), ""); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llSetTimerEvent(5); llOwnerSay("Channel Scanning...say \"bc stop\" to stop."); } attach(key attached) { if (attached != NULL_KEY) { llSetObjectName(llKey2Name(llGetOwner()) + " (BC)"); llOwnerSay("Bird Call enabled (status: SCANNING). Type \"/bc help\" for directions."); } } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } timer() { transmit_channel++; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } listen(integer channel, string name, key id, string message) { if (channel == 0 && id == llGetOwner() && llStringLength(message) > 4 && llGetSubString(llToLower(message), 0, 3) == "/bc ") { message = llDeleteSubString(message, 0, 3); if (llGetSubString(llToLower(message), 0, llStringLength("channel ") - 1) == "channel " && llStringLength(message) > llStringLength("channel ")) { message = llDeleteSubString(message, 0, llStringLength("channel ") - 1); if ((integer) message != 0) { transmit_channel = (integer) message; llListenRemove(listen_handle); listen_handle = llListen(transmit_channel, "", NULL_KEY, ""); llOwnerSay("Bird Call listening on channel " + (string) transmit_channel); } } else if (llGetSubString(llToLower(message), 0, llStringLength("on") - 1) == "on") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("stop") - 1) == "stop") { state on; } else if (llGetSubString(llToLower(message), 0, llStringLength("off") - 1) == "off") { state off; } else if (llGetSubString(llToLower(message), 0, llStringLength("help") - 1) == "help") { show_help(); } else if (llGetSubString(llToLower(message), 0, llStringLength("reset") - 1) == "reset") { llResetScript(); } else { transmit(message); } } else if (channel != 0) { if (id == llGetOwner()) { say_message(message); } else { say_message(name + ": " + message); } state on; } } } Thanks in advantage
×
×
  • Create New...