<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SmarTek+Engineer</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SmarTek+Engineer"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/SmarTek_Engineer"/>
	<updated>2026-06-28T19:40:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171840</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171840"/>
		<updated>2012-08-21T01:18:24Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
Takes into account how many avatars are in the sim, for proper load balancing,&lt;br /&gt;
which means that if the sim is empty, all RAM/CPU is allowed for use for a single avatar, since it wont cause an impact on performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator &lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=209715200; //bytes- 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;//seconds- Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
      if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171839</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171839"/>
		<updated>2012-08-21T01:16:09Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
Takes into account how many avatars are in the sim, for proper load balancing,&lt;br /&gt;
which means that if the sim is empty, all RAM/CPU is allowed for use for a single avatar, since it wont cause an impact on performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator &lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=200000000; //bytes- 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;//seconds- Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
      if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171838</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171838"/>
		<updated>2012-08-20T22:58:05Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
Takes into account how many avatars are in the sim, for proper load balancing,&lt;br /&gt;
which means that if the sim is empty, all RAM/CPU is allowed for use for a single avatar, since it wont cause an impact on performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator &lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=314572800; //bytes- 300MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;//seconds- Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
      if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171837</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171837"/>
		<updated>2012-08-20T22:55:57Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
Takes into account how many avatars are in the sim, for proper load balancing,&lt;br /&gt;
which means that if the sim is empty, all RAM/CPU is allowed for use for a single avatar, since it wont cause an impact on performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator &lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=314572800; // 300MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;// Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
      if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171833</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171833"/>
		<updated>2012-08-20T21:50:29Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator &lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=200000000; // 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;// Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
      if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=CatAvatar&amp;diff=1171832</id>
		<title>CatAvatar</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=CatAvatar&amp;diff=1171832"/>
		<updated>2012-08-20T21:35:54Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}{{RightToc}}&lt;br /&gt;
