Okay, try this

IF
CharacterLeftTrigger(CHARACTER_Player,TRIGGER_CellFloor)
THEN
ItemAddedToCharacter(ITEM_Cup,CHARACTER_Guard)

IF
CharacterSawCharacter(CHARACTER_Guard,CHARACTER_Player)
AND
ItemIsInCharacterInventory(ITEM_Cup,CHARACTER_Guard,1)
THEN
DialogStartTwoSpeakerDialog("JailBreakChat",CHARACTER_Guard,CHARACTER_Player);


ITEM_Cup can be anything obviously. I also don't imagine it need to involve the Guard. You could have a hidden NPC and item placed off-screen whose only purpose in the game is for this check.


Escape From Smalcatraz: Steam/Nexus. Forum thread.