Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- enable alerts, turn off for release version
- enableAlerts(0);
- -- disable all safe zones
- -- setSafeZones( 0 );
- ----------------------------------------------------------------------------
- function onInitialize()
- -- Perform any initialization here, this is called right after the script is loaded
- end
- ----------------------------------------------------------------------------
- function onRelease()
- -- Called before the script is released
- end
- -------------------------------------------------------------------------------
- -- Server Side functions
- function activateECCMScanner( shipId )
- local count = useGadget( shipId, "P", nil, 0 ); -- activate ECCM
- if count <= 0 then
- scriptAlert( "Could not activate ECCM" );
- end
- count = useGadget( shipId, "Y", nil, 0 ); -- activate Scanner
- if count <= 0 then
- scriptAlert( "Could not activate Scanner" );
- end
- end
- function getEnemyFleetId( notFleetId )
- local maxFleet = fleetCount();
- for i=0, maxFleet do
- local checkFleetId = fleetId( i );
- if not checkFleetid == notFleetId then
- return checkFleetId;
- end
- end
- end
- --function onSpawnCombat1( cadetId )
- -- local fleetId = getFleetId( cadetId );
- -- local enemyFleetId = fleetId + 1; -- getEnemyFleetId( fleetId );
- -- local shipICC = spawnShip( "Ships\\ICC\\Destroyer\\M190 A\\SC_M190A.PRT", "Mycopia", "Schak'JaJ", fleetId );
- -- local shipUGTO1 = spawnShip( "Ships\\UGTO\\Frigate\\ST-6 Interceptor\\SC_ST6.prt", "Mycopia", "Mephiblo", enemyFleetId );
- -- local shipUGTO2 = spawnShip( "Ships\\UGTO\\Frigate\\ST-6 Interceptor\\SC_ST6.prt", "Mycopia", "Damion", enemyFleetId );
- -- orderShip( shipICC, "Mycopia", 2 );
- -- orderShip( shipUGTO1, "Mycopia", 2 );
- -- orderShip( shipUGTO2, "Mycopia", 2 );
- -- enablePointDefence( shipICC );
- --enablePointDefence( shipUGTO1 );
- -- enablePointDefence( shipUGTO2 );
- --end
- function enablePointDefence( shipId )
- local maxGadget = gadgetCount( shipId ) - 1;
- for i = 0, maxGadget do
- local gadgetId = getGadget( shipId, i );
- if getGadgetType( gadgetId ) == 6 then -- normal beam weapon
- setBeamPointDefence( gadgetId, 1 );
- end
- end
- end
- function doEJump( shipId )
- if not isShipDestroyed( shipId ) then
- useGadget( shipId, "J", nil, 1 );
- startTimer( 5, "removeShip( \"" .. shipId .. "\" );" );
- end
- end
- function removeShip( shipId )
- if not isShipDestroyed( shipId ) then
- detachNoun( shipId );
- end
- end
- ----------------------------------------------------------------------------
- -- The following callbacks are only called when running on the client
- function onFleetSelect()
- -- Called before the player selects a team
- end
- function onFleetSelected( fleetId )
- -- Called after the player selects a fleet, the fleet ID is passed
- end
- function onSetFleet( fleetId )
- -- called when the server assigns the players fleetId
- end
- function onSpawnSelect()
- -- called when the player enters the spawn selection screen
- end
- function onSpawnSelected( spawnId )
- -- called when the player selects a spawn point
- end
- function onShipSelect()
- messageBox( "<b>Tutorial: Bombing With Infantry(RAZING)</b>\n\nWelcome to the DarkSpace Bombing Tutorial. You may press <b>F1</b> at any time to see additional help for the Current View you're on(Map(F2), Planetary(F3), Tactical(Initial View)). For now, you only have one ship to select, once you actually get into the Main servers; you will have access to all ships that you have the rank, and badges for. Go ahead and click on the ship located in the bottom-middle of the screen.\n\nClick on the <b>OK</b> button to continue, click on the <b>Cancel</b> button to abort this tutorial. (Keep in mind, to exit the Tutorial Session you must hit Escape and then Click on \"Logoff\")\n\nIf you don't understand basic Flight control, please run the Basic Controls tutorial.","","cancelTutorial()" );
- end
- function onShipSelected( shipName )
- messageBox("<b>Great! Now in the bottom right corner you'll see a Box that has the Lore, current ship status, and the requirements to Spawn said ship(Rank, Badges, resources required, etc.) After you're familiar with the way the ship selection screen works, go ahead and click \"Launch\". \n\nClick on the <b>OK</b> button to continue, click on the <b>Cancel</b> button to abort this tutorial.", "", "cancelTutorial()");
- end
- function onTactical()
- startBombingTutorial();
- end
- function onShipAttached( shipId )
- end
- function onShipDetached( shipId )
- end
- function onDeath()
- -- Called when the players ship is destroyed
- end
- function onCaptured()
- -- Called when the players ship is captured
- end
- function onDisconnected()
- -- Called when connection to the server is lost
- end
- function onEndGame()
- -- Called when the scenerio or mission is completed
- end
- function startBombingTutorial()
- messageBox("<b>Good job! Now, we need to go-to Mycopia. As a refresher, press the F2 button to take you to the Map View. Once there, find the Planet \"Mycopia\" on the Planet list near the bottom left to middle side of the Screen. Then, Click the \"Orbit\" button near the bottom right side of your Screen next to the planets Portrait, and status. Or, alternatively, press the \"O\" button on your keyboard whilst clicked on the Planet you wish to goto. This will order your ship to plot a course to the Planet, once it's been plotted, your ship will align to jump, then once there will commence the orbiting sequence. Do so now. \n\nClick on the <b>OK</b> button to continue, click on the <b>Cancel</b> button to abort this tutorial.", "onWaitOrbit()", "cancelTutorial()");
- end
- function onTacticalView()
- end
- function onShipStatus()
- end
- function onRepairQueue()
- end
- function onSystemsDisplay()
- end
- function onCargoDisplay()
- end
- function onHelmControls()
- end
- function onTargetDisplay()
- end
- end
- function onNavigationView()
- end
- function onNavigationFocus()
- end
- function onNavigationContacts()
- messageBox( "<con;ButtonDisplayContacts> Displayed here are your navigation contacts. You can <b>LEFT CLICK</b> on an navigation contact to target that object, and press <b>SPACEBAR</b> to center the map on that object.", "onNavigationJump()", "cancelTutorial()" );
- end
- function onNavigationJump()
- end
- function onNavigationOrbit()
- -- short combat scene to watch
- remoteCall( "Mycopia", 5, "onSpawnCombat1(\"" .. playersShip() .. "\");" );
- messageBox( "Press the <b>O</b> key to command your ship to orbit </b>Mycopia</b> then press <b>F2</b> to return to the tactical view.", "onWaitOrbit()", "cancelTutorial()" );
- end
- function onWaitOrbit()
- messageBox( "Usually you'll be met with resistance. But since this is a Bombing tutorial, there are no Enemy ships. Go orbit Mycopia to continue...", "cancelTutorial()" );
- if isOrbiting( playersShip(), "Mycopia" ) then
- onOrbit();
- else
- startTimer( 1, "onWaitOrbit()" );
- end
- end
- function onOrbit()
- messageBox( "You are now in orbit around the primary planet of this system. Staying within 500 gu of a planet will affect the planets faction preference. The more allied ships in orbit of an enemy planet and the more allied troops on the ground, the faster the planet will capture, whereas enemy ships and infantry will do the opposite, and make the planet harder to capture. Target <b>Mycopia</b> again if needed, the <color;00ffff>yellow</color> markers on the planets surface are drop zones should you wish to drop infantry on the planet to engage in combat with enemy infantry and aid in capturing the planet.\n\nSelect a drop zone by <b>LEFT CLICKING</b>, then press the <b>U</b> key to unload your infantry on the planet.", "onInfantryUnloaded()", "cancelTutorial()" );
- end
- function onInfantryUnloaded()
- messageBox( "Once the infantry has landed on the surface it will seek out any enemy infantry on the surface to engage in combat with. If the RAZE order is given, they will seek out structures to destroy instead. If you unload the infantry onto a Structure, they will destroy that structure first. This can be used as a tactic to circumnavigate planetary Shielding. Or to take our power to lower defenses. To give the Infantry the RAZE order, click on the infantry in your Cargo and then in the Bottom right corner of the screen, near the Portrait describing the status of the infantry. Click on the \"RAZE\" command. Which as an Alternative to bombing can be used to \"RAZE\", or Bomb the planet.\n\nKeep in mind, usually planets that you try to Bomb will have infantry of their own, which will seek out and attempt to annihilate the intruders. Once you have done so and understand how to do this, click <b>\"\OK"" to end the tutorial", "finishTutorial", "cancelTutorial()" );
- end
- function onCombat()
- end
- function onCombat2()
- end
- function onWaitCapture()
- end
- function onPlanetCaptured()
- end
- function onLoadInfantry()
- messageBox( "You may now load your infantry back onto your ship should you wish to use it to help you capture the other planets in this system, <b>Dawn</b> and <b>Lhzack</b>.\n\nTarget <b>Mycopia</b>, then you will your infantry appear on the surface at the location you unloaded them, target the infantry and press the <b>L</b> key to load the infantry back onto your ship.", "onInfantryLoaded()", "cancelTutorial()" );
- end
- function onInfantryLoaded()
- messageBox( "You may now capture <b>Dawn</b> and <b>Ihzack</b> to end this tutorial.", "endTutorial()", "cancelTutorial()" );
- end
- function endTutorial()
- messageBox( "We hope this tutorial benefits you. If you wish to <b>retry</b> the tutorial, or end it; please press <b>OK</b>, or <b>Cancel</b> respectively.", "startBombingTutorial()", "cancelTutorial" );
- end
- function cancelTutorial()
- pushChat( "Tutorial Cancelled..." );
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement