LlAddToLandPassList

来自人工智能助力教育知识百科
Ty讨论 | 贡献2020年3月2日 (一) 12:46的版本
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function:integer lladdtolandpasslist(key avatar,float hours).
注意事项
This function causes the script to sleep for 0.1 seconds.The maximum usable value for hours is 144.Any value greater than 144 will be silently reduced to 144.
示例
示例1

string command;

default {

 state_entry()
 {
   llListen(5,"",llGetOwner(),"");
 }
 on_rez(integer param)
 {
   llResetScript();
 }
 listen(integer chan, string name,key id,string message)
 {
   if (command!="")
   {
     llOwnerSay("Sorry,still processing last command, try again in a second.");
   }
   list args = llParseString2List(message,[":"],[]);
   command=llToLower(llList2String(args,0));
   
   if (command=="clearbans")
   {
     llResesLandBanList();
   }
   if (command =="clearpass")
   {
     llResetLandPassList();
   }
   else
   {
     llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
   }
 }
 no_sensor()
 {
   command = "";
 }
 sensor(integer num)
 {
   integer i = 0;
   fo(:i<num:++i)
   {
     if (command == "ban"
     {
       //ban indefinetely
       llAddToLandBanList(llDetectedKey(i),0.0);
     }
     if(command=="tempban")
     {
       //ban for 1 hour.
       llAddToLandBanList(llDetectedKey(i),1.0);
     }
     if(command=="urban")
     {
       llRemoveFromLandBanList(llDetectedKey(i));
     }
     if (command=="pass")
     {
       //Add to land pass lis for 1 hour
       llAddToLandPassList(llDetectedKey(i),1.0);
     }
     if(command=="ubpass")
     {
       llRemoveFromLandPassList(llDetectedKey(i));
     }
   }
   command = "";
 }

}

相关函数
llAddToLandPassList

llRemoveFromLandBanList llRemoveFromLandPassList llResetLandBanList llResetLandPassList

相关事件