# Lyramion's Faith edge case: skip grandfather, use the amber at Shandra's coffin directly, show it later
# (original game and Advanced, any language). Start: --load 0
# Expected: after the coffin TalkToShandra, BringShandrasStoneToGrandfather and UseShandrasStone are completed,
#   the library step is active. Showing the amber to grandfather afterwards changes nothing.
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
# --- 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
goto 428 4 5
trigger 4 5 item:209
talkwait
takeloot
count 366 1
closewindow
talkwait
dismissall
quest LyramionsFaith_TalkToShandraInNewlake Completed
quest LyramionsFaith_EnterTheTempleOfBrotherhood Blocked
quest LyramionsFaith_UseShandrasStone Completed
quest LyramionsFaith_EnterSecretRoomInLibrary Active
# using the amber at the coffin completes the step, showing it to grandfather later changes nothing
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
# --- show the amber to grandfather (custom global var 8189)
cheat teleport 258 3 15
wait 2000
dismissall
talk 1
talkwait
showitem 209
talkwait
leave
talkwait
waitidle 5000
var 8189 1
count 209 1
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
quest LyramionsFaith_UseShandrasStone Completed
quest LyramionsFaith_EnterSecretRoomInLibrary Active
reloadquests
quest LyramionsFaith_BringShandrasStoneToGrandfather Completed
quest LyramionsFaith_UseShandrasStone Completed
quest LyramionsFaith_EnterSecretRoomInLibrary Active
exit
