;******************************************************************** :EmergencyMessage01 if 0 then set EmergencyAccept 3 set EmergencyCreated 1 set EmergencyTaken 0 disable end :EmergencyMessage00AI if IAMALOSER < 1 human = 0 EmergencyCreated > 0 Ereplywaiting < 1 then set Ereplywait (turn + (((rnd%500) + 600) / satcom_count)) set Ereplywaiting 1 end :EmergencyRequest02AI if sick_bay_count > 0 human = 0 EmergencyCreated > 0 Ereplywaiting > 0 turn > Ereplywait then set EmergencyAccept (rnd%3) set EmergencyCreated 0 set Ereplywaiting 0 disable end :EmergencyRequest03AI if sick_bay_count < 1 human = 0 EmergencyCreated > 0 Ereplywaiting > 0 turn > Ereplywait then set EmergencyAccept 1 set EmergencyCreated 0 set Ereplywaiting 0 disable end :EmergencyMessage01Human if human = 1 EmergencyCreated = 1 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency01" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage02 if human = 1 EmergencyCreated = 2 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency02" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage03 if human = 1 EmergencyCreated = 3 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency03" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage04 if human = 1 EmergencyCreated = 4 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency04" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage05 if human = 1 EmergencyCreated = 5 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency05" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage06 if human = 1 EmergencyCreated = 6 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency06" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage07 if human = 1 EmergencyCreated = 7 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency07" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage08 if human = 1 EmergencyCreated = 8 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency08" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage09 if human = 1 EmergencyCreated = 9 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency09" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage10 if human = 1 EmergencyCreated = 10 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency10" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage11 if human = 1 EmergencyCreated = 11 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency11" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end :EmergencyMessage12 if human = 1 EmergencyCreated = 12 then incoming ship_comms respond EmergencyAccept within 1440 skill ((rnd%10000) + 100) "events_emergency12" set EmergencyCreated 0 ; status_message "DEBUG ** Medical emergency has been created ** DEBUG" disable end ;************************************ :EmergencyAccept00 if EmergencyAccept = 2 EmergencyTaken = 0 then multitrigger :EmergencyTaken00 set PatientMax ((((rnd%segmentdecks) + 1) / 4) + 3) set AllPatients ((array curedsofar 1) + PatientMax) set EmergencyAccept 3 set BonusPaid 0 end :EmergencyAccceptLate00 if EmergencyAccept = 2 EmergencyTaken = 1 then incoming local_comms within 720 icon 4 "events_edocking01" set EmergencyAccept 3 end :EmergencyIgnoreDecline00 if EmergencyAccept < 2 then set EmergencyAccept 3 end :EmergencyTaken00 if 0 then set EmergencyTaken 1 set EmergencyAccept 3 disable end :PeepGeneratorInitialise00 if PatientArrive = PatientMax PatientArrive > 0 PatientMax > 0 then set PatientArrive 0 set PatientMax 0 end :PeepGenerator01 if EmergencyType = 1 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 1 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator02 if EmergencyType = 2 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 2 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator03 if EmergencyType = 3 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 3 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator04 if EmergencyType = 4 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 4000) infected 4 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator05 if EmergencyType = 5 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 5 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator06 if EmergencyType = 6 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 6 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator07 if EmergencyType = 7 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 7 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator08 if EmergencyType = 8 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 8 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator09 if EmergencyType = 9 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 9 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator10 if EmergencyType = 10 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 10 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator11 if EmergencyType = 11 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 11 1 set PatientArrive (PatientArrive + 1) end :PeepGenerator12 if EmergencyType = 12 PatientArrive < PatientMax then place_peep ((rnd%9) + 5) mood body ((rnd%2000) + 2000) infected 12 1 set PatientArrive (PatientArrive + 1) end :EmergencyFees00 if array curedsofar 1 > PaidCures then addenergy 1000 set PaidCures (array curedsofar 1) status_message "events_cure01" end :EmergencyBonus00 if BonusPaid = 0 array curedsofar 1 = AllPatients then incoming local_comms icon 4 "events_treatment01" addenergy 10000 set BonusPaid 1 end