Jump to content

Super Booster (wearme)


JJValero Writer
 Share

You are about to reply to a thread that has been inactive for 2850 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Do not use near of sim crossing, or you will end three or four simulators away.

Put script inside of a non visible sphere of size=<0.5, 0.5, 0.5>.  Wear object in any site of your body or free hud position.

While you walking or flying press back key to boost. this work too when you up or down. Press Left + Right or right + Left to increase or decrease the speed.

This script can be added too in a existing HUD.

 

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

integer MIN_SPEED = 500;
integer MAX_SPEED = 32000;
string DEFAULT_SOUND = "1adbd5fa-5b29-0827-473f-ec551e073548";
float VOLUME = 1.0;

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

integer g_iSpeed = MIN_SPEED;
float g_fLastTime;
integer turbo = FALSE;
string g_sSound;

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

default {
    state_entry() {
        llSetMemoryLimit(4096 * 2);
        if (llGetAttached() != 0) {
            llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
        } // if
        if (llGetInventoryNumber(INVENTORY_SOUND) > 0) {
            g_sSound = llGetInventoryName(INVENTORY_SOUND, 0);
        } else {
            g_sSound = DEFAULT_SOUND;
        } // if
    } // state_entry
    
    attach(key id) {
        if (llGetAttached() != 0) {
            llRequestPermissions(id, PERMISSION_TAKE_CONTROLS);
        } // if
    } // attack
    
    run_time_permissions(integer perm) {
        
        if (perm & PERMISSION_TAKE_CONTROLS) {
         
            g_fLastTime = llGetWallclock();
            llTakeControls( CONTROL_FWD |
                            CONTROL_BACK |
                            CONTROL_LEFT |
                            CONTROL_RIGHT |
                            CONTROL_ROT_LEFT |
                            CONTROL_ROT_RIGHT |
                            CONTROL_UP |
                            CONTROL_DOWN |
                            CONTROL_LBUTTON |
                            CONTROL_ML_LBUTTON ,
                            TRUE, TRUE);
                            
            llOwnerSay("Turbo mode ready!");
            llOwnerSay("(UP + BACK) or (DOWN + BACK) or (FWD + BACK) activates turbo");
            llOwnerSay("ROT_RIGHT + ROT_LEFT increment speed.");
            llOwnerSay("ROT_LEFT + ROT_RIGHT decrement speed.");
            llOwnerSay("Current speed is: " + (string) g_iSpeed);
                  
        } // if
        
    } // run_time_permissions
      
    control(key id, integer level, integer edge) {
        
        vector vMove = ZERO_VECTOR;

        if ((level == (CONTROL_FWD | CONTROL_BACK)) || (level == (CONTROL_UP | CONTROL_BACK)) ||
            (level == (CONTROL_DOWN | CONTROL_BACK))) {
                
            if (turbo == FALSE) {
                llTriggerSound(g_sSound, VOLUME);
            } // if
        
            turbo = TRUE;
            
        } else if (((~level & CONTROL_FWD) && (edge & CONTROL_FWD)) ||
                   ((~level & CONTROL_UP) && (edge & CONTROL_UP)) ||
                   ((~level & CONTROL_DOWN) && (edge & CONTROL_DOWN))) {
        
            turbo = FALSE;

        } // if
        
        if (turbo) {
            if (level & CONTROL_FWD) {
            
                vMove = llRot2Fwd(llGetRot());
                vMove = llVecNorm(vMove);
                
            } else if (level & CONTROL_UP) {

                vMove = <0.0, 0.0, 1.0>;

            } else if (level & CONTROL_DOWN) {

                vMove = <0.0, 0.0, -1.0>;

            } // if
        } // if
        
        if ((level & CONTROL_ROT_LEFT) && (edge & CONTROL_ROT_RIGHT)) {
            
            if (llFabs(llGetWallclock() - g_fLastTime) >= 1.0) {
                if (g_iSpeed > MIN_SPEED) {
                    g_iSpeed /= 2;
                }
                llOwnerSay("Speed changed to: " + (string) g_iSpeed);
                g_fLastTime = llGetWallclock();
            }
            
        } else if ((level & CONTROL_ROT_RIGHT) && (edge & CONTROL_ROT_LEFT)) {
            
            if (llFabs(llGetWallclock() - g_fLastTime) >= 1.0) {
                if (g_iSpeed < MAX_SPEED) {
                    g_iSpeed *= 2;
                }
                llOwnerSay("Speed changed to: " + (string) g_iSpeed);
                g_fLastTime = llGetWallclock();
            }
        }
        
        vMove *= g_iSpeed;
        llSetForce(vMove, FALSE);
    
    } // control

} // default

 

 

 

Link to comment
Share on other sites

  • 1 month later...

