This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Give Money
#1
Hallo in die Runde,

für alle Regionen Betreiber, die einen Money Server aktiv haben und ihren Gästen etwas gutes tun möchten, habe ich folgendes Script geklöppelt

Code:
key uuid;

integer DebitPerms;
default
{
   
      state_entry()
    {
        llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
        llSensorRepeat("", "", AGENT_BY_LEGACY_NAME, 300.0, PI, 60.0);
    }
   
     run_time_permissions (integer perm)
    {
        if  (perm & PERMISSION_DEBIT)
            DebitPerms = TRUE;
    }
   
   sensor(integer num_detected)
    {
        list avatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
        integer numOfAvatars = llGetListLength(avatarsInRegion);

       if (numOfAvatars < 3)
       {
           llSay (0, "Wir benötigen 3 Avatare in der Region um den Zuffi zu starten");
           return;
        }
       
        if (!numOfAvatars)
        {
            llOwnerSay("No avatars found within the region!");
            return;
        }

        integer index;
        while (index < numOfAvatars)
        {
            key id = llList2Key(avatarsInRegion, index);
            string name = llKey2Name(id);
            ++index;
        }
       
        integer i = 0;
        integer j = 1;        for(;i < j; ++i)
        {
            list desc = llParseString2List(llList2String(llListRandomize(avatarsInRegion, i),1), ["#"], []);
            llGiveMoney((key) desc, 200); 
            llSay (0, "Gewinner ist " + llKey2Name ((key) desc) + " und bekommt 200 VL$");
        }
    }
}

Das kleine Script fordert von Euch Zugriff auf Euren Geld Account.  Es fragt in einem einstellbaren Zeitraum die Anzahl der Avatare in der Region ab und ermittelt einen zufälligen Gewinner, der einen einstellbaren Geld Preis erhält. Wie viele Avatare (nicht NPcs) in einer Region sein müssen. kann eingestellt werden.

Dieses Script lasse ich auf meiner Start Region laufen. Vorteil, die User haben irgend wann kein Spielgeld mehr und bleiben im günstigsten Fall auf der Region stehen um Spielgeld zu gewinnen.
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste