Fermat SIM(Mainland)

LMmapfermat02.jpg

LSL script


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

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

"R.A.Crystal","Fermat",<60,157,49>,//1
"R.A.Crystal","Fermat",<60,157,49>,//2
"R.A.Crystal","Fermat",<60,157,49>,//3
"R.A.Crystal","Fermat",<60,157,49>,//4

"*+Crie Style+*","Fermat",<164,208,58>,//5
"*+Crie Style+*","Fermat",<164,208,58>,//6
"*+Crie Style+*","Fermat",<164,208,58>,//7
"*+Crie Style+*","Fermat",<164,208,58>,//8

"R.A.Crystal","Fermat",<60,157,49>,//9
"R.A.Crystal","Fermat",<60,157,49>,//10
"R.A.Crystal","Fermat",<60,157,49>,//11
"R.A.Crystal","Fermat",<60,157,49>,//12

"*+Crie Style+*","Fermat",<164,208,58>,//13
"*+Crie Style+*","Fermat",<164,208,58>,//14
"*+Crie Style+*","Fermat",<164,208,58>,//15
"*+Crie Style+*","Fermat",<164,208,58>,//16


"R.A.Crystal","Fermat",<60,157,49>,//17
"R.A.Crystal","Fermat",<60,157,49>,//18
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//19
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//20

"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//21
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//22
"*+Crie Style+*","Fermat",<164,208,58>,//23
"*+Crie Style+*","Fermat",<164,208,58>,//24

"H&G Info","HandG",<145,128,20>,//25
"H&G Info","HandG",<145,128,20>,//26
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//27
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//28

"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//29
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//30
"*+Crie Style+*","Fermat",<164,208,58>,//31
"*+Crie Style+*","Fermat",<164,208,58>,//32


"Ein peixe","Fermat",<28,19,61>,//33
"Ein peixe","Fermat",<28,19,61>,//34
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//35
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//36

"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//37
"Trenza Maze & AIR Camp","Fermat",<168,129,49>,//38
"La petite fleur","Fermat",<196,95,49>,//39
"La petite fleur","Fermat",<196,95,49>,//40

"Ein peixe","Fermat",<28,19,61>,//41
"Ein peixe","Fermat",<28,19,61>,//42
"Trenza Creator's Factory","Fermat",<128,118,1502>,//43
"Trenza Creator's Factory","Fermat",<128,118,1502>,//44

"Trenza Creator's Factory","Fermat",<128,118,1502>,//45
"Trenza Creator's Factory","Fermat",<128,118,1502>,//46
"La petite fleur","Fermat",<196,95,49>,//47
"La petite fleur","Fermat",<196,95,49>,//48


"Ein peixe","Fermat",<28,19,61>,//49
"Ein peixe","Fermat",<28,19,61>,//50
"Ein peixe","Fermat",<28,19,61>,//51
"Ein peixe","Fermat",<28,19,61>,//52

"La petite fleur","Fermat",<196,95,49>,//53
"La petite fleur","Fermat",<196,95,49>,//54
"La petite fleur","Fermat",<196,95,49>,//55
"La petite fleur","Fermat",<196,95,49>,//56

"Ein peixe","Fermat",<28,19,61>,//57
"Ein peixe","Fermat",<28,19,61>,//58
"Ein peixe","Fermat",<28,19,61>,//59
"Ein peixe","Fermat",<28,19,61>,//60

"La petite fleur","Fermat",<196,95,49>,//61
"La petite fleur","Fermat",<196,95,49>,//62
"La petite fleur","Fermat",<196,95,49>,//63
"La petite fleur","Fermat",<196,95,49>,//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:05:39

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

認証パスワード