MERGED GameDir files from the development GameDir folder from revision 4545 up to 4882

Development GameDir folder: https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP/GameDir




git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1353 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
Wanne
2012-01-18 11:58:16 +00:00
parent 3b393b7953
commit f647e94f49
4326 changed files with 221645 additions and 16 deletions
+381
View File
@@ -0,0 +1,381 @@
Profil = {
ELDIN = 127,
BIGGENS = 61, -- UB
}
Team = {
OUR_TEAM = 0,
ENEMY_TEAM = 1,
CREATURE_TEAM = 2,
MILITIA_TEAM = 3,
CIV_TEAM = 4,
PLAYER_PLAN = 5,
LAN_TEAM_ONE = 6,
LAN_TEAM_TWO = 7,
LAN_TEAM_THREE = 8,
LAN_TEAM_FOUR = 9,
}
StatusAlert = {
STATUS_GREEN = 0,
STATUS_YELLOW = 1,
STATUS_RED = 2,
STATUS_BLACK = 3,
}
ActionType = {
AI_ACTION_GET_CLOSER = 5,
}
Facts = {
FACT_MUSEUM_ALARM_WENT_OFF = 278,
}
SoundVolume = {
LOWVOLUME = 25,
BTNVOLUME = 40,
MIDVOLUME = 65,
HIGHVOLUME = 127,
}
Sample = {
KLAXON_ALARM = 214,
}
Group = {
NON_CIV_GROUP = 0,
REBEL_CIV_GROUP = 1,
KINGPIN_CIV_GROUP = 2,
SANMONA_ARMS_GROUP = 3,
ANGELS_GROUP = 4,
BEGGARS_CIV_GROUP = 5,
TOURISTS_CIV_GROUP = 6,
ALMA_MILITARY_CIV_GROUP = 7,
DOCTORS_CIV_GROUP = 8,
COUPLE1_CIV_GROUP = 9,
HICKS_CIV_GROUP = 10,
WARDEN_CIV_GROUP = 11,
JUNKYARD_CIV_GROUP = 12,
FACTORY_KIDS_GROUP = 13,
QUEENS_CIV_GROUP = 14,
}
Civ_status = {
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
Noise = {
NOISE_UNKNOWN = 0,
NOISE_MOVEMENT = 1,
NOISE_CREAKING = 2,
NOISE_SPLASHING = 3,
NOISE_BULLET_IMPACT = 4,
NOISE_GUNFIRE = 5,
NOISE_EXPLOSION = 6,
NOISE_SCREAM = 7,
NOISE_ROCK_IMPACT = 8,
NOISE_GRENADE_IMPACT = 9,
NOISE_WINDOW_SMASHING = 10,
NOISE_DOOR_SMASHING = 11,
NOISE_SILENT_ALARM = 12,
}
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 ubProfil = 0
local MAX_MISC_NOISE_DURATION = 12
local iLoop
local NOBODY = 254
local LAST_TEAM = Team.LAN_TEAM_FOUR
local bTeam
function PerformItemAction( ActionID , sGridNo )
local ubID
-- Open Door
if ActionID == 1 then
ACTION_ITEM_OPEN_DOOR (sGridNo)
end
-- Open Close
if ActionID == 2 then
ACTION_ITEM_CLOSE_DOOR (sGridNo)
end
-- 3x3 Hidden Pit
if ActionID == 4 then
Add3X3Pit (sGridNo)
SearchForOtherMembersWithinPitRadiusAndMakeThemFall ( sGridNo, 1 )
end
-- 5x5 Hidden Pit
if ActionID == 5 then
Add5X5Pit (sGridNo)
SearchForOtherMembersWithinPitRadiusAndMakeThemFall ( sGridNo, 2 )
end
-- Toggle Door
if ActionID == 6 then
ACTION_ITEM_TOGGLE_DOOR (sGridNo)
end
-- Toggle Action1s
if ActionID == 7 then
ToggleActionItemsByFrequency( 1 )
end
-- Toggle Action2s
if ActionID == 8 then
ToggleActionItemsByFrequency ( 2 )
end
-- Toggle Action3s
if ActionID == 9 then
ToggleActionItemsByFrequency( 3 )
end
-- Toggle Action4s
if ActionID == 10 then
ToggleActionItemsByFrequency( 4 )
end
-- Enter Brothel
if ActionID == 11 then
-- Empty Action
end
-- Exit Brothel
if ActionID == 12 then
-- Empty Action
end
-- Kingpin Alarm
if ActionID == 13 then
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
if ( TacticalStatusTeamActive(Team.CIV_TEAM) == true ) then
SetPublicNoiseGridNo( Team.CIV_TEAM, sGridNo )
SetPublicNoiseVolume( Team.CIV_TEAM, MAX_MISC_NOISE_DURATION )
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
if ( CheckMercPtrsInSector (iLoop) == true and CheckMercPtrsInActive(iLoop) == true and CheckMercPtrsInCivilianGroup (iLoop) == Group.KINGPIN_CIV_GROUP ) then
SetNewSituationMercPtrs ( iLoop )
end
end
end
SetCivGroupHostile( Group.KINGPIN_CIV_GROUP , Civ_status.CIV_GROUP_HOSTILE )
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
if ( CheckMercPtrsInSector (iLoop) == true and CheckMercPtrsInActive(iLoop) == true and CheckMercPtrsInCivilianGroup (iLoop) == Group.KINGPIN_CIV_GROUP ) 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
-- Sex with Prostitute
if ActionID == 14 then
ACTION_ITEM_SEX ()
end
-- Reveal Room
if ActionID == 15 then
ACTION_ITEM_REVEAL_ROOM (sGridNo)
end
-- Local Alarm
if ActionID == 16 then
MakeNoise( NOBODY, sGridNo, 0, WorldLevelDataTerrainID(sGridNo), 30, Noise.NOISE_SILENT_ALARM )
end
-- Global Alarm
if ActionID == 17 then
for i = 0 , LAST_TEAM do
if ( TacticalStatusTeamActive(i) == true ) then
if ( TacticalStatusTeamHuman(i) == false and ( not i == Team.CIV_TEAM ) ) then
SetPublicNoiseGridNo( i, sGridNo )
SetPublicNoiseVolume( i, MAX_MISC_NOISE_DURATION )
iLoop = GetTacticalStatusFirstID(i)
for o = iLoop,GetTacticalStatusLastID(iLoop) do
if ( CheckMercPtrsInSector (o) == true and CheckMercPtrsInActive(o) == true ) then
SetNewSituationMercPtrs( o )
WearGasMaskIfAvailable( o )
end
end
end
end
end
end
-- Klaxon Sound
if ActionID == 18 then
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
end
-- Unlock door
if ActionID == 19 then
ACTION_ITEM_UNLOCK_DOOR (sGridNo)
end
-- Toggle lock
if ActionID == 20 then
ACTION_ITEM_TOGGLE_LOCK (sGridNo)
end
-- Untrap door
if ActionID == 21 then
ACTION_ITEM_UNTRAP_DOOR (sGridNo)
end
-- Tog pressure items
if ActionID == 22 then
TogglePressureActionItemsInGridNo (sGridNo)
end
-- Museum alarm
if ActionID == 23 then
ubProfil = Profil.ELDIN
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
-- Eldin becomes aware of a very important "noise" coming from here!
-- So long as he hasn't already heard a noise a sec ago...
if ( TacticalStatusTeamActive(Team.CIV_TEAM) == true ) then
-- new situation for Eldin
if ( CheckSoldierInSector(ubProfil) == true and CheckSoldierActive(ubProfil) == true and CheckNPCLife(ubProfil) > 0 and ( CheckSoldierAlertStatus(ubProfil) == StatusAlert.STATUS_GREEN and CheckSoldierNoiseVolume(ubProfil) == 6 ) ) then
if ( SoldierTo3DLocationLineOfSightTest( ubProfil, sGridNo, 0, 0 ) == true ) then
-- sees the player now!
TriggerNPCWithIHateYouQuote(ubProfil)
SetNewSituation(ubProfil)
else
SetNoiseGridno(ubProfil,sGridNo)
SetNoiseVolume(ubProfil,6)
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then
CancelAIAction( ubProfil)
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
SetNextActionData(ubProfil , sGridNo)
RESETTIMECOUNTER( ubProfil, 100 )
end
end
SetFactTrue( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
end
end
end
-- Bloodcat alarm
if ActionID == 24 then
bTeam = Team.CREATURE_TEAM
if ( TacticalStatusTeamActive(bTeam) == true ) then
if ( TacticalStatusTeamHuman(bTeam) == false and ( not bTeam == Team.CIV_TEAM ) ) then
SetPublicNoiseGridNo( bTeam, sGridNo )
SetPublicNoiseVolume( bTeam, MAX_MISC_NOISE_DURATION )
iLoop = GetTacticalStatusFirstID(bTeam)
for o = iLoop,GetTacticalStatusLastID(bTeam) do
if ( CheckMercPtrsInSector (o) == true and CheckMercPtrsInActive(o) == true ) then
SetNewSituationMercPtrs( o )
WearGasMaskIfAvailable( o )
end
end
end
end
end
-- UB Action
-- BIGGENS BOMBS
if ActionID == 25 then
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 17 ) == true ) then
HavePersonAtGridnoStop( sGridNo )
-- Make Biggens run for cover and then detonate the explosives
TriggerNPCRecord( Profil.BIGGENS , 17 )
end
end
-- BIGGENS WARNING
if ActionID == 26 then
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 16 ) == true ) then
HavePersonAtGridnoStop( sGridNo )
-- Make Biggens run for cover and then detonate the explosives
TriggerNPCRecord( Profil.BIGGENS , 16 )
end
end
-- SEE FORTIFIED DOOR
if ActionID == 27 then
HandleSeeingFortifiedDoor( sGridNo )
end
-- OPEN FORTIFED DOOR
if ActionID == 28 then
HandleSwitchToOpenFortifiedDoor( sGridNo )
end
-- SEE POWER GEN FAN
if ActionID == 29 then
-- if the player is in the power plant
if( gWorldSectorX == 13 and gWorldSectorY == 10 and gbWorldSectorZ == 0 ) then
HandleSeeingPowerGenFan( sGridNo )
elseif( gWorldSectorX == 15 and gWorldSectorY == 12 and gbWorldSectorZ == 3 ) then
-- The player is hitting the switch to launch the missles
HandlePlayerHittingSwitchToLaunchMissles()
end
end
end
+130
View File
@@ -0,0 +1,130 @@
Profil = {
CARMEN = 78,
MARIA = 88,
JOEY = 90,
SKYRIDER = 97,
JOHN = 118,
MARY = 119,
}
Group = {
NON_CIV_GROUP = 0,
REBEL_CIV_GROUP = 1,
KINGPIN_CIV_GROUP = 2,
SANMONA_ARMS_GROUP = 3,
ANGELS_GROUP = 4,
BEGGARS_CIV_GROUP = 5,
TOURISTS_CIV_GROUP = 6,
ALMA_MILITARY_CIV_GROUP = 7,
DOCTORS_CIV_GROUP = 8,
COUPLE1_CIV_GROUP = 9,
HICKS_CIV_GROUP = 10,
WARDEN_CIV_GROUP = 11,
JUNKYARD_CIV_GROUP = 12,
FACTORY_KIDS_GROUP = 13,
QUEENS_CIV_GROUP = 14,
}
StatusGroup = {
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
qStatus = {
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests = {
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
QUEST_KILL_DEIDRANNA = 25,
}
SectorY = {
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
Facts =
{
FACT_SKYRIDER_EVER_ESCORTED = 269,
}
function HandleStuffForNPCEscorted( ubNPC )
if ( ubNPC == Profil.MARIA or ubNPC == Profil.JOEY ) then
-- none
elseif ( ubNPC == Profil.SKYRIDER ) then
SetFactTrue( Facts.FACT_SKYRIDER_EVER_ESCORTED )
if ( CheckQuest( Quests.QUEST_ESCORT_SKYRIDER) == qStatus.QUESTNOTSTARTED ) then
StartQuest( Quests.QUEST_ESCORT_SKYRIDER, gWorldSectorX, gWorldSectorY )
end
elseif ( ubNPC == Profil.JOHN ) then
-- recruit Mary as well
RecruitEPC( Profil.MARY )
if ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS ) == qStatus.QUESTNOTSTARTED ) then
StartQuest( Quests.QUEST_ESCORT_TOURISTS, gWorldSectorX, gWorldSectorY )
end
elseif ( ubNPC == Profil.MARY ) then
-- recruit John as well
RecruitEPC( Profil.JOHN )
if ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS ) == qStatus.QUESTNOTSTARTED ) then
StartQuest( Quests.QUEST_ESCORT_TOURISTS, gWorldSectorX, gWorldSectorY )
end
end
end
function CarmenLeavesSectorCallback()
if ( gWorldSectorX == 13 and gWorldSectorY == SectorY.MAP_ROW_C and gWorldSectorZ == 0 ) then
TriggerNPCRecord( Profil.CARMEN, 34 )
elseif ( gWorldSectorX == 9 and gWorldSectorY == SectorY.MAP_ROW_G and gWorldSectorZ == 0 ) then
TriggerNPCRecord( Profil.CARMEN, 35 )
elseif ( gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_C and gWorldSectorZ == 0 ) then
TriggerNPCRecord( Profil.CARMEN, 36 )
end
end
+1 -1
View File
@@ -238,7 +238,7 @@ function HandleAtNewGridNo( ProfileId )
ActionStopMerc(Profil.SKYRIDER)
SetFactTrue( Facts.FACT_SKYRIDER_CLOSE_TO_CHOPPER )
TriggerNPCRecord( Profil.SKYRIDER, 15 )
SetUpHelicopterForPlayer( 13, SectorY.MAP_ROW_B, Profil.SKYRIDER )
SetUpHelicopterForPlayer( 13, SectorY.MAP_ROW_B, Profil.SKYRIDER, 163 ) -- 163 helicopter
elseif ( ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then
+240
View File
@@ -0,0 +1,240 @@
--[[
This script has two functions "HandleQuestCodeOnSectorEntry" and "HandleQuestCodeOnSectorExit".
First function is executed when merc enter to the sector and second function is executed
when merc leave from the sector.
]]
Items = {
MONEY = 219,
}
SectorY = {
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
EventTypes = {
EVENT_SET_BY_NPC_SYSTEM = 27,
}
qStatus = {
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests = {
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
QUEST_KILL_DEIDRANNA = 25, -- JA2
}
Facts = {
FACT_MUSEUM_ALARM_WENT_OFF = 278,
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
FACT_KINGPIN_DEAD = 308,
FACT_ALL_TERRORISTS_KILLED = 156,
}
local KINGPIN_MONEY_SECTOR_X = 5
local KINGPIN_MONEY_SECTOR_Y = 4 -- MAP_ROW_D
local KINGPIN_MONEY_SECTOR_Z = 1
local HOSPITAL_SECTOR_X = 8
local HOSPITAL_SECTOR_Y = 6 -- MAP_ROW_F
local HOSPITAL_SECTOR_Z = 0
local NOBODY = 254
History = {
HISTORY_ENTERED_HISTORY_MODE = 0,
HISTORY_HIRED_MERC_FROM_AIM = 1,
HISTORY_HIRED_MERC_FROM_MERC = 2,
HISTORY_MERC_KILLED = 3,
HISTORY_SETTLED_ACCOUNTS_AT_MERC = 4,
HISTORY_ACCEPTED_ASSIGNMENT_FROM_ENRICO = 5,
HISTORY_CHARACTER_GENERATED = 6,
HISTORY_PURCHASED_INSURANCE = 7,
HISTORY_CANCELLED_INSURANCE = 8,
HISTORY_INSURANCE_CLAIM_PAYOUT = 9,
HISTORY_EXTENDED_CONTRACT_1_DAY = 10,
HISTORY_EXTENDED_CONTRACT_1_WEEK = 11,
HISTORY_EXTENDED_CONTRACT_2_WEEK = 12,
HISTORY_MERC_FIRED = 13,
HISTORY_MERC_QUIT = 14,
HISTORY_QUEST_STARTED = 15,
HISTORY_QUEST_FINISHED = 16,
HISTORY_TALKED_TO_MINER = 17,
HISTORY_LIBERATED_TOWN = 18,
HISTORY_CHEAT_ENABLED = 19,
HISTORY_TALKED_TO_FATHER_WALKER = 20,
HISTORY_MERC_MARRIED_OFF = 21,
HISTORY_MERC_CONTRACT_EXPIRED = 22,
HISTORY_RPC_JOINED_TEAM = 23,
HISTORY_ENRICO_COMPLAINED = 24,
HISTORY_WONBATTLE = 25,
HISTORY_MINE_RUNNING_OUT = 26,
HISTORY_MINE_RAN_OUT = 27,
HISTORY_MINE_SHUTDOWN = 28,
HISTORY_MINE_REOPENED = 29,
HISTORY_DISCOVERED_TIXA = 30,
HISTORY_DISCOVERED_ORTA = 31,
HISTORY_GOT_ROCKET_RIFLES = 32,
HISTORY_DEIDRANNA_DEAD_BODIES = 33,
HISTORY_BOXING_MATCHES = 34,
HISTORY_SOMETHING_IN_MINES = 35,
HISTORY_DEVIN = 36,
HISTORY_MIKE = 37,
HISTORY_TONY = 38,
HISTORY_KROTT = 39,
HISTORY_KYLE = 40,
HISTORY_MADLAB = 41,
HISTORY_GABBY = 42,
HISTORY_KEITH_OUT_OF_BUSINESS = 43,
HISTORY_HOWARD_CYANIDE = 44,
HISTORY_KEITH = 45,
HISTORY_HOWARD = 46,
HISTORY_PERKO = 47,
HISTORY_SAM = 48,
HISTORY_FRANZ = 49,
HISTORY_ARNOLD = 50,
HISTORY_FREDO = 51,
HISTORY_RICHGUY_BALIME = 52,
HISTORY_JAKE = 53,
HISTORY_BUM_KEYCARD = 54,
HISTORY_WALTER = 55,
HISTORY_DAVE = 56,
HISTORY_PABLO = 57,
HISTORY_KINGPIN_MONEY = 58,
HISTORY_WON_BOXING = 59,
HISTORY_LOST_BOXING = 60,
HISTORY_DISQUALIFIED_BOXING = 61,
HISTORY_FOUND_MONEY = 62,
HISTORY_ASSASSIN = 63,
HISTORY_LOSTTOWNSECTOR = 64,
HISTORY_DEFENDEDTOWNSECTOR = 65,
HISTORY_LOSTBATTLE = 66,
HISTORY_FATALAMBUSH = 67,
HISTORY_WIPEDOUTENEMYAMBUSH = 68,
HISTORY_UNSUCCESSFULATTACK = 69,
HISTORY_SUCCESSFULATTACK = 70,
HISTORY_CREATURESATTACKED = 71,
HISTORY_KILLEDBYBLOODCATS = 72,
HISTORY_SLAUGHTEREDBLOODCATS = 73,
HISTORY_NPC_KILLED = 74,
HISTORY_GAVE_CARMEN_HEAD = 75,
HISTORY_SLAY_MYSTERIOUSLY_LEFT = 76,
HISTORY_MERC_KILLED_CHARACTER = 77,
}
Profil =
{
MARIA = 88,
ANGEL = 89,
ELLIOT = 135,
CONRAD = 70,
CARMEN = 78,
MADLAB = 146,
ROBOT = 62,
}
local gsRobotGridNo
function HandleQuestCodeOnSectorEntry( sNewSectorX, sNewSectorY, bNewSectorZ )
if ( sNewSectorX == 6 and sNewSectorY == SectorY.MAP_ROW_C and gubQuest( Quests.QUEST_RESCUE_MARIA ) == qStatus.QUESTDONE ) then
-- make sure Maria and Angel are gone
SetCharacterSectorX(Profil.MARIA, 0)
SetCharacterSectorY(Profil.MARIA, 0)
SetCharacterSectorX(Profil.ANGEL, 0)
SetCharacterSectorY(Profil.ANGEL, 0)
end
if ( sNewSectorX == 5 and sNewSectorY == SectorY.MAP_ROW_D ) then
gubBoxerID( 0, NOBODY )
gubBoxerID( 1, NOBODY )
gubBoxerID( 2, NOBODY )
end
if ( sNewSectorX == 3 and sNewSectorY == SectorY.MAP_ROW_P ) then
-- heal up Elliot if he's been hurt
if ( CheckNPCLife (Profil.ELLIOT) < GetNPCLifeMax (Profil.ELLIOT) ) then
SetNPCLife (Profil.ELLIOT, GetNPCLifeMax(Profil.ELLIOT))
end
end
if ( CheckFact( Facts.FACT_ALL_TERRORISTS_KILLED, 0 ) == true ) then
SetCharacterSectorX(Profil.CARMEN, 0)
SetCharacterSectorY(Profil.CARMEN, 0)
SetCharacterSectorZ(Profil.CARMEN, 0)
end
--[[
if ( CheckFact( Facts.FACT_ROBOT_RECRUITED_AND_MOVED, 0 ) == false ) then
pRobot = FindSoldierByProfileID (Profil.ROBOT)
if (pRobot) then
-- robot is on our team and we have changed sectors, so we can
-- replace the robot-under-construction in Madlab's sector
--RemoveGraphicFromTempFile( gsRobotGridNo, SEVENTHISTRUCT1, GetCharacterSectorX(Profil.MADLAB), GetCharacterSectorY(Profil.MADLAB), GetCharacterSectorZ(Profil.MADLAB) )
SetFactTrue( Facts.FACT_ROBOT_RECRUITED_AND_MOVED )
end
end
]]
end
function HandleQuestCodeOnSectorExit( sOldSectorX, sOldSectorY, bOldSectorZ )
if ( sOldSectorX == KINGPIN_MONEY_SECTOR_X and sOldSectorY == KINGPIN_MONEY_SECTOR_Y and bOldSectorZ == KINGPIN_MONEY_SECTOR_Z ) then
CheckForKingpinsMoneyMissing( true )
end
if ( sOldSectorX == 13 and sOldSectorY == SectorY.MAP_ROW_H and bOldSectorZ == 0 and CheckFact( Facts.FACT_CONRAD_SHOULD_GO,0 ) == true) then
-- remove Conrad from the map
SetCharacterSectorX(Profil.CONRAD, 0)
SetCharacterSectorY(Profil.CONRAD, 0)
end
if ( sOldSectorX == HOSPITAL_SECTOR_X and sOldSectorY == HOSPITAL_SECTOR_Y and bOldSectorZ == HOSPITAL_SECTOR_Z ) then
CheckForMissingHospitalSupplies()
end
-- reset the state of the museum alarm for Eldin's quotes
SetFactFalse( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
end