;Barrier Rune Tile

RuneItem = 255

If HasItem(#USERID,RuneItem) = 0
	PlusX = 0
	PlusY = 0
	
	If GetUserDirection(#USERID) = #DIR_UP
		PlusY = 1
	ElseIf GetUserDirection(#USERID) = #DIR_DOWN
		PlusY = -1
	ElseIf GetUserDirection(#USERID) = #DIR_LEFT
		PlusX = 1
	ElseIf GetUserDirection(#USERID) = #DIR_RIGHT
		PlusX = -1
	EndIf
	
	WarpUser(#USERID,#MAPID,#XPOS+PlusX,#YPOS+PlusY)
	SendMessageToUser(#USERID,"You are repelled by an unknown force.",#MSG_SERVER)
EndIf

Continue = 1