Knarley SIM(Mainland)

LMmapknarley02.jpg

LSL script


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

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


"Knarley","Knarley",<203,97,28>,//1
"Knarley","Knarley",<203,97,28>,//2
"Knarley","Knarley",<203,97,28>,//3
"Knarley","Knarley",<203,97,28>,//4

"ScriptsShop Aries","Knarley",<154,202,35>,//5
"ScriptsShop Aries","Knarley",<154,202,35>,//6
"Knarley","Knarley",<203,97,28>,//7
"Knarley","Knarley",<203,97,28>,//8

"Knarley","Knarley",<203,97,28>,//9
"Knarley","Knarley",<203,97,28>,//10
"Knarley","Knarley",<203,97,28>,//11
"Knarley","Knarley",<203,97,28>,//12

"ScriptsShop Aries","Knarley",<154,202,35>,//13
"ScriptsShop Aries","Knarley",<154,202,35>,//14
"Knarley","Knarley",<203,97,28>,//15
"Knarley","Knarley",<203,97,28>,//16


"#PUNK LIVES#","Knarley",<64,160,27>,//17
"#PUNK LIVES#","Knarley",<64,160,27>,//18
"#PUNK LIVES#","Knarley",<64,160,27>,//19
"#PUNK LIVES#","Knarley",<64,160,27>,//20

"Knarley","Knarley",<203,97,28>,//21
"Knarley","Knarley",<203,97,28>,//22
"Knarley","Knarley",<203,97,28>,//23
"Knarley","Knarley",<203,97,28>,//24

"#PUNK LIVES#","Knarley",<64,160,27>,//25
"#PUNK LIVES#","Knarley",<64,160,27>,//26
"#PUNK LIVES#","Knarley",<64,160,27>,//27
"#PUNK LIVES#","Knarley",<64,160,27>,//28

"Knarley","Knarley",<203,97,28>,//29
"Knarley","Knarley",<203,97,28>,//30
"Knarley","Knarley",<203,97,28>,//31
"Knarley","Knarley",<203,97,28>,//32


"Knarley","Knarley",<203,97,28>,//33
"Knarley","Knarley",<203,97,28>,//34
"*+:.TOYBOX.:+*","Knarley",<91,89,33>,//35
"*+:.TOYBOX.:+*","Knarley",<91,89,33>,//36

"Knarley","Knarley",<203,97,28>,//37
"Knarley","Knarley",<203,97,28>,//38
"Knarley","Knarley",<203,97,28>,//39
"Knarley","Knarley",<203,97,28>,//40

"Knarley","Knarley",<203,97,28>,//41
"Knarley","Knarley",<203,97,28>,//42
"*+:.TOYBOX.:+*","Knarley",<91,89,33>,//43
"*+:.TOYBOX.:+*","Knarley",<91,89,33>,//44

"Knarley","Knarley",<203,97,28>,//45
"Knarley","Knarley",<203,97,28>,//46
"Knarley","Knarley",<203,97,28>,//47
"Knarley","Knarley",<203,97,28>,//48


"saly","Knarley",<26,33,36>,//49
"saly","Knarley",<26,33,36>,//50
"Knarley","Knarley",<203,97,28>,//51
"Dream Factory","Knarley",<143,41,28>,//52

"Dream Factory","Knarley",<143,41,28>,//53
"Otama Vehicle Factory","Knarley",<201,40,22>,//54
"Otama Vehicle Factory","Knarley",<201,40,22>,//55
"Otama Vehicle Factory","Knarley",<201,40,22>,//56

"saly","Knarley",<26,33,36>,//57
"saly","Knarley",<26,33,36>,//58
"Knarley","Knarley",<203,97,28>,//59
"Dream Factory","Knarley",<143,41,28>,//60

"Dream Factory","Knarley",<143,41,28>,//61
"Otama Vehicle Factory","Knarley",<201,40,22>,//62
"Otama Vehicle Factory","Knarley",<201,40,22>,//63
"Otama Vehicle Factory","Knarley",<201,40,22>,//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:06:17

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

認証パスワード