Jump Limiter

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Jump Limiter

--BETLOG Hax UTC+10: 20090707 1407 [SLT: 20090706 2107]

My 200-300 ping makes the standard SL jump height kind of annoying.
So this attachment limits that a little.

//==============================================================
// BETLOG Hax
//
//----------------------------------
//        **** LICENCE START ****
// http://creativecommons.org/licenses/by-sa/3.0/
//             Attribution licence:
// You must:
//    -Include this unaltered licence information.
//    -Supply my original script with your modified version.
//    -Retain the original scripts' SL permissions. [+c/+m/+t]
// Or:
//    -Link to the wiki URL from which you copied this script.
//    -Document: "Uses parts of <scriptname> by BETLOG Hax"
//        **** LICENCE END ****
//----------------------------------
//=========================================================================
default
{   on_rez(integer param)
    {
    }
    state_entry()
    {   llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
    }
    attach(key id)
    {   if (llGetAttached())
            llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
    }
    run_time_permissions(integer perm)
    {   if(perm & PERMISSION_TAKE_CONTROLS)
            llTakeControls(0| CONTROL_UP,TRUE, TRUE);
    }
    control(key id, integer pressed, integer change)
    {   if (pressed & change & CONTROL_UP)
        {   if (~llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
            {   llSetBuoyancy(-2.0);//triple gravity
                llSleep(1.0);
                llSetBuoyancy(0.0);    
            }
        }
    }
}
//=========================================================================