function lootmoney(npc)
--if monnoroch_options.mone == 0 then return end
	if npc then
		local money = npc:money()

		if money ~= nil and money ~=0 then
			local deadmoney = money

			if monnoroch_options.money_real == 1 then
                local npc_rank
				npc_rank = ranks.get_obj_rank_name(npc)

				if npc_rank ~= nil then
					if npc_rank == "novice" and deadmoney >=150 then deadmoney=math.random(100,150)    
					elseif npc_rank == "experienced" and deadmoney >=300 then deadmoney=math.random(200,300)  
					elseif npc_rank == "veteran" and deadmoney >=450 then deadmoney=math.random(380,450) 
					elseif npc_rank == "master" and deadmoney >=600 then deadmoney=math.random(500,600)  
                    end
				end
			end

			local news_texti = "\\n%c[255,255,0,0]"..translate("sms_info_dead_stalker")..": %c[default]"..npc:character_name().."\\n%c[255,255,0,0]"..translate("sms_info_money_found")..": %c[default]"..tostring(deadmoney)..translate("ui_st_money_regional")
			db.actor:give_game_news(news_texti, "ui\\ui_iconsTotal", Frect():set(0,0,83,47), 1, 4000)
			db.actor:give_money(deadmoney)
			game_stats.money_quest_update(deadmoney) 
			npc:give_money(-money)
			archievements.acv_count_event("acv_mar", 50000, "acv_mar", deadmoney)
		end
	end
end