;'Blood Fiend' monster death script

SendMessageToAll(GetUserName(#USERID)+" defeated the Blood Fiend!",#MSG_CRITICAL)
GiveItem(#USERID,396)

UserID = GetNextMapUser(0,#MAPID)
While UserID > 0
	Item1 = 0
	Item2 = 0
	
	Rand = Random(0,7)
	If Rand = 0
		Item1 = 530
	ElseIf Rand = 1
		Item1 = 444
	ElseIf Rand = 2
		Item1 = 381
	ElseIf Rand = 3
		Item1 = 391
	ElseIf Rand = 4
		Item1 = 377
	ElseIf Rand = 5
		Item1 = 442
	ElseIf Rand = 6
		Item1 = 438
	ElseIf Rand = 7
		Item1 = 435
	EndIf
	Rand=Rand+1
	If Rand > 3
		Rand = 0
	EndIf
	If Rand = 0
		Item2 = 530
	ElseIf Rand = 1
		Item2 = 444
	ElseIf Rand = 2
		Item2 = 381
	ElseIf Rand = 3
		Item2 = 391
	ElseIf Rand = 4
		Item1 = 377
	ElseIf Rand = 5
		Item1 = 442
	ElseIf Rand = 6
		Item1 = 438
	ElseIf Rand = 7
		Item1 = 435
	EndIf
	
	If IsInvFull(UserID) = 1
		SpawnItem(#MAPID,Item1,GetUserX(UserID),GetUserY(UserID))
		SpawnItem(#MAPID,Item2,GetUserX(UserID),GetUserY(UserID))
	Else
		GiveItem(UserID,Item1)
		GiveItem(UserID,Item2)
	EndIF
	UserID = GetNextMapUser(UserID,#MAPID)
Wend

SendMessageToMap(#MAPID,"Items have been added to your inventory.",#MSG_SERVER)

Continue = 1