Doorbell / Türklingel für OS geändert (mit privat & public Einstellung)

2 years 6 months ago #16 by Copper Tomsen


  • Posts: 12

  • Gender: Unknown
  • Birthdate: 22 May 2020
  • Mal schun ob ein script hier reinzukopieren ist. Ich habe das Original für SL bischen überarbeitet. Hat auch privat und public Funktion zur Auswahl:

    //Seamed to be a script for SL in original.So Copper Tomsen played a little with it in april 2021 to make it work in OS :-)
    // BASIC RING BUTTON
    // by buttbadger Mirabeau

    // Usage: When someone touches the doorbell, it rings and the toucher's name will be said in chat.
    // When the owner touches it, they can ring the bell or choose a Public and Private setting. (Private by default)
    // Private setting will send the notification in private IM in localchat. Only you can read it.
    // Public setting will send the notification in localchat, visible for everybody in range.

    // Like,
    // This script is open source and free. It can't be resold as it is. You can put it in part of your sales
    // as long as you keep the script in fullperm.

    // The title to display above the button. just leave "" if you don't want any
    string ringpanel = "Touch me to ring";

    // The door bell sound. By default it take the first sound available in the prim


    // This is the end of the thing the button will say if someone rings. The name of the clicker will be at the beginning, then its key: Everyone in chat range will hear
    string ringnotice = "is ringing at the door!";

    // Set this to TRUE if you want the notice to display for everyone around and not just you
    integer publicshout = TRUE;

    // Some other junk
    integer antispam;
    key userkey;
    key owner;
    list menuitems;
    integer channel;
    integer listener;

    ringing()
    {
            llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1.0);
            //llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1.0); // Uncomment if sound is not enough loud
            //llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1.0); // Uncomment if sound is not enough loud
            
            if (antispam == FALSE) // That way, the button can still ring but it won't spam you with IMs
            {
                antispam = TRUE;
                llSetTimerEvent(60.0);
                if (publicshout == FALSE) llOwnerSay((llDetectedName(0)) + " " + ringnotice);  // It will say "Display Name (user name) is ringing at your door!" by default
                else llSay(0,(llDetectedName(0)) + (string)userkey + "/inspect " + ringnotice);
            }
    }

    default
    {
        state_entry()
        {
            antispam = FALSE;
            owner = llGetOwner();
            llSetText(ringpanel, <1,1,1>, 1.5);
        }
         on_rez(integer num)
        {
            // Reset script when rezzed
            llResetScript();
        }
        touch_start(integer total_number)
        {
            userkey = llDetectedKey(0);
            if (userkey != owner)  ringing();
            else state ownermenu;
        {
                llSay(0, "Staff contacted, if available, will arrive shortly!");
                llInstantMessage(llGetOwner(), llDetectedName(0) + " rang the bell (floor 2) at " + llGetRegionName());
              }
         }
     
        
        timer()  // ends the antispam timer
        {
            llSetTimerEvent(0.0);
            antispam = FALSE;
        }
    }

    state ownermenu
    {
        state_entry()
        {
            if (publicshout == TRUE) menuitems = ["Private","Ring!","CANCEL"];
            else menuitems = ["Public","Ring!","CANCEL"];
            channel = (integer)llFrand(99999);
            listener = llListen(channel, "", owner, "");
            llDialog(owner, "Doorbell menu\n\nPublic/Private: Choose if you get the notifications in private, or said in local chat.\nRing: Ring the doorbell!", menuitems, channel);
            llSetTimerEvent(30.0);
        }
        
        listen (integer channel, string n, key i, string m)
        {
            if (m == "Public")
            {
                publicshout = TRUE;
                llOwnerSay("Doorbell ringer's name and key will be sent in public chat.");
                llSetTimerEvent(0.0);
                llListenRemove(listener);
                state default;
            }
        
            else if (m == "Private")
            {
                publicshout = FALSE;
                llOwnerSay("Doorbell ringer's name will be sent as private IM in chat.");
                llSetTimerEvent(0.0);
                llListenRemove(listener);
                state default;
            }
        
            else if (m == "Ring!")
            {
                ringing();
                llSetTimerEvent(0.0);
                llListenRemove(listener);
                state default;
            }
        
            else
            {
                llSetTimerEvent(0.0);
                llListenRemove(listener);
                state default;
            }
        }
        
        timer()
        {
            llSetTimerEvent(0.0);
            llListenRemove(listener);
            state default;
        }
    }

    Please Log in or Create an account to join the conversation.

    Time to create page: 0.157 seconds
    Powered by Kunena Forum

    How do I get in?

    If you want to log into the Swiss Grid, you first need a so-called viewer.

    B. the Firestorm. Download here:

    Firestorm Viewer für Opensim

    Download ---> then install ----> then open

    In the example here, the so-called “Phoenix mode” was selected in the viewer. But it works the same in any other mode; don't let the viewer version irritate you either. The login to the Swiss grid also works the same way with every new version.

    It is important that you only download the version for the Opensim (OS). Inworld problems can occur with combination viewers for SL and OS.



     

    Registration steps according to the picture:

    1 Click Viewer in the menu above, then Settings,

    2 Click on the OpenSim tab

    3 Enter the following address in the field: http://swissgrid.opensim.ch:8002/ (copy & paste)

    4 Click Apply

    5 Click OK

    6 Enter your user name (user name that is exactly the same as the login name on the Swissgrid homepage!)

    7 Enter your password (password exactly the same as the login name on the Swissgrid homepage!)

    8 Select Swiss Grid (now you should see the background image as shown above - then you are correct)

    Now click the login button (9) and your new avatar will automatically be taken to the welcome region.

    A little hint: the @ (and gridname) after the username is automatically generated by the viewer.

    You only need to enter your username there.


    We have 284 guests and no members online


    swissgrid.opensim.ch

    © Swissgrid 2018-2022 Impressum:
     Admin: Night Raven    Sili Gal
         CH-8952 Schlieren/ZH