- UB Improvements / Cleanup (by Jazz)

o Deleted old / unused files and added / updated new files
o Fixed problems with the icons of objects laid on the ground (wrong ja2set.dat)

git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1741 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
Wanne
2013-08-28 17:09:45 +00:00
parent 52b3ebcf75
commit f8e30a5360
80 changed files with 79144 additions and 28123 deletions
+32 -33
View File
@@ -1,5 +1,5 @@
--[[
http://www.legion.zone.zg.pl/doku.php/modowanie/ja/art_ja_m_22_lua
http://legion.itzg.pl/mzgb/pmwiki/pmwiki.php?n=JaggedAlliance2UBV1.Jav113lua
**********************
** Global variables **
@@ -286,33 +286,33 @@ Fincances =
ANONYMOUS_DEPOSIT = 1,
TRANSACTION_FEE = 2,
HIRED_MERC = 3,
BOBBYR_PURCHASE,
PAY_SPECK_FOR_MERC = 4,
MEDICAL_DEPOSIT = 5,
IMP_PROFILE = 6,
PURCHASED_INSURANCE = 7,
REDUCED_INSURANCE = 8,
EXTENDED_INSURANCE = 9,
CANCELLED_INSURANCE = 10,
INSURANCE_PAYOUT = 11,
EXTENDED_CONTRACT_BY_1_DAY = 12,
EXTENDED_CONTRACT_BY_1_WEEK = 13,
EXTENDED_CONTRACT_BY_2_WEEKS = 14,
DEPOSIT_FROM_GOLD_MINE = 15,
DEPOSIT_FROM_SILVER_MINE = 16,
PURCHASED_FLOWERS = 17,
FULL_MEDICAL_REFUND = 18,
PARTIAL_MEDICAL_REFUND = 19,
NO_MEDICAL_REFUND = 20,
PAYMENT_TO_NPC = 21,
TRANSFER_FUNDS_TO_MERC = 22,
TRANSFER_FUNDS_FROM_MERC = 23,
TRAIN_TOWN_MILITIA = 24,
PURCHASED_ITEM_FROM_DEALER = 25,
MERC_DEPOSITED_MONEY_TO_PLAYER_ACCOUNT = 26,
SOLD_ITEMS = 27,
FACILITY_OPERATIONS = 28,
MILITIA_UPKEEP = 29,
BOBBYR_PURCHASE = 4,
PAY_SPECK_FOR_MERC = 5,
MEDICAL_DEPOSIT = 6,
IMP_PROFILE = 7,
PURCHASED_INSURANCE = 8,
REDUCED_INSURANCE = 9,
EXTENDED_INSURANCE = 10,
CANCELLED_INSURANCE = 11,
INSURANCE_PAYOUT = 12,
EXTENDED_CONTRACT_BY_1_DAY = 13,
EXTENDED_CONTRACT_BY_1_WEEK = 14,
EXTENDED_CONTRACT_BY_2_WEEKS = 15,
DEPOSIT_FROM_GOLD_MINE = 16,
DEPOSIT_FROM_SILVER_MINE = 17,
PURCHASED_FLOWERS = 18,
FULL_MEDICAL_REFUND = 19,
PARTIAL_MEDICAL_REFUND = 20,
NO_MEDICAL_REFUND = 21,
PAYMENT_TO_NPC = 22,
TRANSFER_FUNDS_TO_MERC = 23,
TRANSFER_FUNDS_FROM_MERC = 24,
TRAIN_TOWN_MILITIA = 25,
PURCHASED_ITEM_FROM_DEALER = 26,
MERC_DEPOSITED_MONEY_TO_PLAYER_ACCOUNT = 27,
SOLD_ITEMS = 28,
FACILITY_OPERATIONS = 29,
MILITIA_UPKEEP = 30,
}
Sender =
@@ -877,16 +877,15 @@ function InitNewGame()
end
if ( difficultyLevel == DIF_LEVEL_EASY ) then
if ( newDIFFICULTY_LEVEL == DIF_LEVEL_EASY ) then
iStartingCash = GetStartingCashNovice()
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_MEDIUM ) then
iStartingCash = GetStartingCashExperienced()
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_HARD ) then
iStartingCash = GetStartingCashExpert()
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
elseif ( newDIFFICULTY_LEVEL == DIF_LEVEL_INSANE ) then
iStartingCash = GetStartingCashInsane()
end
AddTransactionToPlayersBook( Fincances.ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), iStartingCash )
end
+12 -13
View File
@@ -1,4 +1,5 @@
Facts = {
Facts =
{
FACT_BROTHEL_OPEN = 251,
FACT_MUSEUM_OPEN = 250,
FACT_CLUB_OPEN = 252,
@@ -17,45 +18,43 @@ function HourlyQuestUpdate()
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
end
-- bar/nightclub
-- Bar/night club
if ( cHour > 15 or cHour < 2) then
SetFactTrue( Facts.FACT_CLUB_OPEN )
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
-- reset boxes fought
-- Reset boxes fought
for i = 0,3 do
-- set false
-- Set false
gfBoxerFought(i,false)
end
-- if # of boxing matches the player has won is a multiple of
-- If # of boxing matches the player has won is a multiple of
-- 3, and the boxers haven't rested, then make them rest
if ( gfBoxersResting == true ) then
-- done resting now!
-- Done resting now!
gfBoxersResting = false
gubBoxersRests = gubBoxersRests + 1
p = gubBoxingMatchesWon / 3
elseif ( p > gubBoxersRests ) then
-- time for the boxers to rest!
-- Time for the boxers to rest!
gfBoxersResting = true
end
else
SetFactFalse( Facts.FACT_CLUB_OPEN )
end
-- museum
if ( cHour >= 9 or cHour < 18 ) then
-- Museum
if ( cHour >= 9 or cHour < 18 ) then
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
else
else
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
end
end
]]
end
+24 -24
View File
@@ -43,30 +43,30 @@ QUESTDONE = 2,
Quests =
{
-- Quests ID -- BinaryData\QUESTS25.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
-- Quests ID -- BinaryData\QUESTS.EDT Record
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
-- UB Quests
QUEST_DESTROY_MISSLES = 23, -- Start quest 46, End quest 47
QUEST_FIX_LAPTOP = 24, -- Start quest 48, End quest 49
+50 -60
View File
@@ -29,30 +29,30 @@ Attitude =
Quests =
{
-- Quests ID -- BinaryData\QUESTS25.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
-- Quests ID -- BinaryData\QUESTS.EDT Record
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
-- UB Quests
QUEST_DESTROY_MISSLES = 23, -- Start quest 46, End quest 47
QUEST_FIX_LAPTOP = 24, -- Start quest 48, End quest 49
@@ -243,6 +243,28 @@ function HandleAtNewGridNo( ProfileId )
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
@@ -250,10 +272,10 @@ 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
-- Marie & John
elseif ( ( CheckNPCSectorBool( Profil.MARY, 13, SectorY.MAP_ROW_B, 0 ) == true ) or ( CheckNPCSectorBool( Profil.JOHN, 13, SectorY.MAP_ROW_B, 0 ) == true
-- 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
@@ -279,7 +301,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 )
@@ -300,36 +322,4 @@ function HandleAtNewGridNo( ProfileId )
end -- End what EPC
end -- End team
]]
end
function HandlePlayerTeamMemberDeath( ProfileId )
local cnt
local iLoop
local pTeamSoldier
-- JA2 Remove
--[[
-- handle stuff for Carmen if Slay is killed
if ( ProfileId == Profil.SLAY ) then
pTeamSoldier = FindSoldierByProfileID( Profil.CARMEN )
if ( CheckSoldierAttitude ( pTeamSoldier ) == Attitude.ATTACKSLAYONLY and not TileIsOutOfBounds(ClosestPC( pTeamSoldier, nil )) ) then
-- Carmen now becomes friendly again
TriggerNPCRecord( Profil.CARMEN, 29 )
end
elseif ( ProfileId == Profil.ROBOT ) then
if ( CheckFact( Facts.FACT_FIRST_ROBOT_DESTROYED,0 ) == false ) then
SetFactTrue( Facts.FACT_FIRST_ROBOT_DESTROYED )
SetFactFalse( Facts.FACT_ROBOT_READY )
else
SetFactTrue( Facts.FACT_SECOND_ROBOT_DESTROYED )
end
end
]]
end
+3 -1
View File
@@ -6,7 +6,7 @@ Remember! Not to use function EndQuest(QuestID, x, y) and StartQuest(QuestID, x,
nQuests =
{
-- Quests ID -- BinaryData\QUESTS25.EDT Record
-- 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
@@ -141,6 +141,8 @@ function InternalEndQuest( ubQuest, sSectorX, sSectorY, fUpdateHistory )
GiveQuestRewardPoint( sSectorX, sSectorY, 9, NO_PROFILE )
end
elseif ( ubQuest == nQuests.QUEST_KILL_DEIDRANNA ) then
GiveQuestRewardPoint( sSectorX, sSectorY, 25, NO_PROFILE )
elseif ( ubQuest == nQuests.QUEST_ESCORT_SHANK ) then
GiveQuestRewardPoint( sSectorX, sSectorY, 5, NO_PROFILE )
else
@@ -372,30 +372,30 @@ qStatus =
Quests =
{
-- Quests ID -- BinaryData\QUESTS25.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
-- Quests ID -- BinaryData\QUESTS.EDT Record
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
-- UB Quests
QUEST_DESTROY_MISSLES = 23, -- Start quest 46, End quest 47
QUEST_FIX_LAPTOP = 24, -- Start quest 48, End quest 49
@@ -404,6 +404,7 @@ Quests =
-- max Quests 254
}
ProfileType =
{
None = 0,
@@ -1,17 +1,21 @@
--[[
http://www.legion.zone.zg.pl/doku.php/modowanie/ja/art_ja_m_22_lua
http://legion.itzg.pl/mzgb/pmwiki/pmwiki.php?n=JaggedAlliance2UBV1.Jav113lua
Global :
**********************
** Global variables **
**********************
- giLairID
1 = Drassen
2 = Cambria
3 = Alma
4 = Grumm
1 - Drassen
2 - Cambria
3 - Alma
4 - Grumm
Function :
***************
** Functions **
***************
- SectorEnemyControlled ( IDSector )
check if enemy controls sector
@@ -38,7 +42,10 @@
- SetTownLoyalty ( idTown, idLoyalty )
set town loyalty
Example :
**************
** Examples **
**************
if SectorEnemyControlled ( SECTOR(4,13) ) == false then
-- instructions
@@ -74,22 +81,22 @@
-- 30 = 30%
SetTownLoyalty ( 1, 30 )
EventGlobal = {
EventGlobal =
{
GLOBAL_LOYALTY_BATTLE_WON = 0,
.
.
MY_GLOBAL_LOYALTY_13 = 13,
MY_GLOBAL_LOYALTY_14 = 14,
.
.
.
. .
MY_GLOBAL_LOYALTY_100 = 100,
}
]]
Profil = {
Profil =
{
MIGUEL = 57,
DOREEN = 139,
MARTHA = 109,
@@ -100,8 +107,8 @@ Profil = {
JOEY = 90,
}
Town = {
Town =
{
OMERTA = 1,
DRASSEN = 2,
ALMA = 3,
@@ -137,10 +144,11 @@ local LOYALTY_BONUS_FOR_SERGEANT_KROTT = (20 * GAIN_PTS_PER_LOYALTY_PT) -- Alma'
local LOYALTY_BONUS_TERRORISTS_DEALT_WITH = ( 5 * GAIN_PTS_PER_LOYALTY_PT)
local LOYALTY_BONUS_KILL_QUEEN_MONSTER = (10 * GAIN_PTS_PER_LOYALTY_PT)
-- Anywhere
-- loyalty bonus for completing town training
-- Loyalty bonus for completing town training
local LOYALTY_BONUS_FOR_TOWN_TRAINING = ( 2 * GAIN_PTS_PER_LOYALTY_PT ) -- 2% (Town Militia.cpp i Map Screen Interface Map.cpp)
EventGlobal = {
EventGlobal =
{
-- There are only for distance-adjusted global loyalty effects. Others go into list above instead!
GLOBAL_LOYALTY_BATTLE_WON = 0,
GLOBAL_LOYALTY_BATTLE_LOST = 1,
@@ -148,14 +156,14 @@ EventGlobal = {
GLOBAL_LOYALTY_NATIVE_KILLED = 3,
GLOBAL_LOYALTY_GAIN_TOWN_SECTOR = 4,
GLOBAL_LOYALTY_LOSE_TOWN_SECTOR = 5,
GLOBAL_LOYALTY_LIBERATE_WHOLE_TOWN = 6, -- awarded only the first time it happens
GLOBAL_LOYALTY_LIBERATE_WHOLE_TOWN = 6,
GLOBAL_LOYALTY_ABANDON_MILITIA = 7,
GLOBAL_LOYALTY_GAIN_MINE = 8,
GLOBAL_LOYALTY_LOSE_MINE = 9,
GLOBAL_LOYALTY_GAIN_SAM = 10,
GLOBAL_LOYALTY_LOSE_SAM = 11,
GLOBAL_LOYALTY_QUEEN_BATTLE_WON = 12,
GLOBAL_LOYALTY_GRIZZLY_DEAD = 13,
GLOBAL_LOYALTY_UNUSED = 13,
GLOBAL_LOYALTY_PRISONERS_TORTURED = 14,
}
@@ -164,7 +172,7 @@ function CheckConditionsForTriggeringCreatureQuest( sSectorX, sSectorY, bSectorZ
local ubValidMines = 0
if ( gameStyle == 0 or enableCrepitus == 0 ) then
if ( newGAME_STYLE == 0 or iniENABLE_CREPITUS == 0 ) then
return -- No scifi, no creatures...
end
@@ -201,7 +209,7 @@ end
function HandleGlobalLoyaltyEvent( ubEventType, sSectorX, sSectorY, bSectorZ )
local iLoyaltyChange = 0
local iLoyaltyChange = 0
if ubEventType == EventGlobal.GLOBAL_LOYALTY_BATTLE_WON then
@@ -229,14 +237,14 @@ local iLoyaltyChange = 0
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_NATIVE_KILLED then
-- note that there is special code (much more severe) for murdering civilians in the currently loaded sector.
-- this event is intended more for processing militia casualties, and the like
-- Note that there is special code (much more severe) for murdering civilians in the currently loaded sector.
-- This event is intended more for processing militia casualties, and the like
iLoyaltyChange = -50
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_ABANDON_MILITIA then
-- it doesn't matter how many of them are being abandoned
-- It doesn't matter how many of them are being abandoned
iLoyaltyChange = -750
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
@@ -274,13 +282,6 @@ local iLoyaltyChange = 0
iLoyaltyChange = -250
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_GRIZZLY_DEAD then
if ( CheckMercIsDead(3) == false ) then
iLoyaltyChange = 1000
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
end
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_PRISONERS_TORTURED then
iLoyaltyChange = -60
@@ -297,12 +298,12 @@ function HandleLoyaltyChangeForNPCAction( ubNPCProfileId )
IncrementTownLoyalty ( Town.OMERTA, LOYALTY_BONUS_MIGUEL_READS_LETTER )
end
-- having freed the child labourers... she is releasing them herself!
-- Having freed the child labourers... she is releasing them herself!
if ubNPCProfileId == Profil.DOREEN then
IncrementTownLoyalty( Town.DRASSEN, LOYALTY_BONUS_CHILDREN_FREED_DOREEN_SPARED )
end
-- if Joey is still alive
-- If Joey is still alive
if ubNPCProfileId == Profil.MARTHA then
if ( CheckMercIsDead(Profil.JOEY) == false ) then
IncrementTownLoyalty( Town.CAMBRIA, LOYALTY_BONUS_MARTHA_WHEN_JOEY_RESCUED )
+44 -29
View File
@@ -1,7 +1,8 @@
--[[
Global:
guiNumWorldItems
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.
]]
@@ -33,37 +34,37 @@ EventTypes = {
}
qStatus = {
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests =
{
-- Quests ID -- BinaryData\QUESTS25.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
-- Quests ID -- BinaryData\QUESTS.EDT Record
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
-- UB Quests
QUEST_DESTROY_MISSLES = 23, -- Start quest 46, End quest 47
QUEST_FIX_LAPTOP = 24, -- Start quest 48, End quest 49
@@ -88,6 +89,8 @@ 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,
@@ -169,6 +172,18 @@ History = {
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 )
end