mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Bugfix: Overhead.lua (by Jazz)
o Entering Kinpgin room through the window. Demon (bodyguard) has to let in the player and Kingpin has to expect the player git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1720 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -14,6 +14,10 @@ Facts =
|
||||
FACT_ROBOT_READY_SECOND_TIME = 205,
|
||||
FACT_SECOND_ROBOT_DESTROYED = 206,
|
||||
FACT_ESTONI_REFUELLING_POSSIBLE = 277,
|
||||
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
|
||||
FACT_PLAYER_REPAID_KINGPIN = 104,
|
||||
FACT_KINGPIN_NOT_IN_OFFICE = 256,
|
||||
|
||||
}
|
||||
|
||||
Attitude =
|
||||
@@ -160,6 +164,19 @@ SectorY =
|
||||
MAP_ROW_P = 16,
|
||||
}
|
||||
|
||||
local iLoop
|
||||
local aimLoop
|
||||
|
||||
local HEARD_3_TURNS_AGO = -4
|
||||
local HEARD_2_TURNS_AGO = -3
|
||||
local HEARD_LAST_TURN = -2
|
||||
local HEARD_THIS_TURN = -1
|
||||
local NOT_HEARD_OR_SEEN = 0
|
||||
local SEEN_CURRENTLY = 1
|
||||
local SEEN_THIS_TURN = 2
|
||||
local SEEN_LAST_TURN = 3
|
||||
local SEEN_2_TURNS_AGO =4
|
||||
local SEEN_3_TURNS_AGO = 5
|
||||
|
||||
-- local function
|
||||
local function HandleJohnArrival( ID )
|
||||
@@ -242,6 +259,28 @@ function HandleAtNewGridNo( 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
|
||||
@@ -278,7 +317,7 @@ function HandleAtNewGridNo( ProfileId )
|
||||
-- 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( FACT_JOHN_ALIVE) == true ) then
|
||||
if ( CheckFact( Facts.FACT_JOHN_ALIVE ) == true ) then
|
||||
HandleJohnArrival( nil )
|
||||
else
|
||||
HandleMaryArrival( nil )
|
||||
|
||||
@@ -14,6 +14,10 @@ Facts =
|
||||
FACT_ROBOT_READY_SECOND_TIME = 205,
|
||||
FACT_SECOND_ROBOT_DESTROYED = 206,
|
||||
FACT_ESTONI_REFUELLING_POSSIBLE = 277,
|
||||
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
|
||||
FACT_PLAYER_REPAID_KINGPIN = 104,
|
||||
FACT_KINGPIN_NOT_IN_OFFICE = 256,
|
||||
|
||||
}
|
||||
|
||||
Attitude =
|
||||
@@ -31,32 +35,32 @@ Attitude =
|
||||
Quests =
|
||||
{
|
||||
-- Quests ID -- BinaryData\QUESTS.EDT Record
|
||||
QUEST_DELIVER_LETTER = 0, -- Start quest 0, End quest 1
|
||||
QUEST_FOOD_ROUTE = 1, -- Start quest 2, End quest 3
|
||||
QUEST_KILL_TERRORISTS = 2, -- Start quest 4, End quest 5
|
||||
QUEST_KINGPIN_IDOL = 3, -- Start quest 6, End quest 7
|
||||
QUEST_KINGPIN_MONEY = 4, -- Start quest 8, End quest 9
|
||||
QUEST_RUNAWAY_JOEY = 5, -- Start quest 10, End quest 11
|
||||
QUEST_RESCUE_MARIA = 6, -- Start quest 12, End quest 13
|
||||
QUEST_CHITZENA_IDOL = 7, -- Start quest 14, End quest 15
|
||||
QUEST_HELD_IN_ALMA = 8, -- Start quest 16, End quest 17
|
||||
QUEST_INTERROGATION = 9, -- Start quest 18, End quest 19
|
||||
QUEST_ARMY_FARM = 10, -- Start quest 20, End quest 21
|
||||
QUEST_FIND_SCIENTIST = 11, -- Start quest 22, End quest 23
|
||||
QUEST_DELIVER_VIDEO_CAMERA = 12, -- Start quest 24, End quest 25
|
||||
QUEST_BLOODCATS = 13, -- Start quest 26, End quest 27
|
||||
QUEST_FIND_HERMIT = 14, -- Start quest 28, End quest 29
|
||||
QUEST_CREATURES = 15, -- Start quest 30, End quest 31
|
||||
QUEST_CHOPPER_PILOT = 16, -- Start quest 32, End quest 33
|
||||
QUEST_ESCORT_SKYRIDER = 17, -- Start quest 34, End quest 35
|
||||
QUEST_FREE_DYNAMO = 18, -- Start quest 36, End quest 37
|
||||
QUEST_ESCORT_TOURISTS = 19, -- Start quest 38, End quest 39
|
||||
QUEST_FREE_CHILDREN = 20, -- Start quest 40, End quest 41
|
||||
QUEST_LEATHER_SHOP_DREAM = 21, -- Start quest 42, End quest 43
|
||||
QUEST_ESCORT_SHANK = 22, -- Start quest 44, End quest 45
|
||||
QUEST_23 = 23, -- Start quest 46, End quest 47
|
||||
QUEST_24 = 24, -- Start quest 48, End quest 49
|
||||
QUEST_KILL_DEIDRANNA = 25, -- Start quest 50, End quest 51
|
||||
QUEST_DELIVER_LETTER = 0, -- Start quest 0, End quest 1 - Deliver Letter
|
||||
QUEST_FOOD_ROUTE = 1, -- Start quest 2, End quest 3 - Food Route
|
||||
QUEST_KILL_TERRORISTS = 2, -- Start quest 4, End quest 5 - Terrorists
|
||||
QUEST_KINGPIN_IDOL = 3, -- Start quest 6, End quest 7 - Kingpin Chalice
|
||||
QUEST_KINGPIN_MONEY = 4, -- Start quest 8, End quest 9 - Kingpin Money
|
||||
QUEST_RUNAWAY_JOEY = 5, -- Start quest 10, End quest 11 - Runaway Joey
|
||||
QUEST_RESCUE_MARIA = 6, -- Start quest 12, End quest 13 - Rescue Maria
|
||||
QUEST_CHITZENA_IDOL = 7, -- Start quest 14, End quest 15 - Chitzena Chalice
|
||||
QUEST_HELD_IN_ALMA = 8, -- Start quest 16, End quest 17 - Held in Alma
|
||||
QUEST_INTERROGATION = 9, -- Start quest 18, End quest 19 - Interogation
|
||||
QUEST_ARMY_FARM = 10, -- Start quest 20, End quest 21 - Hillbilly Problem
|
||||
QUEST_FIND_SCIENTIST = 11, -- Start quest 22, End quest 23 - Find Scientist
|
||||
QUEST_DELIVER_VIDEO_CAMERA = 12, -- Start quest 24, End quest 25 - Deliver Video Camera
|
||||
QUEST_BLOODCATS = 13, -- Start quest 26, End quest 27 - Blood Cats
|
||||
QUEST_FIND_HERMIT = 14, -- Start quest 28, End quest 29 - Find Hermit
|
||||
QUEST_CREATURES = 15, -- Start quest 30, End quest 31 - Creatures
|
||||
QUEST_CHOPPER_PILOT = 16, -- Start quest 32, End quest 33 - Find Chopper Pilot
|
||||
QUEST_ESCORT_SKYRIDER = 17, -- Start quest 34, End quest 35 - Escort SkyRider
|
||||
QUEST_FREE_DYNAMO = 18, -- Start quest 36, End quest 37 - Free Dynamo
|
||||
QUEST_ESCORT_TOURISTS = 19, -- Start quest 38, End quest 39 - Escort Tourists
|
||||
QUEST_FREE_CHILDREN = 20, -- Start quest 40, End quest 41 - Doreen
|
||||
QUEST_LEATHER_SHOP_DREAM = 21, -- Start quest 42, End quest 43 - Leather Shop Dream
|
||||
QUEST_ESCORT_SHANK = 22, -- Start quest 44, End quest 45 - Escort Shank
|
||||
QUEST_23 = 23, -- Start quest 46, End quest 47 - No 23 Yet
|
||||
QUEST_24 = 24, -- Start quest 48, End quest 49 - No 24 Yet
|
||||
QUEST_KILL_DEIDRANNA = 25, -- Start quest 50, End quest 51 - Kill Deidranna
|
||||
|
||||
-- max Quests 254
|
||||
}
|
||||
@@ -160,6 +164,19 @@ SectorY =
|
||||
MAP_ROW_P = 16,
|
||||
}
|
||||
|
||||
local iLoop
|
||||
local aimLoop
|
||||
|
||||
local HEARD_3_TURNS_AGO = -4
|
||||
local HEARD_2_TURNS_AGO = -3
|
||||
local HEARD_LAST_TURN = -2
|
||||
local HEARD_THIS_TURN = -1
|
||||
local NOT_HEARD_OR_SEEN = 0
|
||||
local SEEN_CURRENTLY = 1
|
||||
local SEEN_THIS_TURN = 2
|
||||
local SEEN_LAST_TURN = 3
|
||||
local SEEN_2_TURNS_AGO =4
|
||||
local SEEN_3_TURNS_AGO = 5
|
||||
|
||||
-- local function
|
||||
local function HandleJohnArrival( ID )
|
||||
@@ -242,6 +259,28 @@ function HandleAtNewGridNo( 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
|
||||
@@ -251,7 +290,7 @@ function HandleAtNewGridNo( ProfileId )
|
||||
TriggerNPCRecord( Profil.SKYRIDER, 15 )
|
||||
SetUpHelicopterForPlayer( 13, SectorY.MAP_ROW_B, Profil.SKYRIDER, 163 ) -- 163 helicopter
|
||||
|
||||
-- Mary & John
|
||||
-- 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
|
||||
@@ -278,7 +317,7 @@ function HandleAtNewGridNo( ProfileId )
|
||||
-- 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( FACT_JOHN_ALIVE) == true ) then
|
||||
if ( CheckFact( Facts.FACT_JOHN_ALIVE ) == true ) then
|
||||
HandleJohnArrival( nil )
|
||||
else
|
||||
HandleMaryArrival( nil )
|
||||
|
||||
Reference in New Issue
Block a user