I detected a problem when teleport inside the same region. The client generates many keystrokes and causes activation of the turbo mode. It's like when you're sitting in a vehicle and edit an object.

This is a version that minimizes the problem.

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/integer MIN_SPEED = 500;integer MAX_SPEED = 32000;string DEFAULT_SOUND = "1adbd5fa-5b29-0827-473f-ec551e073548";float VOLUME = 1.0;float TIME_AFTER_TP = 10.0;//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/integer g_iSpeed = MIN_SPEED;float g_fLastTime;integer turbo = FALSE;string g_sSound;integer g_bWorking;//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/default {    state_entry() {        llSetMemoryLimit(4096 * 3);        if (llGetAttached() != 0) {            llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);        } // if        if (llGetInventoryNumber(INVENTORY_SOUND) > 0) {            g_sSound = llGetInventoryName(INVENTORY_SOUND, 0);        } else {            g_sSound = DEFAULT_SOUND;        } // if    } // state_entry        attach(key id) {        if (llGetAttached() != 0) {            llRequestPermissions(id, PERMISSION_TAKE_CONTROLS);        } // if    } // attack        run_time_permissions(integer perm) {                if (perm & PERMISSION_TAKE_CONTROLS) {                     g_fLastTime = llGetWallclock();            llTakeControls( CONTROL_FWD |                            CONTROL_BACK |                            CONTROL_LEFT |                            CONTROL_RIGHT |                            CONTROL_ROT_LEFT |                            CONTROL_ROT_RIGHT |                            CONTROL_UP |                            CONTROL_DOWN |                            CONTROL_LBUTTON |                            CONTROL_ML_LBUTTON ,                            TRUE, TRUE);                                        llOwnerSay("Turbo mode ready!");            llOwnerSay("(UP + BACK) or (DOWN + BACK) or (FWD + BACK) activates turbo");            llOwnerSay("ROT_RIGHT + ROT_LEFT increment speed.");            llOwnerSay("ROT_LEFT + ROT_RIGHT decrement speed.");            llOwnerSay("Current speed is: " + (string) g_iSpeed);            g_bWorking = TRUE;                          } // if            } // run_time_permissions          control(key id, integer level, integer edge) {                if (g_bWorking == FALSE) {            return;        } // if                vector vMove = ZERO_VECTOR;        if ((level == (CONTROL_FWD | CONTROL_BACK)) || (level == (CONTROL_UP | CONTROL_BACK)) ||            (level == (CONTROL_DOWN | CONTROL_BACK))) {                            if (turbo == FALSE) {                llTriggerSound(g_sSound, VOLUME);            } // if            turbo = TRUE;                    } else if (((~level & CONTROL_FWD) && (edge & CONTROL_FWD)) ||                   ((~level & CONTROL_UP) && (edge & CONTROL_UP)) ||                   ((~level & CONTROL_DOWN) && (edge & CONTROL_DOWN))) {                    turbo = FALSE;        } // if                if (turbo) {            if (level & CONTROL_FWD) {                            vMove = llRot2Fwd(llGetRot());                vMove = llVecNorm(vMove);                            } else if (level & CONTROL_UP) {                vMove = <0.0, 0.0, 1.0>;            } else if (level & CONTROL_DOWN) {                vMove = <0.0, 0.0, -1.0>;            } // if        } // if                if ((level & CONTROL_ROT_LEFT) && (edge & CONTROL_ROT_RIGHT)) {                        if (llFabs(llGetWallclock() - g_fLastTime) >= 1.0) {                if (g_iSpeed > MIN_SPEED) {                    g_iSpeed /= 2;                }                llOwnerSay("Speed changed to: " + (string) g_iSpeed);                g_fLastTime = llGetWallclock();            }                    } else if ((level & CONTROL_ROT_RIGHT) && (edge & CONTROL_ROT_LEFT)) {                        if (llFabs(llGetWallclock() - g_fLastTime) >= 1.0) {                if (g_iSpeed < MAX_SPEED) {                    g_iSpeed *= 2;                }                llOwnerSay("Speed changed to: " + (string) g_iSpeed);                g_fLastTime = llGetWallclock();            }        }                vMove *= g_iSpeed;        llSetForce(vMove, FALSE);        } // control        changed(integer change) {                if (change & CHANGED_TELEPORT) {            g_bWorking = FALSE;            llSetForce(ZERO_VECTOR, FALSE);            llSetTimerEvent(TIME_AFTER_TP);        }            } // changed        timer() {        g_bWorking = TRUE;        llSetTimerEvent(TIME_AFTER_TP);    } // timer} // default

 

 

  • Like 2
Link to comment
Share on other sites

  • 11 months later...
You are about to reply to a thread that has been inactive for 2850 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...