ImportScript("\\Library\\LibTable.lua")
ImportScript("\\Library\\LibPed.lua")
local l_0_0 = false
MissionSetup = function()
local l_1_0 = 270
local l_1_1 = -110
local l_1_2 = 6.4000000953674
PlayerSetHealth(200)
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
PickupCreateXYZ(388, l_1_0, l_1_1, l_1_2)
SoundPlayInteractiveStream("MS_BikeChaseLow.rsm", MUSIC_DEFAULT_VOLUME)
SoundSetMidIntensityStream("MS_BikeFastMid.rsm", MUSIC_DEFAULT_VOLUME)
SoundSetHighIntensityStream("MS_BikeChaseHigh.rsm", MUSIC_DEFAULT_VOLUME)
DisablePunishmentSystem(true)
end
FirstBulliesSpawn = function()
if PedInRectangle(gPlayer,-550.9371948,-36.46917725,-543.9728394,-19.82579613) then
Wait(5000)
TextPrintString("By: LostInSpace Aka AlphaTECH", 4, 1)
Wait(5000)
TextPrintString("Find the bullies throughout the Tenements!", 4, 1)
Wait(5000)
TextPrintString("The Bullies have stolen Pete's stuff find the bullies and retrive the items!", 4, 1)
TextPrintString("Find the first two bullies and fight them!", 4, 1)
Bully01 = PedCreateXYZ(146, -550.9371948, -36.46917725, 31.0114212)
Bully17 = PedCreateXYZ(147, -550.9371948+4, -36.46917725+4, 31.011421+4)
Bully02 = PedCreateXYZ(147, -543.9728394, -19.82579613, 31.02360916)
PedSetPedToTypeAttitude(Bully01, 13, 0)
PedSetPedToTypeAttitude(Bully02, 13, 0)
PedSetPedToTypeAttitude(Bully17, 13, 0)
PickupCreateXYZ(398, -543.9728394, -19.82579613, 31.02360916)
PickupCreateXYZ(363, -541.927002, -22.1205101, 31.02838898)
PickupCreateXYZ(370, -541.927002, -22.1205101, 31.02838898)
PickupCreateXYZ(398, -514.310791, -35.47680283, 35.01113129)
PickupCreateXYZ(398, -512.0600586, -47.42821503, 35.73261261)
PickupCreateXYZ(398, -517.3728638, -51.74479675, 35.71253204)
PickupCreateXYZ(398, -548.6695557, -43.94956589, 35.74840164)
if PedInRectangle(gPlayer,-541.927002,-22.1205101,-534.1452026,-21.4380722) then
Wait(5000)
TextPrintString("Check all the rooms to see if any bullies are in them", 4, 1)
Wait(5000)
TextPrintString("If you do not find all Pete's items you lose!", 4, 1)
Bully03 = PedCreateXYZ(121, -541.927002+1, -22.1205101+1, 31.02838898+1)
Bully04 = PedCreateXYZ(146, -534.1452026, -21.4380722, 31.0114212)
Bully05 = PedCreateXYZ(147, -514.2109375, -17.31479454, 31.0114212)
Bully06 = PedCreateXYZ(121, -518.383667, -17.82973862, 31.01142311)
Bully07 = PedCreateXYZ(85, -512.6098022, -43.0886879, 31.0114193)
Bully08 = PedCreateXYZ(102, -515.1792603, -33.03131485, 35.46273422)
Bully09 = PedCreateXYZ(146, -514.310791, -35.47680283, 35.01113129)
Bully10 = PedCreateXYZ(85, -512.0600586, -47.42821503, 35.73261261)
Bully11 = PedCreateXYZ(121, -517.3728638, -51.74479675, 35.71253204)
PedSetPedToTypeAttitude(Bully03, 13, 0)
PedSetPedToTypeAttitude(Bully04, 13, 0)
PedSetPedToTypeAttitude(Bully05, 13, 0)
PedSetPedToTypeAttitude(Bully06, 13, 0)
PedSetPedToTypeAttitude(Bully07, 13, 0)
PedSetPedToTypeAttitude(Bully08, 13, 0)
PedSetPedToTypeAttitude(Bully09, 13, 0)
PedSetPedToTypeAttitude(Bully10, 13, 0)
PedSetPedToTypeAttitude(Bully11, 13, 0)
end
end
end
SecondBulliesSpawn = function()
if PedInRectangle(gPlayer,-548.6695557,-43.94956589,-43.94956589,-34.19110489) then
TextPrintString("Head upstairs", 4, 1)
Bully12 = PedCreateXYZ(146, -548.6695557+1, -43.94956589+1, 35.74840164+1)
Bully13 = PedCreateXYZ(102, -544.7006836, -34.19110489, 35.73597336)
PedSetPedToTypeAttitude(Bully13, 13, 0)
PedSetPedToTypeAttitude(Bully12, 13, 0)
end
end
DavisFirstBossFight = function()
if PedInRectangle(gPlayer,-544.7495117,-30.87559319,-544.7495117,35.73596954) then
TextPrintString("Mini Boss Fight : Davis Health 675%", 4, 1)
Bully14 = PedCreateXYZ(99, -544.7495117+1, -30.87559319+1, 35.73596954+1)
PedSetAITree(Bully14, "/Global/RusselAI", "Act/AI/AI_RUSSEL_1_B.act")
gDavisBlip = AddBlipForChar(Bully14, 6, 2, 2)
PedAttack(Bul1y14, gPlayer,1)
PedShowHealthBar(Bully14, true, "N_Davis", true)
bHealthBarShown = true
PedSetPedToTypeAttitude(Bully14, 13, 0)
PedSetHealth(Bully14, 675)
PedSetInfiniteSprint(Bully14, true)
SoundSetHighIntensityStream("MS_BikeDay.rsm", MUSIC_DEFAULT_VOLUME)
end
end
EthanBossFight = function()
if PedInRectangle(gPlayer,-536.7505493,-32.0619278,-536.6812134,40.49000931) then
Bully15 = PedCreateXYZ(147, -536.6812134+1, -30.2863369+1, 40.49000931+1)
Wait(10000)
TextPrintString("Mini Boss Fight : Ethan Health 600%", 4, 1)
Bully16 = PedCreateXYZ(145, -536.7505493, -32.0619278, 40.49129105)
gDavisBlip = AddBlipForChar(Bully16, 6, 2, 2)
PedShowHealthBar(Bully16, true, "N_Ethan", true)
bHealthBarShown = true
PedSetPedToTypeAttitude(Bully16, 13, 0)
PedSetPedToTypeAttitude(Bully15, 13, 0)
PedAttackPlayer(Bully16, gplayer,1)
PedSetHealth(Bully16, 600)
PedSetAITree(Bully16, "/Global/AI_EDGAR_5_B", "Act/AI/AI_EDGAR_5_B.act")
PedSetActionTree(Bully16, "/Global/DO_Edgar", "Act/Anim/DO_Edgar.act")
PedSetWeapon(Bully16, 342)
PedSetInfiniteSprint(Bully16, true)
SoundSetHighIntensityStream("MS_BikeDay.rsm", MUSIC_DEFAULT_VOLUME)
end
end
DavisFinalBossFight = function()
if PedInRectangle(gPlayer,-524.7280884,-40.38653564,-524.7280884,-40.38653564) then
TextPrintString("Boss Fight : Davis! Health 1000%", 4, 1)
Wait(5000)
TextPrintString("Davis swings are a bit powerful, Be CAREFUL!", 4, 1)
Bully18 = PedCreateXYZ(99, -524.7280884+1, -40.38653564+1, 40.48794174+1)
PedAttackPlayer(Bully18, gPlayer,1)
PedSetHealth(Bully18, 1000)
gDavisBlip = AddBlipForChar(Bully18, 6, 2, 2)
PedShowHealthBar(Bully18, true, "N_Davis", true)
bHealthBarShown = true
PedSetActionTree(Bully18, "/Global/Russell_102", "Act/Anim/Russell_102.act")
PedSetPedToTypeAttitude(Bully18, 13, 0)
PedSetInfiniteSprint(Bully18, true)
PickupCreateXYZ(385, -524.7280884+4, -40.38653564+4, 40.48794174+6)
PickupCreateXYZ(393, -524.7280884+6, -40.38653564+6, 40.48794174+6)
SoundSetHighIntensityStream("MS_BikeDay.rsm", MUSIC_DEFAULT_VOLUME)
end
end
F_MissionSetup = function()
F_tCatwalkCam()
F_CatWalk()
F_SecondThirdFloor()
CameraFollowPed(gPlayer)
LoadAnimationGroup("BOXING")
LoadAnimationGroup("DO_STRIKECOMBO")
LoadAnimationGroup("1_G1_TheDiary")
LoadAnimationGroup("NIS_3_05")
LoadAnimationGroup("Area_Tenements")
LoadAnimationGroup("N2B Dishonerable")
LoadAnimationGroup("NIS_2_B")
LoadAnimationGroup("P_Striker")
LoadAnimationGroup("P_Grappler")
LoadAnimationGroup("J_Ranged")
LoadAnimationGroup("J_Damon")
LoadAnimationGroup("Straf_Prep")
LoadAnimationGroup("STRAF_WREST")
LoadAnimationGroup("B_Striker")
LoadAnimationGroup("TE_FEMALE")
LoadAnimationGroup("DO_Striker")
LoadAnimationGroup("F_Nerds")
LoadAnimationGroup("N_Striker_B")
LoadAnimationGroup("NPC_Adult")
LoadAnimationGroup("G_Johnny")
LoadAnimationGroup("F_Girls")
LoadAnimationGroup("F_Douts")
LoadAnimationGroup("F_Greas")
LoadAnimationGroup("LE_ORDERLY")
LoadAnimationGroup("F_CRAZY")
LoadAnimationGroup("F_JOCKS")
LoadAnimationGroup("SNERD_I")
LoadAnimationGroup("SNERD_S")
LoadAnimationGroup("Halloween")
LoadAnimationGroup("F_Adult")
LoadAnimationGroup("LE_Orderly")
LoadAnimationGroup("F_Preps")
LoadAnimationGroup("G_Grappler")
LoadAnimationGroup("Russell")
LoadAnimationGroup("NPC_Mascot")
LoadAnimationGroup("IDLE_JOCK_A")
LoadAnimationGroup("Earnest")
LoadAnimationGroup("G_Grappler")
LoadAnimationGroup("G_Striker")
LoadAnimationGroup("Nemesis")
LoadAnimationGroup("N_STRIKER_B")
LoadAnimationGroup("Straf_Wrest")
LoadAnimationGroup("J_Striker")
LoadAnimationGroup("J_Grappler")
LoadAnimationGroup("NPC_Principal")
LoadAnimationGroup("Authority")
LoadAnimationGroup("C_Wrestling")
end
MissionCleanup = function()
UnLoadAnimationGroup("BOXING")
UnLoadAnimationGroup("DO_STRIKECOMBO")
UnLoadAnimationGroup("1_G1_TheDiary")
UnLoadAnimationGroup("NIS_3_05")
UnLoadAnimationGroup("Area_Tenements")
UnLoadAnimationGroup("Russell")
UnLoadAnimationGroup("N2B Dishonerable")
UnLoadAnimationGroup("NIS_2_B")
UnLoadAnimationGroup("P_Striker")
UnLoadAnimationGroup("P_Grappler")
UnLoadAnimationGroup("J_Ranged")
UnLoadAnimationGroup("J_Damon")
UnLoadAnimationGroup("Straf_Prep")
UnLoadAnimationGroup("STRAF_WREST")
UnLoadAnimationGroup("B_Striker")
UnLoadAnimationGroup("TE_FEMALE")
UnLoadAnimationGroup("DO_Striker")
UnLoadAnimationGroup("F_Nerds")
UnLoadAnimationGroup("N_Striker_B")
UnLoadAnimationGroup("NPC_Adult")
UnLoadAnimationGroup("G_Johnny")
UnLoadAnimationGroup("F_Girls")
UnLoadAnimationGroup("F_Douts")
UnLoadAnimationGroup("F_Greas")
UnLoadAnimationGroup("LE_ORDERLY")
UnLoadAnimationGroup("F_CRAZY")
UnLoadAnimationGroup("F_JOCKS")
UnLoadAnimationGroup("SNERD_I")
UnLoadAnimationGroup("SNERD_S")
UnLoadAnimationGroup("Halloween")
UnLoadAnimationGroup("F_Adult")
UnLoadAnimationGroup("LE_Orderly")
UnLoadAnimationGroup("F_Preps")
UnLoadAnimationGroup("G_Grappler")
UnLoadAnimationGroup("NPC_Mascot")
UnLoadAnimationGroup("IDLE_JOCK_A")
UnLoadAnimationGroup("Earnest")
UnLoadAnimationGroup("G_Grappler")
UnLoadAnimationGroup("G_Striker")
UnLoadAnimationGroup("Nemesis")
UnLoadAnimationGroup("N_STRIKER_B")
UnLoadAnimationGroup("Straf_Wrest")
UnLoadAnimationGroup("J_Grappler")
UnLoadAnimationGroup("NPC_Principal")
UnLoadAnimationGroup("Authority")
UnLoadAnimationGroup("C_Wrestling")
collectgarbage()
end
main = function()
FirstBulliesSpawn()
SecondBulliesSpawn()
DavisFirstBossFight()
EthanBossFight()
DavisFinalBossFight()
repeat
Wait(0)
until l_0_0 ~= false
Wait(3000)
MissionSucceed()
end
This is my new mission script but the PedInRectangle doesn't work.