;"Gate" area to lava maps is locked with illusions,
;this script checks if the user has a Path Forger item
;and warps them if they do. (Map 329)

;In the Mine Networks part of the cave is hidden, and needs
;a Path Forger item to get to.

;In the Dark Woods, you need the Path Forger to clear
;a pathto a hidden area.

;In the Blood Fever Maze, to get to a secret item merchant,
;you need a path forger, otherwise he won't appear.

;In the Lava Pools/Mountain Pass map, you need a Path Forger
;to go to the Lava Pools

;In the Mist Valley, you need a Path Forger to clear away some
;fallen trees to visit a NPC who gives a quest.

UserID = #USERID

;Mine Networks - Death Skull area
If #MAPID = 442
	If HasItem(UserID,32) = 1
   		WarpUser(UserID,443,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf

;Dark Woods - Secret Clearing
If #MAPID = 519
	If HasItem(UserID,32) = 1
		SendMessageToUser(#USERID,"You clear a path through the woods.",#MSG_EMOTE)
   		WarpUser(UserID,517,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf

;Oisvo Deeps entrance
If #MAPID = 329
	If HasItem(UserID,32) = 1
   		WarpUser(UserID,328,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf

;Blood Fever Maze - Master Skeleton area
If #MAPID = 467
	If HasItem(UserID,32) = 1
   		WarpUser(UserID,468,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf

;Mountain Pass/Blood Pool passage map
If #MAPID = 87
	If HasItem(UserID,32) = 1
   		WarpUser(UserID,89,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf

;Mist Valley fallen tree map
If #MAPID = 1448
	If HasItem(UserID,32) = 1
   		WarpUser(UserID,1447,#XPOS,#YPOS)
   		Continue = 0
	Endif
EndIf


;The path forger can break
If Random(0,5) = 0
	If HasItem(UserID,32) = 1
		TakeItem(UserID,32)
		SendMessageToUser(UserID,"Your Path Forger has shattered!",#MSG_CRITICAL)
	EndIf
EndIf

Continue = 1