function lootmoney(npc)
	if npc:character_community() ~= "monolith" then
		local actor = db.actor
		local money = npc:money()
		if money ~= nil and money > 0 then
			local deadmoney = money
			local npc_rank
			npc_rank = ranks.get_obj_rank_name(npc)
			if npc_rank ~= nil then
				if 	 npc_rank == "novice" and deadmoney >=400 then deadmoney=math.random(25,400)    
				elseif npc_rank == "experienced" and deadmoney >=500 then deadmoney=math.random(50,500)  
				elseif npc_rank == "veteran" and deadmoney >=600 then deadmoney=math.random(100,600) 
				elseif npc_rank == "master" and deadmoney >=700 then deadmoney=math.random(200,700)  
			  end
			end
			local news_caption = "Мёртвый сталкер: "..npc:character_name()
			local news_text = "Обнаружено денег: %c[255,255,0,0]"..game.translate_string(deadmoney).."%c[default] руб."
			--xr_sound.set_sound_play(actor:id(), "pda_news")
			actor:give_game_news(news_caption, news_text, "ui_iconsTotal_found_money", 0, 10000)
			actor:give_money(deadmoney)
			game_stats.money_quest_update(deadmoney) 
			npc:give_money(-money)
			game_stats.money_quest_update(-money)
		end
	end
end

function lootmoney_effect(npc,corpse_npc)
	if corpse_npc:character_community() ~= "monolith" then
		local num=corpse_npc:money() 
		if num and num >0 then 
			local deadmoney = num
			local gi_rank
			gi_rank = ranks.get_obj_rank_name(corpse_npc)
			if gi_rank ~= nil then
				if gi_rank == "novice" and deadmoney >=100 then deadmoney=math.random(25,100)    
				elseif gi_rank == "experienced" and deadmoney >=200 then deadmoney=math.random(50,200)  
				elseif gi_rank == "veteran" and deadmoney >=300 then deadmoney=math.random(100,300) 
				elseif gi_rank == "master" and deadmoney >=400 then deadmoney=math.random(200,400)  
				end
			end
			npc:give_money(deadmoney) 
			game_stats.money_quest_update(deadmoney) 
			corpse_npc:give_money(-num) 
			game_stats.money_quest_update(-num) 
		end
	end
end
