Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Anti- Idle Script Mod- Will Compensate

Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
02-24-2008 08:41
** Thanks to all that replied! have the solution in hand and happy as a clam- thanks again**

Found an excellent anti idle script I use all the time and it works a good 98% of the time stopping my av from being logged out-

CODE

// Super simple stay awake HUD. Looks like an "8" when off (green)
// and a lemniscate (infinity) when on (red)
// Public Domain by Noland Brokken.
//
vector C0 = <0,0.4,0>; // Off Color
vector C1 = <1,0.0,0>; // On Color
vector C2 = <1,1,1>; // Triggered Color
float timespan = 0.5; // time between checks
float Volume = 1.0; // Volume for sound fx (0.0 - 1.0)


key OwnerKey;
integer active;
integer numsounds;
string soundfile;

upd()
{
llSetLinkColor(ALL_SIDES,llList2Vector([C0,C1],active),ALL_SIDES);
llSetTimerEvent(active * timespan);
llSetRot(llEuler2Rot(<active * PI_BY_TWO,0,0>));
}

default
{
state_entry()
{
OwnerKey = llGetOwner();
active = FALSE;
numsounds = llGetInventoryNumber(INVENTORY_SOUND);
if (!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION))
{
llRequestPermissions(OwnerKey, PERMISSION_TRIGGER_ANIMATION);
}
upd();
}
on_rez(integer r)
{
llOwnerSay("Click me to enable/disable. RED is on. GREEN is off.");
}

changed(integer change)
{
if(change & (128 | CHANGED_INVENTORY))
// You'd better put this in the
// changed() event when you use llGetOwner
{ // by way of precaution.
llResetScript();
}
}

timer()
{
if (llGetAgentInfo(OwnerKey) & AGENT_AWAY) {
llSetLinkColor(ALL_SIDES,C2,ALL_SIDES);
do { llStopAnimation("away");}
while (llGetAgentInfo(OwnerKey) & AGENT_AWAY);
integer n = llFloor(llFrand((float)numsounds- .00001));
soundfile = llGetInventoryName(INVENTORY_SOUND, n);
if (Volume > 0.0)
if (llGetInventoryType(soundfile) != -1)
llTriggerSound(soundfile, Volume);
llSetLinkColor(ALL_SIDES,C1,ALL_SIDES);
}
}
touch_start(integer n)
{
if (llDetectedKey(0) != OwnerKey) return;
active = !active;
upd();
}
}
CODE
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
02-24-2008 09:25
Define your textures in place of C0, C1, and C2:

string T0 = "texture0"; // Off Texture
string T1 = "texture1"; // On Texture
string T2 = "texture2"; // Triggered Texture


Replace the llSetLinkColor lines of code with llSetLinkTexture:

llSetLinkTexture(LINK_SET, llList2String([T0, T1], active), ALL_SIDES);

llSetLinkTexture(LINK_SET, T2, ALL_SIDES);

llSetLinkTexture(LINK_SET, T1, ALL_SIDES);


Untested, but I think that should do the trick. :)
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
02-24-2008 10:42
You have an anti idle in Client options

press ctrl alt D to enable them

Go to Clinet/Character/Character Tetst and Untick "Go away/afk when idle"