zoukankan      html  css  js  c++  java
  • helloworld program of Linden Scripting Language

    Code
    default
    {
        state_entry()
        {
                   
    // llResetScript();
            llListen(0,"","","");
            
    // listens for just the owner, on channel 0
        }

        listen(integer chan, 
    string name, key id, string mess)
        {
            
    if(mess == "hello"){
               llOwnerSay(
    "hello world!");
               llOwnerSay((
    string)id);
               llOwnerSay(name);
               llOwnerSay((
    string)chan);
            }
        }
    }

    sit for teleport script

    Code
    vector target=<17,17,129>// Enter the target coordinates here!!! 
    default 

        state_entry() 
        { 
            llSetText(
    "talking in the sky",<255,255,255>,5); 
            llSetSitText(
    "Teleport"); 
            rotation my_rot
    =llGetRot(); 
            llSitTarget((target 
    - llGetPos()) / my_rot,ZERO_ROTATION / my_rot); 
        } 
        changed(integer change) 
        { 
            llUnSit(llAvatarOnSitTarget()); 
        } 

     简单的单词查询功能

    Code
    key url;
    default
    {
        state_entry()
        {
            llListen(
    1,"",NULL_KEY,"");
        }
        
        touch_start(integer totalnums){
            llOwnerSay(
    "type the unfamilar words here for translate.For example:");
            llOwnerSay(
    "/1 hello"); 
        }
        
        listen( integer channel, 
    string name, key id, string message )
        {
            
    //llOwnerSay(message);
            
    //url = llHTTPRequest("http://dict.cn/mini.php?q=" + message + "&utf8=true",[],"");
            
    //llWhisper(0,message);
            url = llHTTPRequest("http://tstring.com.cn/dict.aspx?q="+llEscapeURL(message)+"&o=korn",[],"");
            
    //llWhisper(0,"http://tstring.com.cn/dict.aspx?q="+ message);
        }
        
        http_response(key request_id, integer status, list metadata, 
    string body)
        {
            
    if (request_id == url);
            {
                
    //llOwnerSay((string)status);
                llOwnerSay(body);
            }
        }
    }

    http://oz.slinked.net/history/lsl2_reference.htm

    http://lslwiki.net/lslwiki/wakka.php?wakka=glossary

  • 相关阅读:
    windows环境下安装mysql5.7.20
    一次完成对多个子节点的全部父级节点查询
    更新数据库中值为拼接字符串的字段
    根据父节点编号查询子节点名称,孙节点个数
    Java文件流下载并提示文件不存在
    Nginx 反向代理Tomcat服务器获取真实IP问题
    Tomcat启动堆栈异常
    转一些思想 代码大全的
    一些方案
    UML建模工具
  • 原文地址:https://www.cnblogs.com/kkun/p/1577720.html
Copyright © 2011-2022 走看看