==Avatar and Groups==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
|- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||[[Display Names to Key]]&lt;br /&gt;
||[[User:Joran Yoshikawa|Joran Yoshikawa]]&lt;br /&gt;
||Simple way to get UUIDs from displaynames&lt;br /&gt;
|-&lt;br /&gt;
||[[User:Daemonika_Nightfire/Scripts/DS_Display-Username_Online_Indicator|*DS*_Display-Username_Online_Indicator]]&lt;br /&gt;
||[[User:Daemonika Nightfire|Daemonika Nightfire]]&lt;br /&gt;
||This simple hover text-based script is used to shop owners in Second Life, customers at the current display name and user name to display publicly. Additionally shows the status of the Userkey and online. Furthermore, there are click of a chat link that opens the profile owner. &lt;br /&gt;
|-&lt;br /&gt;
||[[Find Avatar Key|Find Avatar Key]]&lt;br /&gt;
||[[User:Huney Jewell|Huney Jewell]]&lt;br /&gt;
||Explores [[UUID]] of avatar whose name is said in local chat or who touches the prim.&lt;br /&gt;
|-&lt;br /&gt;
||[[Group Information v1.0]]&lt;br /&gt;
||[[User:Tyrennic Rivera|Tyrennic Rivera]]&lt;br /&gt;
||When clicked the prim will show group information (set on the prim) from the official Second Life Search page.&lt;br /&gt;
|-&lt;br /&gt;
||[[Group key finder]]&lt;br /&gt;
||[[User:Emmas Seetan|Emmas Seetan]]&lt;br /&gt;
||Touch to find the key of the group&lt;br /&gt;
|-&lt;br /&gt;
||[[Hello Avatar]]&lt;br /&gt;
||Linden Lab&lt;br /&gt;
||SL&#039;s default script.&lt;br /&gt;
|-&lt;br /&gt;
||[[Hello Avatar Companion]]&lt;br /&gt;
||[[Chase Quinnell]]&lt;br /&gt;
||Companion to the original [[Hello Avatar]] script&lt;br /&gt;
|-&lt;br /&gt;
||[[Name2Key in LSL]]&lt;br /&gt;
||[[User:Maeva Anatine|Maeva Anatine]]&lt;br /&gt;
||Get the Name2Key feature inside your scripts. Works even on lastly subscribed avatars.&lt;br /&gt;
|-&lt;br /&gt;
||[[Online Indicator|Online Indicator]]&lt;br /&gt;
||[[User:Kristy Fanshaw|Kristy Fanshaw]]&lt;br /&gt;
||Will show if the user is online or not. Displays users profile picture and allows to send IM&#039;s to user. Also gives a link to open the users profile&lt;br /&gt;
|-&lt;br /&gt;
||[[Open Group Join]]&lt;br /&gt;
||[[User:Alicia Stella|Alicia Stella]]&lt;br /&gt;
||User Touches Object to Join Group from Group Info window, (no bot.)&lt;br /&gt;
|-&lt;br /&gt;
||[[Resource Impact Calculator]]&lt;br /&gt;
||[[User:SmarTek Engineer|SmarTek Engineer]]&lt;br /&gt;
||Use to control the lag caused by avatars, maximizing sim&#039;s performance. &lt;br /&gt;
|-&lt;br /&gt;
||[[Scripted Attachment Detector.lsl|Scripted Attachment Detector]]&lt;br /&gt;
||{{User|Bobbyb30 Swashbuckler}}&lt;br /&gt;
||A script that will display avatars wearing scripted attatchments in hovertext. This may be worn as an hud or rezzed. &lt;br /&gt;
|-&lt;br /&gt;
||[[User:PixelProphet Lane/Scripts#Show Agent Script Count and memory|Show Agent Script Count and memory]]&lt;br /&gt;
||[[User:PixelProphet Lane|PixelProphet Lane]]&lt;br /&gt;
||Fast and efficient method to display the amount of scripts and memory usage for an agent&lt;br /&gt;
|-&lt;br /&gt;
||[[Under Age Boot]]&lt;br /&gt;
|[[User:Chance Unknown|Chance Unknown]]&lt;br /&gt;
||Security device example to teleport home accounts below a minimum age limit; can be useful in combating free griefer accounts.&lt;br /&gt;
|-&lt;br /&gt;
||[[Unmutable Descript Nagger]]&lt;br /&gt;
|[[User:Bobbyb30 Zohari|Bobbyb30 Zohari]]&lt;br /&gt;
||To nag avatars to take off their scripted attatchments.&lt;br /&gt;
|-&lt;br /&gt;
||[[UUID Song Generator]]&lt;br /&gt;
||{{User|Sendao Goodman}}&lt;br /&gt;
||Translates a UUID into a simple song and plays it.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{LSLC|}}&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171831</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171831"/>
		<updated>2012-08-20T21:33:47Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatars====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator.&lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=200000000; // 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;// Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
integer maxavi=100;// Avatars the simulator can host.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
	&lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
  	if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171830</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171830"/>
		<updated>2012-08-20T21:33:35Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator caused by Avatar====&lt;br /&gt;
Use to control the lag caused by avatars, maximizing sim&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator.&lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=200000000; // 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;// Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
integer maxavi=100;// Avatars the simulator can host.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
	&lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
  	if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171829</id>
		<title>Resource Impact Calculator</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Resource_Impact_Calculator&amp;diff=1171829"/>
		<updated>2012-08-20T21:31:56Z</updated>

		<summary type="html">&lt;p&gt;SmarTek Engineer: Created page with &amp;quot;{{LSL Header}} ====Resource Impact Calculator====   &amp;lt;lsl&amp;gt; /*  Sim resource impact calculator.  Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resour…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
====Resource Impact Calculator====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 Sim resource impact calculator.&lt;br /&gt;
 Call impactCPU(uuid) or/and impactRAM(uuid) to get the percentage of allowed resources the avatar is using.&lt;br /&gt;
 Data returned is integer type [0-100].&lt;br /&gt;
*/&lt;br /&gt;
integer maxRAM=200000000; // 200MB server RAM is usually what simulators use for scripting&lt;br /&gt;
float maxload=0.040;// Maximum allowed latency in miliseconds due scripting load on the simulator, 40-80ms is normal.&lt;br /&gt;
integer maxavi=100;// Avatars the simulator can host.&lt;br /&gt;
&lt;br /&gt;
integer impactCPU(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_TIME]), 0)/(maxload/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
integer impactRAM(key id){&lt;br /&gt;
return (integer)(llList2Float(llGetObjectDetails(id, [OBJECT_SCRIPT_MEMORY]), 0)/(maxRAM/maxavi*maxavi/llGetRegionAgentCount())*100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
	&lt;br /&gt;
   touch_start(integer num_detected) {&lt;br /&gt;
    key id=llDetectedKey(0);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;CPU usage: &amp;quot;+(string)(impactCPU(id))+&amp;quot;%&amp;quot;);&lt;br /&gt;
    llInstantMessage(id,&amp;quot;RAM usage: &amp;quot;+(string)(impactRAM(id))+&amp;quot;%&amp;quot;);//example of informational message&lt;br /&gt;
    if(impactRAM(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the memory usage limit.&amp;quot;); //example of warning message&lt;br /&gt;
  	if(impactCPU(id)&amp;gt;100)llInstantMessage(id,&amp;quot;You&#039;ve hit the CPU usage limit.&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Examples]]&lt;/div&gt;</summary>
		<author><name>SmarTek Engineer</name></author>
	</entry>
</feed>