Trenza Mall SIM

LMmapTrenzaMall02.jpg

..LSL script
// Multi TP-board

integer col=8;  // 横の分割数
integer row=8;  // 縦の分割数

list tp=[ // "テレポート先","SIM名",位置,

"Cafe Hyades","Trenza MALL",<35,221,22>,//1
"Cafe Hyades","Trenza MALL",<35,221,22>,//2
"Cafe Hyades","Trenza MALL",<35,221,22>,//3
"Cafe Hyades","Trenza MALL",<35,221,22>,//4

"Cafe Hyades","Trenza MALL",<35,221,22>,//5
"Cafe Hyades","Trenza MALL",<35,221,22>,//6
"Planet Blue","Trenza MALL",<205,204,21>,//7
"Planet Blue","Trenza MALL",<205,204,21>,//8

"Cafe Hyades","Trenza MALL",<35,221,22>,//9
"Cafe Hyades","Trenza MALL",<35,221,22>,//10
"Cafe Hyades","Trenza MALL",<35,221,22>,//11
"Cafe Hyades","Trenza MALL",<35,221,22>,//12

"Cafe Hyades","Trenza MALL",<35,221,22>,//13
"Cafe Hyades","Trenza MALL",<35,221,22>,//14
"Planet Blue","Trenza MALL",<205,204,21>,//15
"Planet Blue","Trenza MALL",<205,204,21>,//16


"Cafe Hyades","Trenza MALL",<35,221,22>,//17
"Cafe Hyades","Trenza MALL",<35,221,22>,//18
"Cafe Hyades","Trenza MALL",<35,221,22>,//19
"Cafe Hyades","Trenza MALL",<35,221,22>,//20

"Trenza Mall","Trenza MALL",<158,103,22>,//21
"Trenza Mall","Trenza MALL",<158,103,22>,//22
"Trenza Mall","Trenza MALL",<158,103,22>,//23
"Trenza Mall","Trenza MALL",<158,103,22>,//24

"Cafe Hyades","Trenza MALL",<35,221,22>,//25
"Cafe Hyades","Trenza MALL",<35,221,22>,//26
"Cafe Hyades","Trenza MALL",<35,221,22>,//27
"Cafe Hyades","Trenza MALL",<35,221,22>,//28

"Trenza Mall","Trenza MALL",<158,103,22>,//29
"Trenza Mall","Trenza MALL",<158,103,22>,//30
"Trenza Mall","Trenza MALL",<158,103,22>,//31
"Trenza Mall","Trenza MALL",<158,103,22>,//32


"Cafe Hyades","Trenza MALL",<35,221,22>,//33
"Cafe Hyades","Trenza MALL",<35,221,22>,//34
"Trenza Mall","Trenza MALL",<158,103,22>,//35
"Trenza Mall","Trenza MALL",<158,103,22>,//36

"Trenza Mall","Trenza MALL",<158,103,22>,//37
"Trenza Mall","Trenza MALL",<158,103,22>,//38
"Trenza Mall","Trenza MALL",<158,103,22>,//39
"Trenza Mall","Trenza MALL",<158,103,22>,//40

"Cafe Hyades","Trenza MALL",<35,221,22>,//41
"Cafe Hyades","Trenza MALL",<35,221,22>,//42
"Trenza Mall","Trenza MALL",<158,103,22>,//43
"Trenza Mall","Trenza MALL",<158,103,22>,//44

"Trenza Mall","Trenza MALL",<158,103,22>,//45
"Trenza Mall","Trenza MALL",<158,103,22>,//46
"Trenza Mall","Trenza MALL",<158,103,22>,//47
"Trenza Mall","Trenza MALL",<158,103,22>,//48


"Trenza Info","Trenza MALL",<246,12,24>,//49
"Trenza Info","Trenza MALL",<246,12,24>,//50
"MAYNABABY","Trenza MALL",<69,59,21>,//51
"Trenza Mall","Trenza MALL",<158,103,22>,//52

"Trenza Mall","Trenza MALL",<158,103,22>,//53
"Script Shop 3","Trenza MALL",<175,42,21>,//54
"Trenza Info","Trenza MALL",<246,12,24>,//55
"Trenza Info","Trenza MALL",<246,12,24>,//56

"Trenza Info","Trenza MALL",<246,12,24>,//57
"Trenza Info","Trenza MALL",<246,12,24>,//58
"Trenza Mall","Trenza MALL",<158,103,22>,//59
"MonaLovaIsland","Trenza MALL",<111,5,21>,//60

"Trenza Mall","Trenza MALL",<158,103,22>,//61
"Trenza Mall","Trenza MALL",<158,103,22>,//62
"Trenza Info","Trenza MALL",<246,12,24>,//63
"Trenza Info","Trenza MALL",<246,12,24>,//64

NULL_KEY];  // データの最後のカンマ用
integer len;

string slurl(integer i)
{  // SLURL生成
    vector v=llList2Vector(tp,i+2);
    string str=llList2String(tp,i);
    // SIM名をブランクにしてるものは閉店表示
    if (llList2String(tp,i+1) == "") return str+"... closed\n";
    str+=" http://slurl.com/secondlife/";
    str+=llEscapeURL(llList2String(tp,i+1));
    str+="/"+(string)((integer)v.x);
    str+="/"+(string)((integer)v.y);
    str+="/"+(string)((integer)v.z)+" \n";
    return str;
}

map(integer num)
{  // マップ表示用
    integer i=num*3;
    if (i >= len) {  // テレポートの登録数が少ないとき
        llWhisper(0,"This area is a blank.");
        return;  // リターン
    }
    string sim=llList2String(tp,i+1);
    vector pos=llList2Vector(tp,i+2);
    if (sim) llMapDestination(sim,pos,ZERO_VECTOR);  // マップ表示
    llWhisper(0,slurl(i));  // SLURL表示
}

default
{
    state_entry()
    {
        len=llGetListLength(tp)-1;  // ヌルキーを除いたリストの長さ
    }

    touch_start(integer total_number)
    {
        integer i=llDetectedTouchFace(0);  // タッチした面の番号を取得
        if (i != -1) { // SLビューワーが対応のとき
            vector v=llDetectedTouchST(0);  // タッチした表面の座標
            i=llFloor(v.x*col)+(row-llCeil(v.y*row))*col;  // 座標を番号に変換
            map(i);  // mapへ
        }
        else { // SLビューワーが非対応だったらSLURLを全部表示
            string str="Open the chat histry and click the SLURL.\n";
            for (i=0; i < len; i+=3) str+=slurl(i);
            llWhisper(0,str);  // チャットでSLURL表示
        }
    }
}



  • 最終更新:2012-03-22 11:00:22

このWIKIを編集するにはパスワード入力が必要です

認証パスワード