# Lyramion's Faith edge case: the amber is found but grandfather dies before it is shown to him
# (original game and Advanced, any language). Start: --load 0
# The cave-in is removed with the pick-axe (Grandfather quest, var 11): grandfather (char 1 of map 258) is hidden,
# so the amber can never be shown. Then the amber is used at Shandra's coffin.
# Expected: "Bring Shandra's stone to grandfather" is completed when grandfather died while the amber is owned,
#   "Use Shandra's stone" becomes active and is completed at the coffin.
# The pick-axe (142) belongs to the Grandfather/Tolimar quest -> cheat.
waitidle 20000
dismissall
cheat light 3
cheat godmode 1
cheat give 138 10
quest LyramionsFaith_TalkToShandraInNewlake Inactive
# --- grandfather (NPC 1) tells the story and teaches "Wine"
talk 1
talkwait
say 0
talkwait
leave
talkwait
waitidle 5000
quest LyramionsFaith_TalkToShandraInNewlake Active
quest LyramionsFaith_EnterTheTempleOfBrotherhood Inactive
quest LyramionsFaith_BringShandrasStoneToGrandfather Inactive
quest LyramionsFaith_UseShandrasStone Inactive
# --- Shandra's amber in the old cave (map 260, treasure 24 at 26,7). Stand east of it (26,8 is the cave-in text).
goto 260 27 7
trigger 26 7 Eye
talkwait
takeloot
count 209 1
closewindow
talkwait
quest LyramionsFaith_BringShandrasStoneToGrandfather Active
quest LyramionsFaith_UseShandrasStone Inactive
quest LyramionsFaith_TalkToShandraInNewlake Active
# --- remove the cave-in, grandfather dies
cheat give 142 1
goto 260 26 10
trigger 26 10 item:142
talkwait
dismissall
var 11 1
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
quest LyramionsFaith_UseShandrasStone Active
# --- Newlake crypt door (door 28, vault key 400 from Baron Karsten for the picture -> other quest)
cheat give 400 1
goto 425 29 6
trigger 29 5 Eye
talkwait
usekey 400
talkwait
dismissall
# the stairs at 29,4 lead into the crypt (map 428, 15,14)
goto 425 29 4
wait 2000
dismissall
cheat light 3
# --- Shandra's coffin without having shown the amber
goto 428 4 5
trigger 4 5 item:209
talkwait
takeloot
count 366 1
closewindow
talkwait
dismissall
var 193 1
eventbit 428 7 1
quest LyramionsFaith_TalkToShandraInNewlake Completed
quest LyramionsFaith_EnterTheTempleOfBrotherhood Blocked
quest LyramionsFaith_UseShandrasStone Completed
quest LyramionsFaith_EnterSecretRoomInLibrary Active
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
reloadquests
quest LyramionsFaith_UseShandrasStone Completed
quest LyramionsFaith_EnterSecretRoomInLibrary Active
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
exit
