GizmoEclipse

Sub_Monitor.lsl

Oct 1st, 2019
455
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer cur_state;
  2. integer last_state;
  3.  
  4. integer max;
  5. integer prims;
  6. integer percent;
  7. default{
  8.     state_entry(){
  9.         llSetTimerEvent(1.0);
  10.     }
  11.     timer(){
  12.         cur_state=llGetScriptState("0.)Sub_Server.lsl");
  13.         if(cur_state!=last_state){
  14.             llSetLinkColor(8,<1*!llAbs(cur_state),1*llAbs(cur_state),0>,-1);
  15.             last_state=cur_state;
  16.         }
  17.         percent=(prims=llGetParcelPrimCount(llGetPos(), 0, 1))*100/(max=llGetParcelMaxPrims(llGetPos(),1));
  18.         if(cur_state)llSetText("Land Control Online \n Prim Percent Used: "+(string)percent+"%\nPrims Used: "+(string)prims+"/"+(string)max,<1,1,1>,1);
  19.         if(!cur_state)llSetText("Land Control Offline \n Prim Percent Used: "+(string)percent+"%\nPrims Used: "+(string)prims+"/"+(string)max,<1,1,1>,1);
  20.     }
  21. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×