mirror of
https://github.com/1dot13/gamedir.git
synced 2026-07-22 13:40:25 +02:00
- UB Improvements / Cleanup (by Jazz)
o added the lacking items of UB to files "the "Data\TableData\Items\Items.xml". o Necessary "Hand Cannon" were moved to the task Raul, to files H11_0_ExtraItems_xxx.xml. o The instruction Morrisa will be generated after destruction of Morrisa automatically. o All scripts lua were modified for UB git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1743 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -323,12 +323,12 @@ end
|
||||
-- BIGGENS BOMBS
|
||||
if ActionID == 25 then
|
||||
|
||||
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 17 ) == true ) then
|
||||
if ( UB_ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 17 ) == true ) then
|
||||
|
||||
HavePersonAtGridnoStop( sGridNo )
|
||||
UB_HavePersonAtGridnoStop( sGridNo )
|
||||
|
||||
-- Make Biggens run for cover and then detonate the explosives
|
||||
TriggerNPCRecord( Profil.BIGGENS , 17 )
|
||||
TriggerNPCRecord( UB_GetBiggensID() , 17 ) -- get id from UB_Options.ini
|
||||
|
||||
end
|
||||
|
||||
@@ -337,12 +337,12 @@ end
|
||||
-- BIGGENS WARNING
|
||||
if ActionID == 26 then
|
||||
|
||||
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 16 ) == true ) then
|
||||
if ( UB_ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 16 ) == true ) then
|
||||
|
||||
HavePersonAtGridnoStop( sGridNo )
|
||||
UB_HavePersonAtGridnoStop( sGridNo )
|
||||
|
||||
-- Make Biggens run for cover and then detonate the explosives
|
||||
TriggerNPCRecord( Profil.BIGGENS , 16 )
|
||||
TriggerNPCRecord( UB_GetBiggensID() , 16 ) -- get id from UB_Options.ini
|
||||
|
||||
end
|
||||
|
||||
@@ -351,14 +351,14 @@ end
|
||||
-- SEE FORTIFIED DOOR
|
||||
if ActionID == 27 then
|
||||
|
||||
HandleSeeingFortifiedDoor( sGridNo )
|
||||
UB_HandleSeeingFortifiedDoor( sGridNo )
|
||||
|
||||
end
|
||||
|
||||
-- OPEN FORTIFED DOOR
|
||||
if ActionID == 28 then
|
||||
|
||||
HandleSwitchToOpenFortifiedDoor( sGridNo )
|
||||
UB_HandleSwitchToOpenFortifiedDoor( sGridNo )
|
||||
|
||||
end
|
||||
|
||||
@@ -368,12 +368,12 @@ if ActionID == 29 then
|
||||
-- if the player is in the power plant
|
||||
if( gWorldSectorX == 13 and gWorldSectorY == 10 and gbWorldSectorZ == 0 ) then
|
||||
|
||||
HandleSeeingPowerGenFan( sGridNo )
|
||||
UB_HandleSeeingPowerGenFan( sGridNo )
|
||||
|
||||
elseif( gWorldSectorX == 15 and gWorldSectorY == 12 and gbWorldSectorZ == 3 ) then
|
||||
|
||||
-- The player is hitting the switch to launch the missles
|
||||
HandlePlayerHittingSwitchToLaunchMissles()
|
||||
UB_HandlePlayerHittingSwitchToLaunchMissles()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+138
-104
@@ -404,35 +404,36 @@ ShopID = {
|
||||
}
|
||||
|
||||
local function AddTexsVideosToBettysInventory()
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_ATTACK_CLYDESDALES, 1 ) -- Attack of the Clydesdales
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_WILD_EAST, 1 ) -- Wild, Wild East
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_HAVE_HONDA, 1 ) -- Have Honda, Will Travel
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, UB_itemTEX_MOVIE_ATTACK_CLYDESDALES, 1 ) -- Attack of the Clydesdales
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, UB_itemTEX_MOVIE_WILD_EAST, 1 ) -- Wild, Wild East
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, UB_itemTEX_MOVIE_HAVE_HONDA, 1 ) -- Have Honda, Will Travel
|
||||
end
|
||||
|
||||
function InitStrategicLayer()
|
||||
|
||||
InitialHeliCrash(iniINGAMEHELICRASH)
|
||||
UB_InitialHeliCrash(UB_iniINGAMEHELICRASH)
|
||||
|
||||
if ( iniJERRY == true ) then
|
||||
InitialProfile ( Profil.JerryMilo, iniDEFAULT_ARRIVAL_SECTOR_X, iniDEFAULT_ARRIVAL_SECTOR_Y,0, iniJERRYGRIDNO )
|
||||
if ( UB_iniJERRY == true ) then
|
||||
AddProfileToMap (UB_GetJerryID(),iniDEFAULT_ARRIVAL_SECTOR_X,iniDEFAULT_ARRIVAL_SECTOR_Y,0,UB_iniJERRYGRIDNO) -- get id from UB_Options.ini
|
||||
--InitialProfile ( UB_GetJerryID(), iniDEFAULT_ARRIVAL_SECTOR_X, iniDEFAULT_ARRIVAL_SECTOR_Y,0, UB_iniJERRYGRIDNO )
|
||||
end
|
||||
|
||||
InitialJerryQuotes(iniJERRYQUOTES)
|
||||
InitialLaptopQuest(iniLAPTOP_QUEST)
|
||||
UB_InitialJerryQuotes(iniJERRYQUOTES)
|
||||
UB_InitialLaptopQuest(iniLAPTOP_QUEST)
|
||||
|
||||
InitialHeliGridNo1(iniINITIALHELIGRIDNO1)
|
||||
InitialHeliGridNo2(iniINITIALHELIGRIDNO2)
|
||||
InitialHeliGridNo3(iniINITIALHELIGRIDNO3)
|
||||
InitialHeliGridNo4(iniINITIALHELIGRIDNO4)
|
||||
InitialHeliGridNo5(iniINITIALHELIGRIDNO5)
|
||||
InitialHeliGridNo6(iniINITIALHELIGRIDNO6)
|
||||
InitialHeliGridNo7(iniINITIALHELIGRIDNO7)
|
||||
UB_InitialHeliGridNo1(iniINITIALHELIGRIDNO1)
|
||||
UB_InitialHeliGridNo2(iniINITIALHELIGRIDNO2)
|
||||
UB_InitialHeliGridNo3(iniINITIALHELIGRIDNO3)
|
||||
UB_InitialHeliGridNo4(iniINITIALHELIGRIDNO4)
|
||||
UB_InitialHeliGridNo5(iniINITIALHELIGRIDNO5)
|
||||
UB_InitialHeliGridNo6(iniINITIALHELIGRIDNO6)
|
||||
UB_InitialHeliGridNo7(iniINITIALHELIGRIDNO7)
|
||||
|
||||
-- get DEFAULT_ARRIVAL_SECTOR_X and DEFAULT_ARRIVAL_SECTOR_Y from UB_Options.ini
|
||||
SetDefaultArrivalSector( iniDEFAULT_ARRIVAL_SECTOR_X, iniDEFAULT_ARRIVAL_SECTOR_Y )
|
||||
|
||||
-- get NEW_MERC_ARRIVAL_LOCATION from UB_Options.ini
|
||||
InternalLocateGridNo( iniNEW_MERC_ARRIVAL_LOCATION )
|
||||
UB_InternalLocateGridNo( iniNEW_MERC_ARRIVAL_LOCATION )
|
||||
end
|
||||
|
||||
|
||||
@@ -444,7 +445,7 @@ local ubNumElites = 0
|
||||
local Test = false
|
||||
local JohnKulbaText = true
|
||||
|
||||
if ( RandomManuelText == true ) then
|
||||
if ( UB_RandomManuelText == true ) then
|
||||
|
||||
-- Miguel is dead
|
||||
Dead = math.random(1, 2)
|
||||
@@ -478,13 +479,13 @@ if ( RandomManuelText == true ) then
|
||||
end
|
||||
|
||||
-- Random John or Tex
|
||||
if ( enabledJohnAndTex == false) then
|
||||
if ( UB_enabledJohnAndTex == false) then
|
||||
|
||||
ran = math.random(1, 2)
|
||||
|
||||
if ( ran == 1 ) then
|
||||
|
||||
if ( JohnKulbaText == true ) then
|
||||
if ( UB_JohnKulbaText == true ) then
|
||||
-- Mary is dead
|
||||
MaryDead = math.random(1, 2)
|
||||
if ( MaryDead == 1 ) then
|
||||
@@ -493,37 +494,42 @@ ran = math.random(1, 2)
|
||||
end
|
||||
|
||||
--John is available
|
||||
Ja25JohnKulbaIsInGame (true)
|
||||
UB_JohnKulbaIsInGame (true)
|
||||
|
||||
--Tex is not available
|
||||
SetFactFalse( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
|
||||
|
||||
Ja25JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
|
||||
UB_JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
|
||||
-- Randomly choose John's starting sector
|
||||
if( math.random(1, 100 ) < 50 ) then
|
||||
Ja25JohnKulbaInitialSectorX (10)
|
||||
UB_JohnKulbaInitialSectorX (10)
|
||||
AddProfileToMap (UB_GetJohnID(),10,9,0,10503) -- get id from UB_Options.ini
|
||||
else
|
||||
Ja25JohnKulbaInitialSectorX (11)
|
||||
UB_JohnKulbaInitialSectorX (11)
|
||||
AddProfileToMap (UB_GetJohnID(),11,9,0,17674) -- get id from UB_Options.ini
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
--John is not available
|
||||
Ja25JohnKulbaIsInGame (false)
|
||||
UB_JohnKulbaIsInGame (false)
|
||||
|
||||
-- added video to Betty Shop
|
||||
if ( Ja25CheckJohnKulbaIsInGame() == false ) then
|
||||
if ( UB_CheckJohnKulbaIsInGame() == false ) then
|
||||
AddTexsVideosToBettysInventory()
|
||||
end
|
||||
|
||||
--Tex is available
|
||||
SetFactTrue( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
|
||||
|
||||
AddProfileToMap (UB_GetTexID(),10,9,0,12890) -- get id from UB_Options.ini
|
||||
end
|
||||
|
||||
|
||||
-- John and Tex in game
|
||||
elseif ( enabledJohnAndTex == true) then
|
||||
elseif ( UB_enabledJohnAndTex == true) then
|
||||
|
||||
if ( JohnKulbaText == true ) then
|
||||
if ( UB_JohnKulbaText == true ) then
|
||||
-- Mary is dead
|
||||
MaryDead = math.random(1, 2)
|
||||
if ( MaryDead == 1 ) then
|
||||
@@ -532,328 +538,356 @@ elseif ( enabledJohnAndTex == true) then
|
||||
end
|
||||
|
||||
--John is available
|
||||
Ja25JohnKulbaIsInGame (true)
|
||||
UB_JohnKulbaIsInGame (true)
|
||||
|
||||
Ja25JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
|
||||
UB_JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
|
||||
|
||||
--Randomly choose John's starting sector
|
||||
if( math.random(1, 100 ) < 50 ) then
|
||||
Ja25JohnKulbaInitialSectorX (10)
|
||||
else
|
||||
Ja25JohnKulbaInitialSectorX (11)
|
||||
end
|
||||
if( math.random(1, 100 ) < 50 ) then
|
||||
UB_JohnKulbaInitialSectorX (10)
|
||||
AddProfileToMap (UB_GetJohnID(),10,9,0,10503) -- get id from UB_Options.ini
|
||||
else
|
||||
UB_JohnKulbaInitialSectorX (11)
|
||||
AddProfileToMap (UB_GetJohnID(),11,9,0,17674) -- get id from UB_Options.ini
|
||||
end
|
||||
|
||||
-- added video to Betty Shop
|
||||
AddTexsVideosToBettysInventory()
|
||||
|
||||
--Tex is available
|
||||
SetFactTrue( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
|
||||
|
||||
AddProfileToMap (UB_GetTexID(),10,9,0,12890) -- get id from UB_Options.ini
|
||||
|
||||
end
|
||||
|
||||
-- Add UB profiles
|
||||
AddProfileToMap (UB_GetManuelID(),9,9,0,15758) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetBiggensID(),13,9,0,14824) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetBettyID(),10,9,0,12897) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetRaulID(),11,9,0,10630) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetMorrisID(),15,12,3,14752) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetRudyID(),13,10,0,18320) -- get id from UB_Options.ini
|
||||
|
||||
-- Add test UB profiles
|
||||
--[[
|
||||
AddProfileToMap (UB_GetManuelID(),7,8,0,15108) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetBiggensID(),7,8,0,15107) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetJohnID(),7,8,0,15106) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetTexID(),7,8,0,15105) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetGastonID(),7,8,0,15104) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetJerryID(),7,8,0,15103) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetPgmale4ID(),7,8,0,15102) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetBettyID(),7,8,0,15101) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetRaulID(),7,8,0,15109) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetMorrisID(),7,8,0,15110) -- get id from UB_Options.ini
|
||||
AddProfileToMap (UB_GetRudyID(),7,8,0,15111) -- get id from UB_Options.ini
|
||||
]]
|
||||
|
||||
|
||||
-- Added enemy to sector
|
||||
if ( Test == false ) then
|
||||
-- H7
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
end
|
||||
SetNumberJa25EnemiesInSurfaceSector( 7, 8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 7, 8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
|
||||
-- H8
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 6 + math.random( 1, 4 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 13 + math.random( 1, 3 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 16 + math.random( 1, 6 )
|
||||
ubNumElites = 2 + math.random( 1,2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 19 + math.random( 1, 9 )
|
||||
ubNumElites = 2 + math.random( 1, 2 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 8,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 8,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
|
||||
-- Guard Post
|
||||
-- H9
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 5 )
|
||||
ubNumElites = 1
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 16 + math.random( 1, 4 )
|
||||
ubNumElites = 1
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 19 + math.random( 1, 4 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 19 + math.random( 1, 6 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 9,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 9,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- H10
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 6 + math.random( 1, 5 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 9 + math.random( 1, 3 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 4 )
|
||||
ubNumElites = 2 + math.random( 1, 4 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 4 )
|
||||
ubNumElites = 2 + math.random( 1, 4 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 10,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 10,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- H11
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 6 + math.random( 1, 3 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 8 + math.random( 1, 3 )
|
||||
ubNumElites = 2 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 4 )
|
||||
ubNumElites = 4 + math.random( 1, 3 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 4 )
|
||||
ubNumElites = 2 + math.random( 1, 3 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 11,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 11,8, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
|
||||
-- I9
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 6 + math.random( 1, 5 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 9 + math.random( 1, 4 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 4 )
|
||||
ubNumElites = 2 + math.random( 1, 4 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 6 )
|
||||
ubNumElites = 2 + math.random( 1, 4 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 9,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 9,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- First part of town
|
||||
-- I10
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 13 + math.random( 1, 6 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 16 + math.random( 1, 4 )
|
||||
ubNumElites = 1 + math.random( 1, 3 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 14 + math.random( 1, 4 )
|
||||
ubNumElites = 5 + math.random( 1, 3 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 4 )
|
||||
ubNumElites = 5 + math.random( 1, 3 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 10,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 10,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- Second part of town
|
||||
-- I11
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 14 + math.random( 1, 7 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 16 + math.random( 1, 5 )
|
||||
ubNumElites = 2 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 14 + math.random( 1, 4 )
|
||||
ubNumElites = 5 + math.random( 1, 4 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 17 + math.random( 1, 4 )
|
||||
ubNumElites = 5 + math.random( 1, 4 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 11,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 11,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- I12
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 8 + math.random( 1, 6 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 12 + math.random( 1, 5 )
|
||||
ubNumElites = 2 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 12 + math.random( 1, 6 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 6 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 12,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 12,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- Abandoned mine
|
||||
-- I13
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 0
|
||||
ubNumElites = 0
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 13,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 13,9, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- J11
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 6 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 3 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 11 + math.random( 1, 5 )
|
||||
ubNumElites = 6 + math.random( 1, 3 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 20 + math.random( 1, 5 )
|
||||
ubNumElites = 6 + math.random( 1, 3 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 11,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 11,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- J12
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 12 + math.random( 1, 4 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 10 + math.random( 1, 4 )
|
||||
ubNumElites = 1 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 11 + math.random( 1, 3 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 21 + math.random( 1, 3 )
|
||||
ubNumElites = 3 + math.random( 1, 2 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 12,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 12,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- Power Generator, Ground Level
|
||||
-- J13
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 15 + math.random( 1, 6 )
|
||||
ubNumElites = 1
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 16 + math.random( 1, 5 )
|
||||
ubNumElites = 5 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 18 + math.random( 1, 4 )
|
||||
ubNumElites = 6 + math.random( 1, 3 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 18 + math.random( 1, 4 )
|
||||
ubNumElites = 7 + math.random( 1, 3 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 13,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 13,10, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
|
||||
-- Complex, Ground Level
|
||||
-- K15
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 14 + math.random( 1, 5 )
|
||||
ubNumElites = 0
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 18 + math.random( 1, 3 )
|
||||
ubNumElites = 4 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 17 + math.random( 1, 3 )
|
||||
ubNumElites = 8 + math.random( 1, 2 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
ubNumAdmins = 0
|
||||
ubNumTroops = 17 + math.random( 1, 3 )
|
||||
ubNumElites = 8 + math.random( 1, 2 )
|
||||
end
|
||||
|
||||
SetNumberJa25EnemiesInSurfaceSector( 15,11, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
UB_SetNumberJa25EnemiesInSurfaceSector( 15,11, ubNumAdmins, ubNumTroops, ubNumElites )
|
||||
end
|
||||
|
||||
-- init hospital variables
|
||||
|
||||
@@ -8,14 +8,14 @@ local DIF_LEVEL_INSANE = 4
|
||||
function InitStrategicLayer ()
|
||||
|
||||
-- I10 BloodCats
|
||||
if ( difficultyLevel == DIF_LEVEL_EASY ) then
|
||||
SetNumberOfJa25BloodCatsInSector ( 10, 9, 3, 5 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
|
||||
SetNumberOfJa25BloodCatsInSector ( 10, 9, 4, 5 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
|
||||
SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
|
||||
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
|
||||
SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
|
||||
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
|
||||
UB_SetNumberOfJa25BloodCatsInSector ( 10, 9, 3, 5 )
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
|
||||
UB_SetNumberOfJa25BloodCatsInSector ( 10, 9, 4, 5 )
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
|
||||
UB_SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
|
||||
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
|
||||
UB_SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
|
||||
end
|
||||
|
||||
end
|
||||
+12
-154
@@ -161,165 +161,23 @@ SectorY =
|
||||
MAP_ROW_P = 16,
|
||||
}
|
||||
|
||||
-- JA2 Remove
|
||||
|
||||
--[[
|
||||
-- local function
|
||||
local function HandleJohnArrival( ID )
|
||||
|
||||
local ID2 = nil
|
||||
local sDist
|
||||
|
||||
if ( not ID ) then
|
||||
ID = FindSoldierByProfileID (Profil.JOHN)
|
||||
if ( not ID ) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if ( PythSpacesAway( ID,8228) < 40 ) then
|
||||
|
||||
if ( CheckFact( Facts.FACT_MARY_ALIVE, 0 ) == true ) then
|
||||
ID2 = FindSoldierByProfileID( Profil.MARY )
|
||||
if ( ID2 ) then
|
||||
if ( PythSpacesAway( ID, GetNPCGridNo(ID2) ) > 8 ) then
|
||||
-- Too far away!
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SetFactTrue( Facts.FACT_MARY_OR_JOHN_ARRIVED )
|
||||
ActionStopMerc(ID)
|
||||
|
||||
-- If Mary is alive/dead
|
||||
if ( ID2 ) then
|
||||
ActionStopMerc(ID2)
|
||||
TriggerNPCRecord( ID, 13 )
|
||||
else
|
||||
TriggerNPCRecord( ID, 12 )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
-- end local function
|
||||
|
||||
-- local function
|
||||
local function HandleMaryArrival( ID )
|
||||
|
||||
local sDist
|
||||
|
||||
if ( not ID ) then
|
||||
ID = FindSoldierByProfileID (Profil.MARY)
|
||||
if ( not ID ) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if ( CheckFact( Facts.FACT_JOHN_ALIVE,0) == true ) then
|
||||
return
|
||||
--new requirements: player close by
|
||||
elseif ( PythSpacesAway( ID,8228) < 40 ) then
|
||||
|
||||
if ( not TileIsOutOfBounds ( ClosestPC( ID, sDist )) and sDist > NPC_TALK_RADIUS * 2 ) then
|
||||
--too far away
|
||||
return
|
||||
end
|
||||
|
||||
SetFactTrue( Facts.FACT_MARY_OR_JOHN_ARRIVED )
|
||||
ActionStopMerc(ID)
|
||||
TriggerNPCRecord( ID, 13 )
|
||||
end
|
||||
|
||||
end
|
||||
]]
|
||||
-- end local function
|
||||
|
||||
function HandleAtNewGridNo( ProfileId )
|
||||
|
||||
-- Ja2 Remove
|
||||
--[[
|
||||
if ( FindSoldierByProfileID (UB_GetTexID()) == UB_GetTexID() ) then
|
||||
SetKeyProfile (UB_GetTexID(),true)
|
||||
end
|
||||
|
||||
if ( FindSoldierByProfileID (UB_GetBettyID()) == UB_GetBettyID() ) then
|
||||
SetKeyProfile (UB_GetBettyID(),true)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
TeamSoldier = FindSoldierTeam (ProfileId)
|
||||
if ( TeamSoldier == Team.OUR_TEAM ) then -- Team
|
||||
|
||||
-- Kingping expecting visit from player (Sector D5)
|
||||
-- The fact has to be TRUE. If FALSE then Kingpin attack the player.
|
||||
if ( CheckFact( 98 ) == false ) then
|
||||
if ( NPCInRoomRange( ProfileId, 30, 39 ) == true and gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_D and gWorldSectorZ == 0 )then
|
||||
|
||||
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
|
||||
if ( CheckMercPtrsInSector (iLoop) == true and CheckMercPtrsInActive(iLoop) == true and CheckMercPtrsInCivilianGroup (iLoop) == 2 ) then
|
||||
for aimLoop=GetTacticalStatusFirstID(Team.OUR_TEAM),GetTacticalStatusLastID(Team.OUR_TEAM) do
|
||||
if ( CheckMercPtrsID1SeenID2(iLoop,aimLoop) == SEEN_CURRENTLY ) then
|
||||
MakeMercPtrsHostile( iLoop )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( CheckCombatMode == false ) then
|
||||
EnterTeamCombatMode(Team.CIV_TEAM)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
if ( WhatKindOfMercAmI (ProfileId) == What.MERC_TYPE__EPC ) then -- what EPC
|
||||
|
||||
-- Skyrider
|
||||
if ( ProfileId == Profil.SKYRIDER and CheckNPCSectorBool( Profil.SKYRIDER, 13, SectorY.MAP_ROW_B, 0 ) == true and PythSpacesAway( Profil.SKYRIDER,8842 ) < 11 ) then
|
||||
ActionStopMerc(Profil.SKYRIDER)
|
||||
SetFactTrue( Facts.FACT_SKYRIDER_CLOSE_TO_CHOPPER )
|
||||
TriggerNPCRecord( Profil.SKYRIDER, 15 )
|
||||
SetUpHelicopterForPlayer( 13, SectorY.MAP_ROW_B, Profil.SKYRIDER, 163 ) -- 163 helicopter
|
||||
|
||||
-- Mary & John
|
||||
elseif ( ( CheckNPCSectorBool( Profil.MARY, 13, SectorY.MAP_ROW_B, 0 ) == true ) or ( CheckNPCSectorBool( Profil.JOHN, 13, SectorY.MAP_ROW_B, 0 ) == true ) ) then
|
||||
|
||||
-- Mary
|
||||
if ( ProfileId == Profil.MARY ) then
|
||||
HandleMaryArrival( Profil.MARY )
|
||||
-- John
|
||||
elseif ( ProfileId == Profil.JOHN ) then
|
||||
HandleJohnArrival( Profil.JOHN )
|
||||
end
|
||||
|
||||
-- Maria
|
||||
elseif ( ProfileId == Profil.MARIA and CheckNPCSectorBool( Profil.MARIA, 6, SectorY.MAP_ROW_C, 0) == true and CheckFact(Facts.FACT_MARIA_ESCORTED_AT_LEATHER_SHOP,Profil.MARIA) == true ) then
|
||||
|
||||
if ( NPCInRoom( Profil.ANGEL, 2 ) == true ) then
|
||||
TriggerNPCRecord( Profil.ANGEL, 12 )
|
||||
end
|
||||
|
||||
-- Joey
|
||||
elseif ( ProfileId == Profil.JOEY and CheckNPCSectorBool( Profil.JOEY, 8, SectorY.MAP_ROW_G, 0) == true and CheckFact(Facts.FACT_JOEY_NEAR_MARTHA,0) == true ) then
|
||||
ActionStopMerc(Profil.JOEY)
|
||||
TriggerNPCRecord( Profil.JOEY, 9 )
|
||||
end
|
||||
|
||||
-- Drassen stuff for John & Mary
|
||||
elseif ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS) == pQuest.QUESTINPROGRESS and ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then
|
||||
|
||||
if ( CheckFact( Facts.FACT_JOHN_ALIVE ) == true ) then
|
||||
HandleJohnArrival( nil )
|
||||
else
|
||||
HandleMaryArrival( nil )
|
||||
end
|
||||
|
||||
elseif ( TeamSoldier == Team.CIV_TEAM and ProfileId ~= NO_PROFILE and CheckSoldierNeutral( ProfileId ) == true ) then
|
||||
|
||||
if ( ProfileId == Profil.JIM or ProfileId == Profil.JACK or ProfileId == Profil.OLAF or ProfileId == Profil.RAY or ProfileId == Profil.OLGA or ProfileId == Profil.TYRONE ) then
|
||||
|
||||
if ( not TileIsOutOfBounds( ClosestPC( ProfileId, sDesiredMercDist )) ) then
|
||||
if ( sDesiredMercDist <= NPC_TALK_RADIUS * 2 ) then
|
||||
CancelAIAction ( ProfileId )
|
||||
AddToShouldBecomeHostileOrSayQuoteList( GetPlayerMercID(ProfileId) )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end -- End what EPC
|
||||
end -- End team
|
||||
]]
|
||||
|
||||
end
|
||||
@@ -39,6 +39,28 @@ nQuests =
|
||||
-- max Quests 254
|
||||
}
|
||||
|
||||
ShopID = {
|
||||
ARMS_DEALER_TONY = 0,
|
||||
ARMS_DEALER_FRANZ = 1,
|
||||
ARMS_DEALER_KEITH = 2,
|
||||
ARMS_DEALER_JAKE = 3,
|
||||
ARMS_DEALER_GABBY = 4,
|
||||
ARMS_DEALER_HOWARD = 5,
|
||||
ARMS_DEALER_SAM = 6,
|
||||
ARMS_DEALER_FRANK = 7,
|
||||
ARMS_DEALER_BAR_BRO_1 = 8,
|
||||
ARMS_DEALER_BAR_BRO_2 = 9,
|
||||
ARMS_DEALER_BAR_BRO_3 = 10,
|
||||
ARMS_DEALER_BAR_BRO_4 = 11,
|
||||
ARMS_DEALER_MICKY = 12,
|
||||
ARMS_DEALER_ARNIE = 13,
|
||||
ARMS_DEALER_FREDO = 14,
|
||||
ARMS_DEALER_RAUL = 15, -- Raul UB
|
||||
ARMS_DEALER_ELGIN = 16,
|
||||
ARMS_DEALER_MANNY = 17,
|
||||
ARMS_DEALER_BETTY = 18, -- Betty UB
|
||||
}
|
||||
|
||||
qStatus = {
|
||||
QUESTNOTSTARTED = 0,
|
||||
QUESTINPROGRESS = 1,
|
||||
@@ -65,6 +87,15 @@ nFacts = {
|
||||
|
||||
local NO_PROFILE = 200
|
||||
|
||||
-- UB function
|
||||
local function AddLaptopTransmitterToBettysInventory()
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, UB_itemLAPTOP_TRANSMITTER, 1 ) -- Laptop transmitter
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, 216, 1 )
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, 202, 2 )
|
||||
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, 201, 2 )
|
||||
end
|
||||
-- End UB
|
||||
|
||||
function InternalStartQuest( ubQuest, sSectorX, sSectorY, fUpdateHistory )
|
||||
|
||||
if ( CheckQuest(ubQuest) == qStatus.QUESTNOTSTARTED ) then
|
||||
@@ -145,6 +176,10 @@ function InternalEndQuest( ubQuest, sSectorX, sSectorY, fUpdateHistory )
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 25, NO_PROFILE )
|
||||
elseif ( ubQuest == nQuests.QUEST_ESCORT_SHANK ) then
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 5, NO_PROFILE )
|
||||
-- UB
|
||||
elseif ( ubQuest == nQuests.QUEST_GET_RID_BLOODCATS_AT_BETTYS ) then
|
||||
AddLaptopTransmitterToBettysInventory()
|
||||
-- end UB
|
||||
else
|
||||
GiveQuestRewardPoint( sSectorX, sSectorY, 4, NO_PROFILE )
|
||||
end
|
||||
|
||||
@@ -80,7 +80,7 @@ function PrepareToExitIntroScreen()
|
||||
SetIntroExitScreen ( ScreenTypes.GAME_SCREEN )
|
||||
SetCurrentWorldSector( iniDEFAULT_END_SECTOR_X, iniDEFAULT_END_SECTOR_Y, iniDEFAULT_END_SECTOR_Z )
|
||||
|
||||
EnterTacticalInFinalSector()
|
||||
UB_EnterTacticalInFinalSector()
|
||||
|
||||
-- Dont leave tactical
|
||||
SetEnteringMapScreen (false)
|
||||
|
||||
@@ -186,6 +186,11 @@ local gsRobotGridNo
|
||||
|
||||
function HandleQuestCodeOnSectorEntry( sNewSectorX, sNewSectorY, bNewSectorZ )
|
||||
|
||||
if ( sNewSectorX == 10 and sNewSectorY == 9 and bNewSectorZ == 0 ) then
|
||||
SetKeyProfile (UB_GetTexID(),true)
|
||||
SetKeyProfile (UB_GetBettyID(),true)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function HandleQuestCodeOnSectorExit( sOldSectorX, sOldSectorY, bOldSectorZ )
|
||||
@@ -216,49 +221,49 @@ local pSoldier
|
||||
|
||||
if ( sOldSectorX == 7 and sOldSectorY == SectorY.MAP_ROW_H and bOldSectorZ == 0 ) then
|
||||
-- remove Jerry from the map
|
||||
SetCharacterSectorX( 76, 0)
|
||||
SetCharacterSectorY( 76, 0)
|
||||
SetCharacterSectorX( UB_GetJerryID(), 0)
|
||||
SetCharacterSectorY( UB_GetJerryID(), 0)
|
||||
end
|
||||
|
||||
-- if the player is leaving a sector with Tex in it
|
||||
if ( sOldSectorX == CheckCharacterSectorX(64) and sOldSectorY == CheckCharacterSectorY(64) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 64 ) > 0 ) then
|
||||
if ( sOldSectorX == CheckCharacterSectorX(UB_GetTexID()) and sOldSectorY == CheckCharacterSectorY(UB_GetTexID()) and bOldSectorZ == 0 and CheckLastDateSpokenTot( UB_GetTexID() ) > 0 ) then
|
||||
|
||||
pSoldier = FindSoldierByProfileID( 64 ) -- TEX
|
||||
pSoldier = FindSoldierByProfileID( UB_GetTexID() ) -- TEX
|
||||
|
||||
-- if the npc isnt on the players team AND the player has never spoken to them
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( 64 ) > 0 ) then
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( UB_GetTexID() ) > 0 ) then
|
||||
|
||||
--remove Tex from the map
|
||||
SetCharacterSectorX( 64, 0)
|
||||
SetCharacterSectorY( 64, 0)
|
||||
SetCharacterSectorX( UB_GetTexID(), 0)
|
||||
SetCharacterSectorY( UB_GetTexID(), 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- if the player is leaving a sector with John kulba in it
|
||||
if ( sOldSectorX == CheckCharacterSectorX(62) and sOldSectorY == CheckCharacterSectorY(62) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 62 ) > 0 ) then
|
||||
if ( sOldSectorX == CheckCharacterSectorX(UB_GetJohnID()) and sOldSectorY == CheckCharacterSectorY(UB_GetJohnID()) and bOldSectorZ == 0 and CheckLastDateSpokenTot( UB_GetJohnID() ) > 0 ) then
|
||||
|
||||
pSoldier = FindSoldierByProfileID( 62 ) -- John
|
||||
pSoldier = FindSoldierByProfileID( UB_GetJohnID() ) -- John
|
||||
|
||||
-- if the npc isnt on the players team AND the player has never spoken to them
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( 62 ) > 0 ) then
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( UB_GetJohnID() ) > 0 ) then
|
||||
|
||||
--remove Tex from the map
|
||||
SetCharacterSectorX( 62, 0)
|
||||
SetCharacterSectorY( 62, 0)
|
||||
SetCharacterSectorX( UB_GetJohnID(), 0)
|
||||
SetCharacterSectorY( UB_GetJohnID(), 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- if the player is leaving a sector with Manuel in it
|
||||
if ( sOldSectorX == CheckCharacterSectorX(60) and sOldSectorY == CheckCharacterSectorY(60) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 60 ) > 0 ) then
|
||||
if ( sOldSectorX == CheckCharacterSectorX(UB_GetManuelID()) and sOldSectorY == CheckCharacterSectorY(UB_GetManuelID()) and bOldSectorZ == 0 and CheckLastDateSpokenTot( UB_GetManuelID() ) > 0 ) then
|
||||
|
||||
pSoldier = FindSoldierByProfileID( 60 ) -- John
|
||||
pSoldier = FindSoldierByProfileID( UB_GetManuelID() ) -- Manuel
|
||||
|
||||
-- if the npc isnt on the players team AND the player has never spoken to them
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( 60 ) > 0 ) then
|
||||
if ( pSoldier == nil and CheckLastDateSpokenTot( UB_GetManuelID() ) > 0 ) then
|
||||
|
||||
--remove Tex from the map
|
||||
SetCharacterSectorX( 60, 0)
|
||||
SetCharacterSectorY( 60, 0)
|
||||
SetCharacterSectorX( UB_GetManuelID(), 0)
|
||||
SetCharacterSectorY( UB_GetManuelID(), 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user