helloworld program of Linden Scripting Language

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

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());
}
}
简单的单词查询功能

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);
}
}
}
------------------------------------------
除非特别声明,文章均为原创,版权与博客园共有,转载请保留出处
BUY ME COFFEE


【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架