Difference between revisions of "Racing Script"

From Elite Wiki
m (cut&paste)
 
(Added link)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
What follows is in [[Legacy Scripting]]. For something in Javascript see Thargoid's [[Ring Racer OXP]]
 +
 +
 
  {
 
  {
 
     "lord-of-the-rings" = (
 
     "lord-of-the-rings" = (
         {
+
:
            conditions = (
+
         {conditions = (
                "mission_lotr1 equal PASSED"
+
  "mission_lotr1 equal PASSED" );  
            );  
+
do = (
            do = (
+
"set: mission_ring_passage [clock_number]",
                "set: mission_ring_passage [clock_number]",
+
  "subtract: mission_ring_passage [mission_ring_time]",
                "subtract: mission_ring_passage [mission_ring_time]",
+
"increment: mission_ringcounter",
                "increment: mission_ringcounter",
+
"reset: mission_lotr1",
                "reset: mission_lotr1",
+
"commsMessage: Passed through ring in [mission_ring_passage] seconds.",
                "commsMessage: Passed through ring in [mission_ring_passage] seconds.",
+
:
{
+
        {conditions = (
conditions = (
+
"mission_ring_id equal 1-TRB",
"mission_ring_id equal 1-TRB",
+
"mission_next_ring undefined" );
"mission_next_ring undefined"
+
do = (
);
+
"set: mission_next_ring 2-TRB",
do = (
+
"commsMessage: Timer running...",
"set: mission_next_ring 2-TRB",
+
"set: mission_lotr_start [clock_number]",
"commsMessage: Timer running...",
+
"reset: mission_lotr_end" ); },
"set: mission_lotr_start [clock_number]",
+
:
"reset: mission_lotr_end"
+
        {conditions = (
);
+
"mission_ring_id equal 2-TRB",
},
+
"mission_next_ring equal 2-TRB" );
{
+
  do = ("set: mission_next_ring 3-TRB"); },
conditions = (
+
:
"mission_ring_id equal 2-TRB",
+
        {conditions = (
"mission_next_ring equal 2-TRB"
+
"mission_ring_id equal 3-TRB",
);
+
"mission_next_ring equal 3-TRB" );
do = ("set: mission_next_ring 3-TRB");
+
do = ("set: mission_next_ring 4-TRH"); },
},
+
:
{
+
        {conditions = (
conditions = (
+
"mission_ring_id equal 4-TRH",
"mission_ring_id equal 3-TRB",
+
"mission_next_ring equal 4-TRH" );
"mission_next_ring equal 3-TRB"
+
  do = (
);
+
"commsMessage: Run complete!",
do = ("set: mission_next_ring 4-TRH");
+
"set: mission_lotr_end [clock_number]",
},
+
"set: mission_lotr_total_time [mission_lotr_end]",
{
+
"subtract: mission_lotr_total_time [mission_lotr_start]",
conditions = (
+
"commsMessage: Total test time: [mission_lotr_total_time] seconds.",
"mission_ring_id equal 4-TRH",
+
"reset: mission_lotr_start",
"mission_next_ring equal 4-TRH"
+
"reset: mission_lotr_end",
);
+
"reset: mission_lotr_total_time",
do = (
+
"reset: mission_lotr_start",
"commsMessage: Run complete!",
+
"reset: mission_ring_id",
"set: mission_lotr_end [clock_number]",
+
"reset: mission_next_ring"); } ); } ); }
"set: mission_lotr_total_time [mission_lotr_end]",
+
 
"subtract: mission_lotr_total_time [mission_lotr_start]",
+
[[RacingRing_AI]] - this page has been deleted: see Maik's note here: (The whole content gives no real information. And it shows an AI from a custom oxp. The prototype training ring system has a separate AI for each single ring. However, they are linked together and are virtually identical. Th...")
"commsMessage: Total test time: [mission_lotr_total_time] seconds.",
+
 
"reset: mission_lotr_start",
+
See also [[FttAI‎]]
"reset: mission_lotr_end",
 
"reset: mission_lotr_total_time",
 
"reset: mission_lotr_start",
 
"reset: mission_ring_id",
 
"reset: mission_next_ring"
 
);
 
}
 
          );  
 
        }
 
    );
 
}
 
  
[[RacingRingAI|BACK]]
+
[[Category:Oolite scripting]] [[Category:Legacy scripting]] [[Category:Racing]]

Latest revision as of 01:41, 29 November 2022

What follows is in Legacy Scripting. For something in Javascript see Thargoid's Ring Racer OXP


{
   "lord-of-the-rings" = (
       {conditions = (
 		"mission_lotr1 equal PASSED"  ); 
	do = (
		"set: mission_ring_passage [clock_number]",
 		"subtract: mission_ring_passage [mission_ring_time]",
		"increment: mission_ringcounter",
		"reset: mission_lotr1",
		"commsMessage: Passed through ring in [mission_ring_passage] seconds.",
        {conditions = (
		"mission_ring_id equal 1-TRB",
		"mission_next_ring undefined" 	);
	do = (
		"set: mission_next_ring 2-TRB",
		"commsMessage: Timer running...",
		"set: mission_lotr_start [clock_number]",
		"reset: mission_lotr_end"  );  },
        {conditions = (
		"mission_ring_id equal 2-TRB",
		"mission_next_ring equal 2-TRB"	);
 		do = ("set: mission_next_ring 3-TRB");	},
        {conditions = (
		"mission_ring_id equal 3-TRB",
		"mission_next_ring equal 3-TRB"	);
	do = ("set: mission_next_ring 4-TRH");	},
        {conditions = (
		"mission_ring_id equal 4-TRH",
		"mission_next_ring equal 4-TRH"	);
 	do = (
		"commsMessage: Run complete!",
		"set: mission_lotr_end [clock_number]",
		"set: mission_lotr_total_time [mission_lotr_end]",
		"subtract: mission_lotr_total_time [mission_lotr_start]",
		"commsMessage: Total test time: [mission_lotr_total_time] seconds.",
		"reset: mission_lotr_start",
		"reset: mission_lotr_end",
		"reset: mission_lotr_total_time",
		"reset: mission_lotr_start",
		"reset: mission_ring_id",
		"reset: mission_next_ring"); } ); } ); }

RacingRing_AI - this page has been deleted: see Maik's note here: (The whole content gives no real information. And it shows an AI from a custom oxp. The prototype training ring system has a separate AI for each single ring. However, they are linked together and are virtually identical. Th...")

See also FttAI‎