OpenSimulator

出自TWEmu.no-ip.org

跳轉到: 導航, 搜尋
OpenSimulator
OpenSimulator

整理資料的頁面

目錄

安裝

簡易單機版

  1. 下載登入程式 (二選一)
    1. http://sourceforge.net/project/platformdownload.php?group_id=235285
    2. http://secondlife.com/support/downloads.php (後面比較難設定, 這是官方 Second Life 的登入程式) / http://wiki.secondlife.com/wiki/Source_archive (原始碼)

伺服器安裝

  1. 下載 伺服端 http://opensimulator.org/wiki/Download (現在最新版本為 0.6.4), 注意 External Host Name 需為本機 ip (如果是沒有要對外的話就用預設)
  2. 解壓安裝並執行伺服端, 預設帳號密碼為 FirstName:Test, LastName:User, Password:test
  3. 防火牆開 tcp:9000 和 udp:9000
  4. 登入端 grids 選 local, 將 127.0.0.1 改為現在機器 ip , 就可以進入 沙箱模式

Debian

註冊

系統設定參考

64-Bits linux [1]

av_capsule_standup_tensor_linux = 1700000
; Aenderung RH: 64bit Linux use av_capsule_standup_tensor_linux = 1700000, inestead of 550000

64-Bits JPG2000 Decode Problem [2]

升級

需修改檔案

  • Opensim.ini
  • config-include/ 下的檔案 (一般不用)

完整複製檔案

  • Regions/*
  • estate_settings.xml
  • *.db

Test Region

  • TWEmuATTaiwan@osgrid.org (10000,9960)

Scripts

青菜天氣雲圖 0.1 (this's under GPL)

default {
    state_entry()
    {
            llSetText("青菜天氣雲圖 0.1 (Weather Map of Taiwan), 請點我更新 (Touch to reload)",<1,1,1>,1);
    }
    touch_start(integer total_number)
    {
        llSay( 0, "青菜天氣雲圖系統 0.1");
        string  dynamicID="";
        integer refreshRate = 6000;
        string contentType="image";
        
        integer Years = (integer) llGetSubString(llGetTimestamp(),0,3);
        integer Months = (integer) llGetSubString(llGetTimestamp(),5,6);
        integer Days = (integer) llGetSubString(llGetTimestamp(),8,9);
        integer Hours = (integer) llGetSubString(llGetTimestamp(),11,12);
        integer OffSet = 8;
        list SeqDays = [31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

        if (Years % 4 == 0 && (Years % 100 != 0 || Years % 400 == 0)) {
            SeqDays = llListReplaceList(SeqDays, [29], 2, 2);
        }
        
        Hours = Hours + OffSet;
        
        if (Hours>23)
        {
            Hours = Hours - 24;
            Days = Days + 1;
            if (Days > llList2Integer(SeqDays, Months))
            {
                Days = 1;
                Months = Months + 1;
                if (Months > 12)
                {
                    Months = 1;
                    Years = Years + 1;
                }
            }
        }
        string strYear = (string) Years;
        string strMonth = (string) Months;
        string strDay = (string) Days;
        string strHour = (string) Hours;
        
        if (llStringLength(strMonth) < 2) { strMonth = "0" + strMonth; }
        if (llStringLength(strDay)   < 2) { strDay   = "0" + strDay;   }
        if (llStringLength(strHour)  < 2) { strHour  = "0" + strHour;  }

        string srcURL = "http://www.weatherrisk.com/images/jwa_3_animate.gif";
        string srcURL2 = "http://www.cwb.gov.tw/V6/observe/satellite/Data/s1p/s1p-2009-10-20-18-00.jpg";
        string srcURL3 = "http://www.cwb.gov.tw/V6/observe/satellite/Data/s1p/s1p-"+ strYear + "-" + strMonth + "-" + strDay + "-" + strHour +"-00.jpg";

        string URLTexture=osSetDynamicTextureURL(dynamicID, contentType ,srcURL3 , "", refreshRate ); 


        
        if (llStringLength(URLTexture)>0) 
        {
            llSay(0, srcURL3);
            llSay(0, strYear + "-" + strMonth + "-" + strDay + "-" + strHour);
            llSay(0,"URLTexture = "+URLTexture);
            llSetTexture(URLTexture, ALL_SIDES);
        }
    }
}

設計

Chan

教學

參考