tp réservés à un groupe

Répondre
Partager Rechercher
Bonsoir,
je possède ce script qui marche bien, exactement comme je veut, à un détail prêt, je ne crois pas qu'il soit possible à ce stade là, de réserver ce téléporteur uniquement à un groupe en particulier (ou plusieurs) et j'aimerais que quelqu'un m'aide :
-soit en modifiant celui ci
-soit en m'aidant à m'en procurer un autre sur le même système, et permettant cette "réservation"

voici le script en question, si besoin est :

Code:
// Cubey's multi-destination teleporter
// May 15, 2005
// Script to use the llSitTarget properties to act as a teleporter. 
// Free to use, modify, and distribute. Not for resale!

// Destination can be 300m away, maximum. This limit is determined by LL's limitations on the use of llSitTarget.


// HOW TO SET UP TELEPORTER:
// STEP 1. Place this teleporter, then place the target teleport chamber. 


// STEP 2. Specify the total number of destinations that are to be used. Max number is no more than the destinations listed below.
integer totalDest = 4;


// STEP 3. Go to the destination chamber, write down its X, Y, and Z position, then come back and enter those values here. X and Y are the horizontal coords on your mini-map. Z is the height. For example, if your target is at Abbotts(100,54) at an altitude of 41.5 meters, enter a vector of <100, 54, 41.5>. 

// NOTE: This script only permits destinations within the same sim as the teleporter.

// Enter the destinations here:
vector dest1 = <128.0, 128.0, 128.0>;  
vector dest2 = <128.0, 128.0, 128.0>;
vector dest3 = <128.0, 128.0, 128.0>;
vector dest4 = <128.0, 128.0, 128.0>;


// STEP 4. Replace name of destinations with a short name. Example: "second floor".
string dest1_name = "REPLACE THIS WITH A DESTINATION NAME";
string dest2_name = "REPLACE THIS WITH A DESTINATION NAME";
string dest3_name = "REPLACE THIS WITH A DESTINATION NAME";
string dest4_name = "REPLACE THIS WITH A DESTINATION NAME";



// STEP 5. Replace description of destinations with a short description. These will appear when the user clicks the button. Example: "living room and private bar".
string dest1_desc = "REPLACE THIS WITH A DESTINATION DESCRIPTION";
string dest2_desc = "REPLACE THIS WITH A DESTINATION DESCRIPTION";
string dest3_desc = "REPLACE THIS WITH A DESTINATION DESCRIPTION";
string dest4_desc = "REPLACE THIS WITH A DESTINATION DESCRIPTION";


// STEP 6. Done! Now test it. 











// ------------------------- NO NEED TO MODIFY ANYTHING BELOW THIS LINE -------------------------
integer currentDestNum = 1;
vector currentDest;
string currentDestName;
string currentDestDesc;


rotate_to_zero()
{
    llSetRot(<0,0,0,0>);
}

setDestination()
{
    if (currentDestNum == 1)
    {
        currentDest = dest1;
        currentDestName = dest1_name;
        currentDestDesc = dest1_desc;
    }
    else if (currentDestNum == 2)
    {
        currentDest = dest2;
        currentDestName = dest2_name;
        currentDestDesc = dest2_desc;
    }
    else if (currentDestNum == 3)
    {
        currentDest = dest3;
        currentDestName = dest3_name;
        currentDestDesc = dest3_desc;
    }
    else if (currentDestNum == 4)
    {
        currentDest = dest4;
        currentDestName = dest4_name;
        currentDestDesc = dest4_desc;
    }
    
    vector pos = llGetPos();
    vector offset = currentDest - pos;

    llSitTarget(offset, ZERO_ROTATION);
    
    string hoverText = "TELEPORT TO:\n"+currentDestName+"\n"+currentDestDesc+"\n\.\n(click to choose destination)";
    llSetText(hoverText,<0,1,0>,1);
}

default
{
    state_entry()
    {
        rotate_to_zero();
        setDestination();
        llSetSitText("Teleport");
    }
    on_rez(integer num)
    {
        llResetScript();
    }
    changed(integer change)
    {
        if (change & CHANGED_LINK)
        {
            if (llAvatarOnSitTarget() != NULL_KEY)
            {
                llMessageLinked(LINK_SET, 0, "teleporting", "");
                llUnSit(llAvatarOnSitTarget());
            }
        }
    }
    touch_start(integer total_number)
    {
        currentDestNum += 1;
        if (currentDestNum > totalDest) currentDestNum = 1;
        rotate_to_zero();
        setDestination();
    }
}
merci d'avance pour votre aide, qui je l'espère sera réussie,

je vous donne mon pseudo sur SL au cas ou (mais je ne serais pas là ce week end) : Kravin Gufler
__________________
http://img151.imageshack.us/img151/4711/bann01copiezm5.jpg
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés