# Thieves' guild: the riddlemouth is answered with "Silk" without getting the password from Aman
# (global variable 12 not set). Works in both versions, but the result differs:
# - ORIGINAL: Karsten appears, throws a fireball (25 damage on all), but the wall still opens and
#   265:4 is disabled. "Enter the thieves' guild" is completed although Aman never asked (completion
#   triggers also fire for inactive steps) and "Pass the test" becomes active.
# - ADVANCED: the chain stops after the fireball, the wall stays closed, 265:4 stays enabled and both
#   steps stay inactive.
# The checks are written for the ORIGINAL game; with --version 5 expect 265:4 = 0 and Inactive.
# Afterwards the reward chest 36 completes the test, and giving the brooch to Aman later must not
# change the completed steps.
waitidle 20000
dismissall
cheat give 138 10
# the fireball does 25 damage to everybody, the level 1 hero might not survive it
cheat level 20
talkwait
dismissall
cheat light 3
var 12 0
goto 265 15 13
talkwait
trigger 15 14 Eye
answer 7
talkwait 20000
dismissall
eventbit 265 4 1
quest ThiefGuild_Enter Completed
quest ThiefGuild_PassTheTest Active
quest Graveyard_FindTheGardener Inactive
# --- the reward chest 36 (265, 7,5)
goto 265 7 5
talkwait
trigger 7 5 Eye
talkwait
usekey 138
talkwait
takeloot
closewindow
talkwait
quest ThiefGuild_PassTheTest Completed
reloadquests
log after reload
quests
quest ThiefGuild_Enter Completed
quest ThiefGuild_PassTheTest Completed
exit
