Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PARAMEDIC
- -------------------------------------------------------------------------------------
- Hospital Locations:
- Nr X Y Z
- 1: 2004.96 -1442.96 12.56
- 2: 1180.85 -1325.57 12.58
- 3: - 316.3832 1056.045 18.7344
- 4: -1514.823 2527.119 54.7443
- 5: 1244.437 331.2261 18.5547
- 6: -2198.693 -2290.105 29.625
- 7: -2670.285 616.4364 13.4531
- 8: 1578.446 1770.682 9.8358
- GET NEAREST HOSPITAL::
- For 0 cities unlocked:
- {
- Get DistanceToHospital1
- Get DistanceToHospital2
- Get DistanceToHospital5
- Set NearestHospitalNr
- Goto LOCATIONS
- }
- For 1 city unlocked:
- {
- Get DistanceToHospital1
- Get DistanceToHospital2
- Get DistanceToHospital5
- Get DistanceToHospital6
- Get DistanceToHospital7
- Set NearestHospitalNr
- Goto LOCATIONS
- }
- For 2 cities unlocked:
- {
- Get DistanceToHospital1
- Get DistanceToHospital2
- Get DistanceToHospital3
- Get DistanceToHospital4
- Get DistanceToHospital5
- Get DistanceToHospital6
- Get DistanceToHospital7
- Get DistanceToHospital8
- Set NearestHospitalNr
- Goto LOCATIONS
- }
- if NearestHospitalNr = 1
- {
- HospitalX = 2004.96
- HospitalY = -1442.96
- HospitalZ = 12.56
- SpawnZoneLowerX = 1200.0
- SpawnZoneUpperX = 2930.0
- SpawnZoneLowerY = -2213.0
- SpawnZoneUpperY = -1012.0
- }
- Else If NearestHospitalNr = 2
- {
- HospitalX = 1180.85
- HospitalY = -1325.57
- HospitalZ = 12.58
- SpawnZoneLowerX = 450.0
- SpawnZoneUpperX = 1800.0
- SpawnZoneLowerY = -1900.0
- SpawnZoneUpperY = -870.0
- }
- Else If NearestHospitalNr = 3
- {
- HospitalX = -316.3832
- HospitalY = 1056.045
- HospitalZ = 18.7344
- SpawnZoneLowerX = -860.0
- SpawnZoneUpperX = 185.0
- SpawnZoneLowerY = 749.0
- SpawnZoneUpperY = 1616.0
- }
- Else If NearestHospitalNr = 4
- {
- HospitalX = -1514.006
- HospitalY = 2532.013
- HospitalZ = 54.7443
- SpawnZoneLowerX = -1684.0
- SpawnZoneUpperX = -702.0
- SpawnZoneLowerY = 1465.0
- SpawnZoneUpperY = 2749.9
- }
- Else If NearestHospitalNr = 5
- {
- HospitalX = 1225.0
- HospitalY = 302.0
- HospitalZ = 20.0
- SpawnZoneLowerX = 100.0
- SpawnZoneUpperX = 2604.0
- SpawnZoneLowerY = -720.0
- SpawnZoneUpperY = 465.0
- }
- Else If NearestHospitalNr = 6
- {
- HospitalX = -2198.693
- HospitalY = -2290.105
- HospitalZ = 29.625
- SpawnZoneLowerX = -2598.0
- SpawnZoneUpperX = -1500.0
- SpawnZoneLowerY = -2700.0
- SpawnZoneUpperY = -1700.0
- }
- Else If NearestHospitalNr = 7
- {
- HospitalX = -2670.285
- HospitalY = 616.4364
- HospitalZ = 13.4531
- SpawnZoneLowerX = -2820.0
- SpawnZoneUpperX = -1784.0
- SpawnZoneLowerY = 29.0
- SpawnZoneUpperY = 1180.0
- }
- Else If NearestHospitalNr = 8
- {
- HospitalX = 1578.446
- HospitalY = 1770.682
- HospitalZ = 9.8358
- SpawnZoneLowerX = 1000.0
- SpawnZoneUpperX = 2600.0
- SpawnZoneLowerY = 772.0
- SpawnZoneUpperY = 2400.0
- }
- Loop %NumberOfPatientsToSpawn% ; For every patient that needs to be spawned, generate spawn coordinates.
- {
- gosub @PICK SPAWN COORDINATES
- Store Potential Patient Spawn to Current Patient Spawn
- }
- goto SUCCESS
- SUCCESS::
- Create patients, set timer etc. Continue with the mission.
- PICK SPAWN COORDINATES::
- if ParamedicCurrentLevel < 8
- {
- SpawnZoneRadius := 60*ParamedicCurrentLevel
- SpawnZoneCurrentLevelLowerX := HospitalX-SpawnZoneRadius
- If SpawnZoneCurrentLevelLowerX < SpawnZoneLowerX
- SpawnZoneCurrentLevelLowerX := SpawnZoneLowerX
- SpawnZoneCurrentLevelUpperX := HospitalX+SpawnZoneRadius
- If SpawnZoneCurrentLevelUpperX < SpawnZoneUpperX
- SpawnZoneCurrentLevelUpperX := SpawnZoneUpperX
- SpawnZoneCurrentLevelLowerY := HospitalY-SpawnZoneRadius
- If SpawnZoneCurrentLevelLowerY < SpawnZoneLowerY
- SpawnZoneCurrentLevelLowerY := SpawnZoneLowerY
- SpawnZoneCurrentLevelUpperY := HospitalY+SpawnZoneRadius
- If SpawnZoneCurrentLevelUpperY < SpawnZoneUpperY
- SpawnZoneCurrentLevelLowerX := SpawnZoneUpperY
- }
- Else
- {
- SpawnZoneCurrentLevelLowerX := SpawnZoneLowerX
- SpawnZoneCurrentLevelUpperX := SpawnZoneUpperX
- SpawnZoneCurrentLevelLowerY := SpawnZoneLowerY
- SpawnZoneCurrentLevelUpperY := SpawnZoneUpperY
- }
- PatientPotentialX := Get a random X on the pedestrian paths between SpawnZoneCurrentLevelLowerX and SpawnZoneCurrentLevelUpperX
- PatientPotentialY := Get a random Y on the pedestrian paths between SpawnZoneCurrentLevelLowerY and SpawnZoneCurrentLevelUpperY
- PatientPotentialZ := Get ground for location (PatientPotentialX, PatientPotentialY)
- if PatientPotentialZ < 6.0
- Goto PICK SPAWN COORDINATES
- If Distance between Player and Potential Patient Spawn < 50.0
- Goto PICK SPAWN COORDINATES
- If Distance between Hospital and Potential Patient Spawn < 50.0
- Goto PICK SPAWN COORDINATES
- if Distance between Potential Patient Spawn and Other Patients < 25.0
- Goto PICK SPAWN COORDINATES
- if Car exists in cube around Potential Patient Spawn ; Radius 25.0 25.0 10.0
- Goto PICK SPAWN COORDINATES
- For 0 cities unlocked:
- {
- ; Check that the patient doesn't spawn in an area which hasn't been unlocked.
- if ((PatientPotentialX < 78.4427) AND (PatientPotentialY < -699.519))
- Goto PICK SPAWN COORDINATES
- if ((PatientPotentialX < -252.6557) AND (PatientPotentialY < -285.766))
- Goto PICK SPAWN COORDINATES
- if (PatientPotentialX < -948.3447)
- Goto PICK SPAWN COORDINATES
- if ((PatientPotentialX > 1473.448) AND (PatientPotentialY > 403.7353))
- Goto PICK SPAWN COORDINATES
- if (PatientPotentialY > 578.6325)
- Goto PICK SPAWN COORDINATES
- if ((PatientPotentialX < 837.5551) AND (PatientPotentialY > 347.4097))
- Goto PICK SPAWN COORDINATES
- }
- For 1 city unlocked:
- {
- ; Check that the patient doesn't spawn in an area which hasn't been unlocked.
- if ((PatientPotentialX > 1473.448) AND (PatientPotentialY > 403.7353))
- Goto PICK SPAWN COORDINATES
- if ((PatientPotentialX > -1528.498) AND (PatientPotentialY > 578.6325))
- Goto PICK SPAWN COORDINATES
- if ((-1528.498 < PatientPotentialX < 837.5551) AND (PatientPotentialY > 347.4097))
- Goto PICK SPAWN COORDINATES
- if (PatientPotentialY > 1380.0)
- Goto PICK SPAWN COORDINATES
- }
- ; Check that the patient doesn't spawn in a location where it can't (such as water?).
- if ((1047.0 < PatientPotentialX < 1186.0) AND (-1567.0 < PatientPotentialY < -1406.0))
- Goto PICK SPAWN COORDINATES
- if ((1339.0 < PatientPotentialX < 1444.0) AND (-1504.0 < PatientPotentialY < -1450.0))
- Goto PICK SPAWN COORDINATES
- if ((1999.387 < PatientPotentialX < 2041.979) AND (-1445.462 < PatientPotentialY < -1408.708))
- Goto PICK SPAWN COORDINATES
- if ((1162.0 < PatientPotentialX < 1202.0) AND (-1250.0 < PatientPotentialY < -1238.0))
- Goto PICK SPAWN COORDINATES
- if ((1158.0 < PatientPotentialX < 1176.0) AND (1345.0 < PatientPotentialY < 1364.0))
- Goto PICK SPAWN COORDINATES
- if ((-2333.0 < PatientPotentialX < -2307.0) AND (1036.0 < PatientPotentialY < 1100.0))
- Goto PICK SPAWN COORDINATES
- if ((1989.0 < PatientPotentialX < 2009.0) AND (1513.0 < PatientPotentialY < 1571.0))
- Goto PICK SPAWN COORDINATES
- if ((2546.463 < PatientPotentialX < 2632.818) AND (-1144.012 < PatientPotentialY < -1129.673))
- Goto PICK SPAWN COORDINATES
- if ((-229.096 < PatientPotentialX < -222.5044) AND (1393.817 < PatientPotentialY < 1412.086))
- Goto PICK SPAWN COORDINATES
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement