Regulamin forum
Dział "Tworzenie Modyfikacji" służy do zadawania pytań odnośnie tworzenia modyfikacji, edytowania plików gry, oraz pisania tzw. tutoriali, czyli poradników odnośnie modyfikowania gry. Nie zadajemy tutaj pytań odnośnie modyfikacji gotowych (nie dyskutujemy o nich!), prócz prób ich połączenia etc.
Przy cytowaniu plików *.LTX stosować tag [SYNTAX="ini"], przy cytowaniu plików *.script [SYNTAX="lua"] a przy cytowaniu plików *.xml - [SYNTAX="xml"].
Jako że jestem w tym temacie totalnym Nobem zwracam się z prośbą o pomoc do was bracia Stalkerzy.
Sprawa jest prosta nie znam angielskiego zbyt dobrze (Tak są takie osoby ). A w niektórych modach co jest mocno wkurzające bron i pancerze masakrycznie szybko się psuje, zaś ceny jej naprawy są horrendalne. Prosił bym was o podanie sposobu na takie zmodyfikowanie plików w Katalogu Gamedata/Config/Weapons aby bronię podczas używania się nie psuły co znacznie ułatwiło by rozgrywkę. Spotkałem się gdzieś w opisie jednego z modów z tym ale skleroza nie boli i zapomniałem sobie zapisać a szukanie w 9 stronach z modami tego jest delikatnie mówiąc Syzyfową pracą w dodatku nie pamiętam w jakim modzie się z tym spotkałem.
PS. W której części pliku Gamedata znajdują się pliki odpowiadające pancerzom???
Dodatkowo chciał bym się dowiedzieć czy istnieje taka możliwość zmiany pliku z exo_szkieletami tak by można było w nich swobodnie biegać?? Tak jak w stalker_light_exo???
Mam problem zmodyfikowałem jeden skrypt tak że broń trzymana przez NPC powinna być w 100% sprawna niestety nie wszystka jest zdarzają się egzemplarze sprawne w 0% jeżeli strzelimy z tego zniszczonego wybucha nam w rękach, może mi któryś z modderów pomóc .
local n local id, value for k,v in pairs(data_by_community.communities) do --' Íĺîáőîäčěî çŕďîëíčňü ňŕáëčöó item_by_community[k] = {} if iniLineSectionExist(k, iniFileName) then n = iniLinesCount(k, iniFileName) id, value = "", "" for i=0,n-1 do result, id, value = getIniLine(k,i,"","", iniFileName) --item_by_community[v][id] = 1000 * tonumber(value) if tonumber(value) >= 0.4 then value = 0.2 end item_by_community[k][id] = 1000 * tonumber(value) end end end
--' Çŕďîëí˙ĺě ňŕáëčöó çŕâčńčěîńňĺé local n = iniLinesCount("item_dependence", iniFileName) local id, value = "", "" local vvv for i=0,n-1 do result, id, value = getIniLine("item_dependence",i,"","", iniFileName) item_dependence[id] = {} vvv = parse_names(value) for k,v in pairs(vvv) do item_dependence[id][v] = true end end
--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙ local level_name = level.name()
if not iniLineSectionExist(level_name, iniFileName) then level_name = "default" end
n = iniLinesCount(level_name, iniFileName) id, value = "", "" for i=0,n-1 do result, id, value = getIniLine(level_name,i,"","", iniFileName) mul_by_level[id] = tonumber(value) end
local item_count_section = "item_count_" .. level.get_game_difficulty() local n = iniLinesCount(item_count_section, iniFileName) local t local count_min, count_max for i=0,n-1 do result, id, value = getIniLine(item_count_section,i,"","", iniFileName) --' Íóćíî đŕńďŕđńčňü value â äâŕ çíŕ÷ĺíč˙ t = parse_nums(value) if t[1] == nil then abort("Error on [death_ini] declaration. Section [%s], line [%s]", item_count_section, tostring(id)) end count_min = t[1] count_max = t[2] if count_max == nil then count_max = count_min end
if mul_by_level[id] == nil then mul_by_level[id] = 0 end
count_by_level[id] = {min = count_min, max = count_max} end
--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ) local n = iniLinesCount("keep_items", iniFileName) for i=0,n-1 do result, id, value = getIniLine("keep_items",i,"","", iniFileName) if value == "true" then always_keep_item[id] = true end end
--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě. ammo_sections = {} local n = iniLinesCount("ammo_sections", iniFileName) id, value = "", "" for i=0,n-1 do result, id, value = getIniLine("ammo_sections",i,"","", iniFileName) ammo_sections[id] = true end end
class "drop_manager" function drop_manager:__init(npc) self.npc = npc end
function drop_manager:create_release_item() if self.npc == nil then return end --' Ńďđŕřčâŕĺě ó ńĺđâĺđíîăî îáúĺęňŕ ăĺíĺđčëčńü ëč ďđĺäěĺňű local se_obj = alife():object(self.npc:id()) if (se_obj == nil) then return end if se_obj.death_droped == true then return end se_obj.death_droped = true
local data = data_by_community.communities[self.npc:character_community()] if not data then data = data_by_community.default end local cond = data.condition
local item_in_slot = self.npc:item_in_slot(1) if item_in_slot then item_in_slot:unload_magazine() item_in_slot:set_condition(math_random(cond.min, cond.max)/100) end item_in_slot = self.npc:item_in_slot(2) if item_in_slot then item_in_slot:unload_magazine() item_in_slot:set_condition(math_random(cond.min, cond.max)/100) end --' Ďđîâĺđęŕ íŕ îňńóňńňâčĺ ńďŕóíŕ ëóňŕ local ini = self.npc:spawn_ini() if ini and ini:section_exist("dont_spawn_loot") then return end
--' Äîńďŕâíčâŕĺě íĺîáőîäčěîĺ ęîëč÷ĺńňâî čňĺěîâ: --' Íĺîáőîäčěî ńîńňŕâčňü ńďčńîę îáúĺęňîâ ęîňîđűĺ ěîăóň áűňü çŕńďŕâíĺíű äë˙ ďĺđńîíŕćŕ local spawn_items = item_by_community[self.npc:character_community()] if spawn_items then local number for k,v in pairs(spawn_items) do --' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü çŕâčńčěîńňč if check_item_dependence(self.npc, k) == true then --' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü ęîëč÷ĺńňâî number = math_ceil(math_random(count_by_level[k].min, count_by_level[k].max)) --' Íĺîáőîäčěî çŕńďŕâíčňü íóćíîĺ ęîëč÷ĺńňâî. create_items(self.npc, k, number, v) end end end
local vis local otf local sect --local npc_name = self.npc:name() local npc_name = protected_items.get_obj_name(self.npc) if not string_find(self.npc:section(), "arena") and self.npc:character_community() ~= "arena_enemy" and npc_name ~= "yan_specnaz_dead" and npc_name ~= "x16_stalker_ghost" then local t = amk.read_stalker_params(se_obj) if t then vis = t.visual vis = amk.str_explode("\\",vis) vis = vis[3] end end
--local finish = false if vis then sect = visuals[vis] if not sect then for k,v in pairs(sect_by_visual_part) do if string_find(vis, k) then if v.sect then sect = v.sect break elseif v.npc_names then -- v.npc_names sect = v.npc_names[npc_name] --[[for name,outf in pairs(v.npc_names) do if name == npc_name then sect = outf finish = true break end end]] --if finish then if sect then break end end end end end
if sect then otf = create_items(self.npc, sect, 1, data.probability_outfit * 10) if otf then amk.start_timer("outfit_cond",1,{otf.id, math_random(cond.min, cond.max)}) end end end
--[[for k, v in pairs(names_info) do if string_find(npc_name, k) then db.actor:give_info_portion(v) break end end]] if names_info[npc_name] then if db.actor:dont_has_info(names_info[npc_name]) then db.actor:give_info_portion(names_info[npc_name]) end end end
--' Ôóíęöč˙ âűçűâŕĺňń˙ äë˙ ęŕćäîăî ďđĺäěĺňŕ, ĺńëč âĺđíĺň false ňî ďđĺäěĺň óäŕëčňń˙. -- Đŕçâĺ ? Óäŕëĺíčĺ ďđîčńőîäčň ďđ˙ěî âíóňđč ôóíęöčč, ŕ âíĺříĺěó čňĺđŕňîđó íŕďëĺâŕňü íŕ đĺçóëüňŕň (sapsan) function keep_item(npc, item) if not npc or not item or not alife():object(item:id()) then return end local section = item:section() if always_offs_items[section] then alife():release(alife():object(item:id()), true) return false end if protected_items.obj_is_protected(item, "items_protected", "exactly") or always_keep_item[section] then return true end
end
--' Ôóíęöč˙ ńďŕâíčň íĺîáőîäčěîĺ ÷čńëî ďđĺäěĺňîâ function create_items(npc, section, number, rnd) if npc == nil then return end --'printf("create %s of %s", tostring(number), tostring(section)) if ammo_sections[section] == true then if number > 0 then se_respawn.create_ammo(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), number) end else for i=1,number do --' Ďđîâĺđ˙ĺě âĺđî˙ňíîńňü ďî˙âčňü ęŕćäűé îáúĺęň â îňäĺëüíîńňč if math_random(1000) <= rnd then return alife():create(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()) end end end end
--' Ôóíęöč˙ ďđîâĺđ˙ĺň ĺńňü ëč őîňü îäčí čç çŕâčńčěűő îáúĺęňîâ ó ďĺđńîíŕćŕ function check_item_dependence(npc, section) if npc == nil then return end if item_dependence[section] == nil then return true end
local d_flag = true for k,v in pairs(item_dependence[section]) do local obj = npc:object(k) if obj and npc:marked_dropped(obj) ~= true then return true end d_flag = false end
return d_flag end
Nie wiem za co odpowiada ten parametr.
if tonumber(value) >= 0.4 then value = 0.2 end item_by_community[k][id] = 1000 * tonumber(value)
Teraz mam pytanie do modderów czy zechcieli by mi pomóc ? Mam problem z plikami w Tajnych ścieżkach 2 próbowałem zrobić tak jak w poprzednim poście niestety wychodzą dziwne rzeczy po poprawieniu kondycji na 100% chodzi mi o script\death_manager wklejam ten skrypt.
local death_ini = ini_file("misc\\death_generic.ltx")
function init_drop_settings() local community_list = { "stalker", "dolg", "freedom", "bandit", "military", "zombied", "ecolog", "killer", "monolith", "arena_enemy", "actor_dolg","bratok","nebo","wanderer","ucheniy","usa","newstalk","hunter" }
for k,v in pairs(community_list) do --' Íĺîáőîäčěî çŕďîëíčňü ňŕáëčöó item_by_community[v] = {} if death_ini:section_exist(v) then local n = death_ini:line_count(v) local id, value = "", "" for i=0,n-1 do result, id, value = death_ini:r_line(v,i,"","") --item_by_community[v][id] = 1000 * tonumber(value) if tonumber(value) >= 0.4 then value = 0.2 end item_by_community[v][id] = 1000 * tonumber(value) end end end
--' Çŕďîëí˙ĺě ňŕáëčöó çŕâčńčěîńňĺé local n = death_ini:line_count("item_dependence") local id, value = "", "" for i=0,n-1 do result, id, value = death_ini:r_line("item_dependence",i,"","") item_dependence[id] = {} local vvv = parse_names(value) for k,v in pairs(vvv) do item_dependence[id][v] = true end end
--' Ěíîćčňĺëč č ěčíčěŕęńű äë˙ âűďŕäĺíč˙ âĺůĺé â çŕâčńčěîńňč îň óđîâí˙ local level_name = level.name()
if not death_ini:section_exist(level_name) then level_name = "default" end
local n = death_ini:line_count(level_name) local id, value = "", "" for i=0,n-1 do result, id, value = death_ini:r_line(level_name,i,"","") mul_by_level[id] = tonumber(value) end
local item_count_section = "item_count_" .. level.get_game_difficulty() local n = death_ini:line_count(item_count_section) for i=0,n-1 do result, id, value = death_ini:r_line(item_count_section,i,"","") --' Íóćíî đŕńďŕđńčňü value â äâŕ çíŕ÷ĺíč˙ local t = parse_nums(value) if t[1] == nil then abort("Error on [death_ini] declaration. Section [%s], line [%s]", item_count_section, tostring(id)) end local min = t[1] local max = t[2] if max == nil then max = min end
if mul_by_level[id] == nil then mul_by_level[id] = 0 end
min = tonumber(min) * mul_by_level[id] max = tonumber(max) * mul_by_level[id]
count_by_level[id] = {min = min, max = max} end
--' Ďđĺäěĺňű, ęîňîđűĺ íĺëüç˙ óäŕë˙ňü (ęâĺńňîâűĺ íŕďđčěĺđ) local n = death_ini:line_count("keep_items") for i=0,n-1 do result, id, value = death_ini:r_line("keep_items",i,"","") if value == "true" then always_keep_item[id] = true end end
--' Ďđĺäěĺňű, îňíîń˙ůčĺń˙ ę ďŕňđîíŕě. Čő íŕäî ńďŕóíčňü äđóăčě ěĺňîäîě. ammo_sections = {} local n = death_ini:line_count("ammo_sections") local id, value = "", "" for i=0,n-1 do result, id, value = death_ini:r_line("ammo_sections",i,"","") ammo_sections[id] = true end end
class "drop_manager" function drop_manager:__init(npc) self.npc = npc end function drop_manager:create_release_item() if self.npc == nil then return end --' Ńďđŕřčâŕĺě ó ńĺđâĺđíîăî îáúĺęňŕ ăĺíĺđčëčńü ëč ďđĺäěĺňű local se_obj = alife():object(self.npc:id()) if (se_obj == nil) then return end if se_obj.death_droped == true then return end se_obj.death_droped = true
--' Ďđîâĺđęŕ íŕ îňńóňńňâčĺ ńďŕóíŕ ëóňŕ local ini = self.npc:spawn_ini()
if ini and ini:section_exist("dont_spawn_loot") then return end
--' Äîńďŕâíčâŕĺě íĺîáőîäčěîĺ ęîëč÷ĺńňâî čňĺěîâ: --' Íĺîáőîäčěî ńîńňŕâčňü ńďčńîę îáúĺęňîâ ęîňîđűĺ ěîăóň áűňü çŕńďŕâíĺíű äë˙ ďĺđńîíŕćŕ local spawn_items = item_by_community[self.npc:character_community()] if spawn_items then for k,v in pairs(spawn_items) do --' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü çŕâčńčěîńňč if check_item_dependence(self.npc, k) == true then --' Ďî ęŕćäîěó îáúĺęňó íĺîáőîäčěî ďîëó÷čňü ęîëč÷ĺńňâî local number = math.ceil(math.random(count_by_level[k].min, count_by_level[k].max)) --' Íĺîáőîäčěî çŕńďŕâíčňü íóćíîĺ ęîëč÷ĺńňâî. create_items(self.npc, k, number, v) end end end
if not string.find(self.npc:section(),"arena") and self.npc:character_community()~="arena_enemy" and self.npc:name()~="yan_specnaz_dead" and self.npc:name()~="x16_stalker_ghost" then
local otf_1 local otf_2 local otf_3 local otf_4 local otf_5 local sect local t = amk.read_stalker_params(se_obj) if t ~= nil then local vis = t.visual vis = amk.str_explode("\\",vis) vis = vis[3] --skunk.dbglog("vis = '%s'", vis) if vis then -- bandit if string.find(vis,"stalker_bandit") then sect = "bandit_outfit" end if vis == "stalker_bandit_4" or vis == "stalker_bandit_2" then sect = "bandit_outfit_red" end if vis == "stalker_bandit_5" or vis == "stalker_bandit_9" then sect = "bandit_outfit_blue" end if vis == "stalker_bandit_1" then sect = "bandit_outfit_red1" end if vis == "stalker_bandit_drunk" then sect = "outfit_bandit_m1" end if vis == "stalker_bandit_8" then sect = "bandit_gaz_outfit_m1" end if vis == "stalker_bandit_veteran" then sect = "bandit_veteran_outfit" end if vis == "stalker_bandit_borov" or vis == "stalker_bandit_master" then sect = "bandit_master_outfit" end if vis == "stalker_bandit_exoskeleton" then sect = "exo_bandit_outfit" end -- dolg if string.find(vis,"stalker_do") then sect = "dolg_outfit" end if vis == "stalker_do_antigas" then sect = "dolg_gaz_outfit_m1" end if vis == "stalker_do_komandir" then sect = "outfit_dolg_m1" end if vis == "stalker_do_nauchniy" then sect = "dolg_scientific_outfit" end if vis == "stalker_do_exoskeleton" then sect = "dolg_black_exoskeleton" end -- nebo if vis == "stalker_nebo_balon_1" then sect = "nebo_heavy_outfit" end if vis == "stalker_nebo_rukzak" then sect = "nebo_light_outfit" end if vis == "stalker_nebo_nauchniy" then sect = "nebo_scientific_outfit" end if vis == "stalker_nebo_exoskeleton" then sect = "nebo_exo_outfit" end -- ecolog if vis == "stalker_ecolog" or vis == "nauchniy_1" or vis == "protect_suit2" then sect = "ecolog_outfit" end if vis == "stalker_ecolog_military" or vis == "stalker_chemical" or vis == "nauchniy_0" or vis == "protect_suit1" then sect = "protection_outfit" end -- izgoy if vis == "izgoy" then sect = "bandit_veteran_outfit" end -- killer if string.find(vis,"stalker_ki") then sect = "killer_outfit" end if vis == "stalker_ki_head_1" then sect = "outfit_killer_m1" end if vis == "stalker_ki_antigas" then sect = "killer_gaz_outfit_m1" end if vis == "stalker_ki_nauchniy" then sect = "merc_scientific_outfit" end if vis == "stalker_ki_exoskeleton" then sect = "killer_blue_exoskeleton" end -- militari if vis == "stalker_militari_1" or vis == "stalker_militari_antigas_1" or vis == "stalker_military" or vis == "stalker_military_green" then sect = "military_outfit" end if vis == "stalker_militari_2" or vis == "stalker_militari_antigas_2" or vis == "stalker_commander" or vis == "stalker_military_black" then sect = "militaryspec_outfit" end -- monolit if string.find(vis,"stalker_mo") or vis == "stalker_monolit" then sect = "monolit_outfit" end if vis == "stalker_mo_hood_9" then sect = "monolit_gaz_outfit_m1" end if vis == "stalker_mo_nauchniy" then sect = "monolit_scientific_outfit" end if vis == "stalker_mo_exo" then sect = "monolit_exoskeleton" end if vis == "stalker_mo_elite" then sect = "monolit_black_outfit" end -- nauchniy (see ecolog) -- neytral if string.find(vis,"stalker_neytral") or vis == "stalker_hood" or vis == "stalker_neytral_rukzak" then sect = "stalker_outfit" end if vis == "stalker_bar_security" then sect = "stalker_guard_outfit" end if vis == "stalker_neytral_hood_92" then sect = "neytral_gaz_outfit_m1" end if vis == "stalker_neytral_hood_9" then sect = "neytral_gaz_outfit_m2" end if string.find(vis,"neytral") and (self.npc:name()=="esc_wolf" or self.npc:name()=="esc_stalker_fanat" or self.npc:name()=="esc_fox" or self.npc:name()=="esc_provodnik" or self.npc:name()=="agr_krot") then sect = "outfit_stalker_m2" end if vis == "stalker_2_gas" then sect = "neytral_gaz_outfit_v1" end if vis == "stalker_3_gas" then sect = "neytral_gaz_outfit_v2" end if vis == "stalker_4_gas" then sect = "neytral_gaz_outfit_v3" end if vis == "stalker_2_mask" or vis == "lisiy" or vis == "stalker_2_mask" or vis == "stalker_2_ochki" or vis == "stalker_2_rozh1" or vis == "stalker_2_usi" then sect = "stalker_outfit_v1" end if vis == "stalker_3_mask" or vis == "hellcar" or vis == "stalker_3_mask" or vis == "stalker_3_rozh2" or vis == "stalker_3_usi" then sect = "stalker_outfit_v2" end if vis == "stalker_4_rozh3" or vis == "serega" or vis == "stalker_4_ochki" then sect = "stalker_outfit_v3" end if vis == "stalker_prizrak" then sect = "outfit_stalker_m1" end if vis == "stalker_neytral_nauchniy" or vis == "stalker_scien" then sect = "scientific_outfit" end if vis == "stalker_neytral_exoskeleton" or vis == "stalker_exoskeleton" then sect = "exo_outfit" end -- novice if vis == "green_stalker_1" then sect = "neytral_novice_outfit_m1" end if vis == "green_stalker_2" then sect = "novice_outfit" end if vis == "stalker_novice" then sect = "outfit_novice_m1" end if vis == "green_stalker_3" then sect = "novice_outfit_rain_1" end if vis == "green_stalker_4" then sect = "neytral_novice_outfit_cam" end if vis == "green_stalker_5" then sect = "novice_outfit_new_2" end if vis == "green_stalker_6" then sect = "novice_outfit_rain_2" end if vis == "green_stalker_7" then sect = "neytral_novice_outfit_cam_2" end if vis == "green_stalker_8" then sect = "neytral_novice_outfit_cam_3" end if vis == "green_stalker_9" then sect = "novice_outfit_new_1" end if vis == "green_stalker_10" then sect = "neytral_novice_outfit_cam_1" end if vis == "green_stalker_11" then sect = "neytral_novice_outfit_new" end if vis == "green_stalker_antigas" then sect = "neytral_novice_gaz_outfit_m1" end -- protect (see ecolog) -- soldier if string.find(vis,"soldier_bandana") or string.find(vis,"soldier_beret") or vis == "soldier_mask" or vis == "soldier_obichniy" or vis == "stalker_soldier" then sect = "outfit_soldier_m1" end if vis == "soldier_spetsnaz" or vis == "stalker_specops" then sect = "specops_outfit" end if vis == "soldier_antigas" then sect = "outfit_specnaz_m1" end -- stalker_zombi if vis == "stalker_zombie1" then sect = "bandit_outfit" end if vis == "stalker_zombie2" or vis == "zombie_fresh_1" then sect = "dolg_outfit" end if vis == "stalker_zombie3" or vis == "stalker_zombie6" or vis == "zombie_fresh_2" then sect = "stalker_outfit" end if vis == "stalker_zombie4" then sect = "killer_outfit" end if vis == "stalker_zombie5" then sect = "stalker_guard_outfit" end if vis == "stalker_zombie7" then sect = "novice_outfit" end if vis == "stalker_zombie8" then sect = "neytral_novice_outfit_m1" end if vis == "stalker_zombie_specnaz" then sect = "specops_outfit" end if vis == "zombie_fresh_0" then sect = "svoboda_heavy_outfit" end if vis == "zombie_exoskeleton" then sect = "broken_exoskeleton" end -- svoboda if vis == "stalker_sv_rukzak_1_1" or vis == "stalker_sv_rukzak_3" or vis == "stalker_svoboda_light" then sect = "svoboda_light_outfit" end if string.find(vis,"stalker_sv_balon_1") or vis == "stalker_sv_rukzak_1" or vis == "stalker_sv_rukzak_2" or vis == "stalker_sv_rukzak_3_1" or vis == "stalker_sv_cook" or vis == "stalker_sv_max" or vis == "stalker_svoboda_heavy" then sect = "svoboda_heavy_outfit" end if vis == "stalker_sv_hood_91" then sect = "svoboda_gaz_outfit_m1" end if vis == "stalker_sv_hood_9" then sect = "svoboda_heavy_gaz_outfit_m1" end if vis == "stalker_sv_nauchniy" then sect = "freedom_scientific_outfit" end if vis == "stalker_sv_exoskeleton" then sect = "svoboda_exoskeleton" end if vis == "stalker_sv_leader" then sect = "outfit_svoboda_m1" end -- nano if vis == "stalker_nano_suit" then sect = "nano_outfit" end end if sect~=nil then if sect == "bandit_outfit" or sect == "outfit_bandit_m1" or sect == "bandit_outfit_blue" or sect == "bandit_outfit_red1" or sect == "bandit_outfit_red" or sect == "bandit_gaz_outfit_m1" or sect == "bandit_veteran_outfit" or sect == "bandit_master_outfit" or sect == "novice_outfit" or sect == "novice_outfit_rain_1" or sect == "novice_outfit_rain_2" or sect == "neytral_novice_outfit_m1" or sect == "neytral_novice_gaz_outfit_m1" or sect == "outfit_novice_m1" or sect == "neytral_novice_outfit_cam" or sect == "novice_outfit_new_1" or sect == "novice_outfit_new_2" or sect == "neytral_novice_outfit_cam_1" or sect == "neytral_novice_outfit_cam_2" or sect == "neytral_novice_outfit_cam_3" or sect == "neytral_novice_outfit_new" then otf_1 = create_items(self.npc, sect, 1, 650) if otf_1~= nil then amk.start_timer("outfit_cond_1",1,otf_1.id) end
elseif sect == "stalker_outfit" or string.find(sect,"_outfit_v") or sect == "nebo_light_outfit" or sect == "killer_outfit" or sect == "outfit_soldier_m1" or sect == "svoboda_light_outfit" or sect == "svoboda_gaz_outfit_m1" then otf_2 = create_items(self.npc, sect, 1, 550) if otf_2~= nil then amk.start_timer("outfit_cond_2",1,otf_2.id) end
elseif sect == "dolg_outfit" or sect == "dolg_gaz_outfit_m1" or sect == "ecolog_outfit" or sect == "outfit_dolg_m1" or sect == "outfit_killer_m1" or sect == "killer_gaz_outfit_m1" or sect == "specops_outfit" or sect == "outfit_specnaz_m1" or sect == "monolit_outfit" or sect == "monolit_gaz_outfit_m1" or sect == "stalker_guard_outfit" or sect == "outfit_stalker_m1" or sect == "nebo_heavy_outfit" or sect == "outfit_stalker_m2" or sect == "neytral_gaz_outfit_m1" or sect == "neytral_gaz_outfit_m2" or sect == "svoboda_heavy_outfit" or sect == "svoboda_heavy_gaz_outfit_m1" or sect == "outfit_svoboda_m1" then otf_3 = create_items(self.npc, sect, 1, 450) if otf_3~= nil then amk.start_timer("outfit_cond_3",1,otf_3.id) end
elseif sect == "dolg_scientific_outfit" or sect == "ecolog_outfit" or sect == "protection_outfit" or sect == "merc_scientific_outfit" or sect == "military_outfit" or sect == "militaryspec_outfit" or sect == "monolit_scientific_outfit" or sect == "scientific_outfit" or sect == "monolit_black_outfit" or sect == "nebo_scientific_outfit" or sect == "freedom_scientific_outfit" then otf_4 = create_items(self.npc, sect, 1, 350) if otf_4~= nil then amk.start_timer("outfit_cond_4",1,otf_4.id) end
else otf_5 = create_items(self.npc, sect, 1, 250) if otf_5~= nil then amk.start_timer("outfit_cond_5",1,otf_5.id) end end end end end if self.npc:name() =="solomon" then db.actor:give_info_portion("haron_need_stalker_fail") end if string.find(self.npc:name(),"mathon") then db.actor:give_info_portion("haron_naem_fail") end if string.find(self.npc:name(),"new_prizrak") then db.actor:give_info_portion("prizrak_help_fail") end if string.find(self.npc:name(),"mil_lucash") then db.actor:give_info_portion("mil_lucash_dead") end if string.find(self.npc:name(),"mil_blockpost_leader") then db.actor:give_info_portion("mil_blockpost_leader_dead") end if string.find(self.npc:name(),"mil_soldat_one") then db.actor:give_info_portion("mil_voen_one") end if string.find(self.npc:name(),"mil_soldat_two") then db.actor:give_info_portion("mil_voen_two") end if string.find(self.npc:name(),"mil_soldat_tri") then db.actor:give_info_portion("mil_voen_tri") end if string.find(self.npc:name(),"mil_soldat_four") then db.actor:give_info_portion("mil_voen_four") end if string.find(self.npc:name(),"mil_soldat_five") then db.actor:give_info_portion("mil_voen_five") end if string.find(self.npc:name(),"dark_komandir_belchuk") then db.actor:give_info_portion("mil_voen_six") end if string.find(self.npc:name(),"mil_barier_one") then db.actor:give_info_portion("mil_barier_one") end if string.find(self.npc:name(),"mil_barier_two") then db.actor:give_info_portion("mil_barier_two") end if string.find(self.npc:name(),"mil_barier_tri") then db.actor:give_info_portion("mil_barier_tri") end if string.find(self.npc:name(),"mil_barier_four") then db.actor:give_info_portion("mil_barier_four") end if string.find(self.npc:name(),"mil_komandir_sidorchuk") then db.actor:give_info_portion("mil_barier_five") end if string.find(self.npc:name(),"mil_stukach") then db.actor:give_info_portion("mil_stukach_dead") end if string.find(self.npc:name(),"mil_engineer") then db.actor:give_info_portion("mil_engineer_dead") end if string.find(self.npc:name(),"mil_cook") then db.actor:give_info_portion("mil_cook_new_dead") end if self.npc:name() == "bes" then db.actor:give_info_portion("bes_dead") end if string.find(self.npc:name(),"garbage_stalker_wound") then db.actor:give_info_portion("garbage_stalker_wound_dead") end if string.find(self.npc:name(),"mil_osvedomitel") then db.actor:give_info_portion("mil_osvedomitel_dead") end if string.find(self.npc:name(),"esc_krest_bratok") then db.actor:give_info_portion("krest_dead") end if string.find(self.npc:name(),"atp_barman") then db.actor:give_info_portion("band_kill_have") end end --' Ôóíęöč˙ âűçűâŕĺňń˙ äë˙ ęŕćäîăî ďđĺäěĺňŕ, ĺńëč âĺđíĺň false ňî ďđĺäěĺň óäŕëčňń˙. function keep_item(npc, item) local npc_community = npc:character_community() if item==nil or alife():object(item:id())==nil then return end
if npc == nil then return end local section = item:section()
if section == "bolt" then return false end
if always_keep_item[section] == true then return true end
local item_id = item:id() local kond=75 if npc_community == "military" then kond=75 elseif npc_community == "killer" then kond=75 elseif npc_community == "monolith" then kond=20 elseif npc_community == "zombied" then kond=5 elseif npc_community == "bandit" then kond=40 else kond=60 end local item_in_slot = npc:item_in_slot(1) if item_in_slot ~= nil and item_in_slot:id() == item_id then item:unload_magazine() --' Ňóň íŕäî óěĺíüřčňü ęîíäčří îđóćč˙ item:set_condition((math.random(90-kond)+kond)/100) return true end item_in_slot = npc:item_in_slot(2) if item_in_slot ~= nil and item_in_slot:id() == item_id then item:unload_magazine() --' Ňóň íŕäî óěĺíüřčňü ęîíäčří îđóćč˙ item:set_condition((math.random(95-kond)+kond)/100) return true end
-- óäŕë˙ňü ĎÄŔ, ăčňŕđó\ăŕđěîřęó, ôîíŕđčęč č ďđčáîđű íî÷íîăî âčäĺíč˙, đŕöčţ, áčíîęëü. for a=1,table.getn(always_offs_items),1 do if always_offs_items[a]==section then --if (npc.mark_item_dropped) then -- npc:mark_item_dropped(item) --end alife():release(alife():object(item:id()), true) end end end
--' Ôóíęöč˙ ńďŕâíčň íĺîáőîäčěîĺ ÷čńëî ďđĺäěĺňîâ function create_items(npc, section, number, rnd) if npc == nil then return end --'printf("create %s of %s", tostring(number), tostring(section)) if ammo_sections[section] == true then if number > 0 then se_respawn.create_ammo(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), number) end else for i=1,number do --' Ďđîâĺđ˙ĺě âĺđî˙ňíîńňü ďî˙âčňü ęŕćäűé îáúĺęň â îňäĺëüíîńňč if math.random(1000) <= rnd then return alife():create(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()) end end end end
--' Ôóíęöč˙ ďđîâĺđ˙ĺň ĺńňü ëč őîňü îäčí čç çŕâčńčěűő îáúĺęňîâ ó ďĺđńîíŕćŕ function check_item_dependence(npc, section) if npc == nil then return end if item_dependence[section] == nil then return true end
local d_flag = true for k,v in pairs(item_dependence[section]) do local obj = npc:object(k) if obj ~= nil and npc:marked_dropped(obj) ~= true then return true end d_flag = false end
return d_flag end
Za ten post czeresniaczek1 otrzymał następujące punkty reputacji: