mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- LUA Script Bugfix (by silversurfer)
o Added missing ProfileID parameter when calling the LUA method: CheckFact( fact, profileID ) git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1746 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -283,7 +283,7 @@ if ActionID == 23 then
|
|||||||
SetNoiseGridno(ubProfil,sGridNo)
|
SetNoiseGridno(ubProfil,sGridNo)
|
||||||
SetNoiseVolume(ubProfil,6)
|
SetNoiseVolume(ubProfil,6)
|
||||||
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
||||||
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then
|
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then
|
||||||
CancelAIAction( ubProfil)
|
CancelAIAction( ubProfil)
|
||||||
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
||||||
SetNextActionData(ubProfil , sGridNo)
|
SetNextActionData(ubProfil , sGridNo)
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ function HandleAtNewGridNo( ProfileId )
|
|||||||
|
|
||||||
-- Kingping expecting visit from player (Sector D5)
|
-- Kingping expecting visit from player (Sector D5)
|
||||||
-- The fact has to be TRUE. If FALSE then Kingpin attack the player.
|
-- The fact has to be TRUE. If FALSE then Kingpin attack the player.
|
||||||
if ( CheckFact( 98 ) == false ) then
|
if ( CheckFact( 98, ProfileId ) == false ) then
|
||||||
if ( NPCInRoomRange( ProfileId, 30, 39 ) == true and gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_D and gWorldSectorZ == 0 )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
|
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
|
||||||
@@ -317,7 +317,7 @@ function HandleAtNewGridNo( ProfileId )
|
|||||||
-- Drassen stuff for John & Mary
|
-- 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
|
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
|
if ( CheckFact( Facts.FACT_JOHN_ALIVE, 0 ) == true ) then
|
||||||
HandleJohnArrival( nil )
|
HandleJohnArrival( nil )
|
||||||
else
|
else
|
||||||
HandleMaryArrival( nil )
|
HandleMaryArrival( nil )
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ if ActionID == 23 then
|
|||||||
SetNoiseGridno(ubProfil,sGridNo)
|
SetNoiseGridno(ubProfil,sGridNo)
|
||||||
SetNoiseVolume(ubProfil,6)
|
SetNoiseVolume(ubProfil,6)
|
||||||
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
||||||
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then
|
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then
|
||||||
CancelAIAction( ubProfil)
|
CancelAIAction( ubProfil)
|
||||||
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
||||||
SetNextActionData(ubProfil , sGridNo)
|
SetNextActionData(ubProfil , sGridNo)
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ if ActionID == 23 then
|
|||||||
SetNoiseGridno(ubProfil,sGridNo)
|
SetNoiseGridno(ubProfil,sGridNo)
|
||||||
SetNoiseVolume(ubProfil,6)
|
SetNoiseVolume(ubProfil,6)
|
||||||
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
|
||||||
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then
|
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then
|
||||||
CancelAIAction( ubProfil)
|
CancelAIAction( ubProfil)
|
||||||
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
|
||||||
SetNextActionData(ubProfil , sGridNo)
|
SetNextActionData(ubProfil , sGridNo)
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ function HandleAtNewGridNo( ProfileId )
|
|||||||
|
|
||||||
-- Kingping expecting visit from player (Sector D5)
|
-- Kingping expecting visit from player (Sector D5)
|
||||||
-- The fact has to be TRUE. If FALSE then Kingpin attack the player.
|
-- The fact has to be TRUE. If FALSE then Kingpin attack the player.
|
||||||
if ( CheckFact( 98 ) == false ) then
|
if ( CheckFact( 98, ProfileId ) == false ) then
|
||||||
if ( NPCInRoomRange( ProfileId, 30, 39 ) == true and gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_D and gWorldSectorZ == 0 )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
|
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
|
||||||
@@ -317,7 +317,7 @@ function HandleAtNewGridNo( ProfileId )
|
|||||||
-- Drassen stuff for John & Mary
|
-- 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
|
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
|
if ( CheckFact( Facts.FACT_JOHN_ALIVE, 0 ) == true ) then
|
||||||
HandleJohnArrival( nil )
|
HandleJohnArrival( nil )
|
||||||
else
|
else
|
||||||
HandleMaryArrival( nil )
|
HandleMaryArrival( nil )
|
||||||
|
|||||||
Reference in New Issue
Block a user