Flight Script needs 2 notecards along with the script in a prim to work and are included after the script:
//X-flight script for increased flying speed and control //Developed by Goodwill Epoch on 6/12/2003 //Revision 1.9a //For explicit use only by members of the Kazenojin Airship guild // //May be sold with explicit permission from Goodwill Epoch to non-members //Settings must be set to no-modify no view to prevent theft of script //script may not be modified without permission from Goodwill Epoch //List of customizable commands list commands = ["X", "go", "stop", "status", "speed", "accel", "pos", "accelmode", "turnmode", "hovermode", "posmode"]; //Help for commands list com_help = ["Trigger for any commands to be entered", "Enable flight enhancements", "Disable flight enhancements", "List current modes and their state", "Current impulse, place a number after to set. limit 1-500", "Current acceleration, place a number after to set. limit 10-100", "Current coordinates", "Acceleration of movement. Use 'on' or 'off' to set.", "Slow down while turning. Use 'on' or 'off' to set.", "Allows hovering at all heights. Use 'on' or 'off' to set.", "Displays position over object. Use 'on' or 'off' to set."]; //Default movement variables float speed = 200; float accel = 25; float move = 0; float attached = 0; //Counters and temp variables float accel_count = 0; string temp_newcommand; integer temp_newcom_pos; integer wait_for_conf = FALSE; integer test_move = FALSE; //Simplified say strings string off = "off"; string on = "on"; //Default settings integer accelmode = TRUE; integer turnmode = TRUE; integer hovermode = TRUE; integer posmode = FALSE; //Other variables integer listen_num; string notecard = "X-Flight enhanced flight info"; string notehelp = "X-Flight enhanced flight help"; //Returns a on/off string from a true/false pass string on_off(integer test) { if(test) { return on; } else { return off; } } //Returns a true/fals from an on/off string integer true_false(string test) { if(test == on) { return TRUE; } else { return FALSE; } } //Help menu handler help() { llSay(0, "Current help"); integer a; for(a = 0; a, 0); llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS); } //Handle Commands com_handle(integer com_num, string message) { if(com_num == 1) //Go { get_controls(); } else if(com_num == 2) //Stop { llReleaseControls(); llSay(0, "All stop"); } else if(com_num == 3) //Status { llSay(0, "Current settings:"); llSay(0, llList2String(commands, 4) + " - " + (string)((integer)speed)); llSay(0, llList2String(commands, 5) + " - " + (string)((integer)accel)); llSay(0, llList2String(commands, 7) + " - " + on_off(accelmode)); llSay(0, llList2String(commands, 8) + " - " + on_off(turnmode)); llSay(0, llList2String(commands, 9) + " - " + on_off(hovermode)); llSay(0, llList2String(commands, 10) + " - " + on_off(posmode)); } else if(com_num == 4) //Speed { float tempvar = (integer)message; if((tempvar > 0) && (tempvar ><= 500)) { speed = tempvar; llSay(0, llList2String(commands, com_num) + " is now " + (string)((integer)speed)); } else { llSay(0, llList2String(commands, com_num) + " is currently " + (string)((integer)speed)); } } else if(com_num == 5) //Acceleration { float tempvar = (integer)message; if((tempvar >= 10) && (tempvar ><= 100)) { accel = tempvar; llSay(0, llList2String(commands, com_num) + " is now " + (string)((integer)accel)); } else { llSay(0, llList2String(commands, com_num) + " is currently " + (string)((integer)accel)); } } else if(com_num == 6) //current pos { vector pos = llGetPos(); llSay(0, "<" + (string)((integer)pos.x) + ", " + (string)((integer)pos.y) + ", " + (string)((integer)pos.z) + ">"); } else if(com_num == 7) //Acceleration mode { if((message == "off") || (message == "on")) { accelmode = true_false(message); llSay(0, llList2String(commands, com_num) + " is now " + message); } else { llSay(0, llList2String(commands, com_num) + " is currently " + on_off(accelmode)); } } else if(com_num == 8) //Turning mode { if((message == "off") || (message == "on")) { turnmode = true_false(message); llSay(0, llList2String(commands, com_num) + " is now " + message); } else { llSay(0, llList2String(commands, com_num) + " is currently " + on_off(turnmode)); } } else if(com_num == 9) //Hover Mode { if((message == "off") || (message == "on")) { hovermode = true_false(message); llSay(0, llList2String(commands, com_num) + " is now " + message); } else { llSay(0, llList2String(commands, com_num) + " is currently " + on_off(hovermode)); } } else if(com_num == 10) //Position display mode { if((message == "off") || (message == "on")) { posmode = true_false(message); llSay(0, llList2String(commands, com_num) + " is now " + message); } else { llSay(0, llList2String(commands, com_num) + " is currently " + on_off(posmode)); } } } //Check for flight and altitude for hover set_flight() { vector pos = llGetPos(); float ground = llGround(<0,0,0>); if(llGetAgentInfo(llGetOwner()) & AGENT_FLYING) { move = 1; if(hovermode && ((pos.z > 55) && (pos.z > (ground + 35)))) { llSetForce(0><0,0,9.8> * llGetMass(), FALSE); } else { llSetForce(0><0,0,0>, FALSE); } } else { move = 0; llSetForce(0><0,0,0>, FALSE); } // Display position over object if position mode is on if(posmode) { llSetText("<" + (string)((integer)pos.x) + ", " + (string)((integer)pos.y) + ", " + (string)((integer)pos.z) + "> \n \n \n", <1 ,1,1>, 1); } else { llSetText("", <0,0,0>, 0); } } //Handle Listen Messages listen_handler(string message) { list lst_msg = llParseString2List(message, [" "],[]); if(llList2String(lst_msg, 0) == llList2String(commands, 0)) { wait_for_conf = FALSE; if(llList2String(lst_msg, 1) == "help") //If help pass to help { help(); } //If customize pass to customize else if(llList2String(lst_msg, 1) == "customize") { customize(llList2String(lst_msg, 2), llList2String(lst_msg, 3)); } //If reset reset script else if(llList2String(lst_msg, 1) == "reset") { llSay(0, "Reseting Script"); llResetScript(); } //Pass to command handler if a command else { integer listpos = llListFindList(commands, llList2List(lst_msg, 1, 1)); if(listpos != -1) { com_handle(listpos, llList2String(lst_msg, 2)); } } } //If Response to customize, confirm else if((llList2String(lst_msg, 0) == "yes") && wait_for_conf) { llSay(0, "Changing command to " + temp_newcommand); commands = llDeleteSubList(commands, temp_newcom_pos, temp_newcom_pos); commands = llListInsertList(commands, [temp_newcommand], temp_newcom_pos); } else { wait_for_conf = FALSE; } } control_handler(integer levels, integer edges) { test_move =TRUE; accel_count ++; if(accel_count > accel) { accel_count = accel; } float acc_percent = 1; if(accelmode) { accel_count ++; if(accel_count > accel) { accel_count = accel; } acc_percent = accel_count / accel; } float turning = 1; vector impulse = 0><0,0,0>; if (levels & CONTROL_UP) { impulse += 0><0,0,speed>; } if (levels & CONTROL_DOWN) { impulse += 0><0,0,-speed>; } if (levels & CONTROL_FWD) { impulse += ; } if (levels & CONTROL_BACK) { impulse += <-speed,0,0>; } if (levels & CONTROL_LEFT) { impulse += <0,speed,0>; } if (levels & CONTROL_RIGHT) { impulse += 0><0,-speed,0>; } if (levels & CONTROL_ROT_RIGHT) { if(turnmode) { turning = 0; } } if (levels & CONTROL_ROT_LEFT) { if(turnmode) { turning = 0; } } llApplyImpulse((vector)(impulse * move * turning * acc_percent), TRUE); } //Default State, sets up basic listens, and events default { state_entry() { get_controls(); } on_rez(integer param) { get_controls(); } listen(integer channel, string name, key id, string message) { listen_handler(message); } control(key id, integer levels, integer edges) { control_handler(levels, edges); } timer() { set_flight(); if(!test_move) { accel_count = -1; } test_move = FALSE; } //Detect touch, if not owner then give info. If owner display help. touch(integer total_touched) { integer a = 0; key toucher; for(a = 0; a 0>1>>0>>>
X-Flight enhanced flight help notecard:
0>>
X-Flight enhanced flight script help file
ver 1.98e
Basic help for commands:
"X" - Trigger for any commands to be entered
"go" - Enable flight enhancements
"stop" - Disable flight enhancements
"status" - List current modes and their state
"speed" - Current impulse, place a number after to set. limit 1-500
"accel" - Current acceleration, place a number after to set. limit 10-100
"pos" - Current coordinates
"accelmode" - Acceleration of movement. Use 'on' or 'off' to set.
"turnmode" - Slow down while turning. Use 'on' or 'off' to set.
"hovermode" - Allows hovering at all heights. Use 'on' or 'off' to set.
"posmode" - Displays position over object. Use 'on' or 'off' to set.
"customize" - Allows you to customize certain commands. 'X customize [old command] [new command]' Be sure to use full words without spaces for commands. You will then need to type 'yes' to confirm.
"reset" - Resets entire script. WARNING: Will erase all customize data and settings.
Default settings are:
Speed = 200
Accel = 25
Acceleration mode = On
Turning mode = On
Hover mode = On
Pos mode = Off
Created by Goodwill Epoch.
Please IM Goodwill Epoch if you have any questions or special requests for this script!
X-Flight enhanced flight info Notecard:
X-Flight enhanced flight script Current Features now include: Faster flying speeds Acceleration to allow better control Allows slowing down when turning for sharper corners at high speeds Realtime updates on position HOVER AT ALL ALTITUDES!! Customizable options and commands X-Flight enhanced items will be available at both the Kazenojin base of operations an Skeedalee Skidoo's mall. Created by Goodwill Epoch. Admiral of Kazenojin