;Oisvo Deep "Deep key" script
;This script guards the Deep Key
;Also this script acts as a trigger to open a door

If #MAPID = 368
	i = 7
	While i < 16
		DamageMonster(367,i,9999)
		i = i + 1
	Wend
	OpenDoor(368, 8, 4)
	GoTo END
ElseIf #MAPID = 367
	GoTo SPAWNKEY
Else
	GoTo END
EndIf

Label SPAWNKEY

DeepKey = 93
FireSprite = 29

If HasItem(#USERID, DeepKey) = 1
	GoTo END
EndIf
SpawnMonster(367, FireSprite, 2, 9)
SpawnMonster(367, FireSprite, 3, 9)
SpawnMonster(367, FireSprite, 4, 9)
SpawnMonster(367, FireSprite, 4, 7)
SendMessageToMap(#MAPID,"Firesprites appear out of the air and attack!",#MSG_CRITICAL)

SpawnItem(367, DeepKey, 3, 8)

i = 7
While i < 16
	SetMonsterTarget(367,i,#USERID)
	i = i + 1
Wend

Label END

Continue = 1