Good progress. FindValidPosition helped to fix it (thanks for the INOUT hint, Ameranth, I hadn't noticed that). For the updated script see below.

Changes:

- fixed two problems with characters not reacting in combat (related to unmovable items and unreachable targets)
- characters now attack ice walls if they block path
- characters now attack the closest enemy when their path is blocked and they don't find items (not yet tested)
- objects standing on other objects aren't regarded any more (doesn't work for all types of items other items can stand on)
- re-organized the script to communicate with any combat or peace related script: the 'PathBlockAI' script must be included (#INCLUDE) in 'DefaultCharacter', the INTERRUPT code must be added to every reaction with movement to activate the AI for it (for combat it should be added to reactions of 'DefaultCharacter' and '_SKILLFROMITEM_Base' at least)

Script:

Code
INIT

CHARACTER:__Me

EXTERN FLOAT3:%TargetPos = null
FLOAT3:%TempTarget
INT:%ItemMoveSuccess = 0

BEHAVIOUR

REACTION GetClose, 0
USAGE PEACE	
USAGE COMBAT
VARS
	FLOAT:_distance
	FLOAT:_MyX
	FLOAT:_MyZ
	FLOAT:_TargetX
	FLOAT:_TargetZ
	FLOAT:_AttemptCounter = 0
	FLOAT:_AddX
	FLOAT:_AddZ
	FLOAT:_Divisor
	FLOAT3:_Target
	FLOAT3:_MyPos
	FLOAT3:_TargetPosition
ACTIONS
	Sleep(1)
	Label("Again")
	IF "c1&c2"
		GetPosition(__Me,_MyPos)
		GetVar(_TargetPosition,__Me,"TargetPos")
	THEN
		Set(%TempTarget,_TargetPosition)
	ENDIF
	IF "c1&c2&c3&c4&c5"
		GetX(_MyPos,_MyX)
		GetZ(_MyPos,_MyZ)
		GetX(_TargetPosition,_TargetX)
		GetZ(_TargetPosition,_TargetZ)
		GetDistance(_distance,__Me,_TargetPosition)
	THEN
		Subtract(_TargetX,_MyX)
		Subtract(_TargetZ,_MyZ)
		GetRandom(_Divisor,1.8,1.9,2,2.1,2.2)
		Divide(_TargetX,_Divisor)
		Divide(_TargetZ,_Divisor)
		Add(_MyX,_TargetX)
		Add(_MyZ,_TargetZ)
		SetX(%TempTarget,_MyX)
		SetZ(%TempTarget,_MyZ)
		CharacterLookAt(%TempTarget)
		IF "c1"
			IsGreaterThen(_AttemptCounter,4)
		THEN
			Set(_AttemptCounter,0)
			SetPriority("MoveItems",0)
			IF "c1"
				IsInCombat(__Me)
			THEN
				CharacterEndTurn()
			ELSE
				DelayReaction("GetClose",10)
			ENDIF			
			SetPriority("GetClose",0)
		ELIF "c1"
			IsLessThen(_distance,4)
		THEN	
			CharacterLookAt(_TargetPosition)
			IF "c1"
				IsInCombat(__Me)
			THEN
				CharacterMoveTo(_TargetPosition,1,0,0,0.2,1)
			ELSE
				CharacterMoveTo(_TargetPosition,0,0,0,0.2,1)
			ENDIF
			SetPriority("GetClose",0)
		ELIF "!c1"
			IsLessThen(_distance,4)
		THEN			
			IF "!c1"
				FindValidPosition(%TempTarget,2.5,__Me) 
			THEN	
				Interrupt("GetClose")
			ENDIF
			IF "c1"
				IsInCombat(__Me)
			THEN
				CharacterMoveTo(%TempTarget,1,0,0,0.2,1.4)
			ELSE 
				CharacterMoveTo(%TempTarget,0,0,0,0.2,1.4) 
			ENDIF
			SetPriority("MoveItems",0)
		ELSE
			Set(_AttemptCounter,0)
			SetPriority("MoveItems",0)
			SetPriority("GetClose",0)
		ENDIF
	ENDIF
INTERRUPT
	Reset()
	ON
		OnMovementFailed(_)
		OnManualInterrupt("GetClose")
	ACTIONS
		Add(_AttemptCounter,1)
		SetPriority("MoveItems",3000)
		SetPriority("GetClose",0) 
		
REACTION MoveItems, 0
USAGE PEACE
USAGE COMBAT
VARS
	ITEM:_Item
	ITEM:_Item2
	ITEM:_IgnoreItem1
	ITEM:_IgnoreItem2
	ITEM:_IgnoreItem3
	FLOAT:_Weight
	FLOAT:_X
	FLOAT:_Z
	FLOAT:_MyPosX
	FLOAT:_MyPosZ
	FLOAT3:_MyPos
	CHARACTER:_Enemy
CHECK "(((c1&c2&c3&c4&((!c5&c6)|c7))|(c8&c9&c10&((!c11&c12)|c13)))&!c14&!(c15&c16))|(c17&c18)"
	ItemGet(_Item,__Me,6,Random,Distance,"")
	IsFacing(__Me,_Item)
	CanSee(__Me,_Item)
	ItemGetStat(_Weight,_Item,Weight)
	IsLessThen(_Weight,1000)
	IsLessThen(_Weight,40001)
	IsEqual(_Weight,200000) //Ice_Crystal
	ItemGet(_Item,%TempTarget,6,Random,Distance,"")
	IsFacing(__Me,_Item)
	ItemGetStat(_Weight,_Item,Weight)
	IsLessThen(_Weight,1000)
	IsLessThen(_Weight,40001)
	IsEqual(_Weight,200000) //Ice_Crystal
	ItemIsDestroyed(_Item)
	ItemGet(_Item2,_Item,2,Random,Distance,"")
	IsObjectOnObject(_Item,_Item2)
	IsInCombat(__Me)
	CharacterGet(_Enemy,__Me,5,Lowest,Distance,Enemy)
ACTIONS
	IF "!c1"
		IsEqual(_Enemy,null)
	THEN
		CharacterMoveTo(_Enemy,1)
		CharacterAttack(_Enemy)
		Goto("End")
	ENDIF
	IF "c1"
		IsInCombat(__Me)
	THEN
		CharacterMoveTo(_Item,1)
	ELSE
		CharacterMoveTo(_Item)
	ENDIF
	IF "c1"
		IsEqual(_Weight,200000) //Ice_Crystal
	THEN
		WHILE "!c1"
			ItemIsDestroyed(_Item)
		DO
			CharacterAttack(_Item)
		ENDWHILE
	ELSE
		GetPosition(__Me,_MyPos)
		IF "!c1&c2"
			ItemIsDestroyed(_Item)
			FindValidPosition(_MyPos,5,_Item)
		THEN
			StartTimer("CheckMoveItemSuccess",3,0)
			CharacterMoveItem(_Item,_MyPos)
			Set(%ItemMoveSuccess,1)			
		ENDIF
	ENDIF
	Label("End")
	Set(_Enemy,null)
	SetPriority("MoveItems",0)
INTERRUPT
	Reset()
	Set(_Enemy,null)
	SetPriority("MoveItems",0)
	
EVENTS

EVENT CheckItemMoveSuccess
ON
	OnTimer("CheckMoveItemSuccess")
ACTIONS
	IF "c1"
		IsEqual(%ItemMoveSuccess,1)
	THEN
		Set(%ItemMoveSuccess,0)
	ELSE
		Interrupt("MoveItems")
	ENDIF
	
EVENT GetCloseActivation
ON
	OnCharacterEvent(__Me,"ActivateGetClose")
ACTIONS
	SetPriority("GetClose",2000)

INTERRUPT code:

Code

 //to be added to every reaction with movement

VARS
	FLOAT3:_Pos

INTERRUPT
//Reset() //not necessary for functionality, but for most reactions recommended
ON
	OnMovementFailed(_Pos)
ACTIONS
	SetVar(__Me,"TargetPos",_Pos)
	CharacterEvent(__Me,"ActivateGetClose")


Some notes:

- sometimes characters won't act for a few seconds if they fail to find a solution; though they'll skip turn after a while (combat) or delay the reaction (peace)

- characters can't find path blocking items if they aren't facing the position (the closer to the target the more likely this happens); increasing the angle too much would make the script more unprecise

- it's still unclear under which conditions a failing movement doesn't cause an interruption; as long as this happens in the 'GetClose' reaction, it will just lead to a character skipping turn if he doesn't find another solution (or delaying the reaction); if it happens in any other peace or combat reaction this will lead to a character not acting at all (peace) or for a longer while (combat, assumed that the 'DelayReaction' call in the reactions of 'DefaultCharacter' or '_SKILLFROMITEM_Base' was removed - I always do that, since DelayReaction seems to be broken in combat, not counting seconds but eternities)

- characters still aren't super-intelligent, but they're definitely not helpless any more


My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan