Привет всем!
Есть пара вопросов(несложных) и если нетрудно,пожалуйста,подскажите.
1)Параметр в СВУ,отвечающий за одиночную стрельбу(хочу поставить,чтобы винторез стрелял только одиночними).
2)В config\character_desc_general.xml,добавил: 999 +50
Денег,как было 40,так и осталось.Ранг тоже "0".И как повысить ранг функцией.
деньги меняются в файле all.spawn. Чтобы поменять еще нужно его распаковать прогой ACDC. Когда рапакуешь откроешь файл alife_l01_escape.ltx.
Найдешь строчки с гг
[1016]
; cse_abstract properties
section_name = actor
name = level_prefix_actor_0001
position = -123.143669128418,-26.3033409118652,-477.023681640625
direction = 0,-1.39625442028046,0.00431653670966625
s_flags = 0x29
; cse_alife_trader_abstract properties money = 40 - это деньги, меняешь например 1000000 и у тебя будет стоко денег
trader_flags = 0
character_profile = actor
xalk2012 Опрeдeли в чeм суть-глaвныe состaвляющиe модификaций. Отличия фaйлов: скрипты, конфиги, тeкстуры и др. Пробуй пeрeносить блокaми, сeкциями. Нeльзя вaлить всё в одну кучу.
-- Загружает схему из файла на диске и активирует в мотиваторе.
-- Здесь:
-- filename - имя файла, в котором реализована схема, без расширения
-- scheme - имя схемы
function load_scheme(filename, scheme, stype)
schemes[scheme] = filename
stypes[scheme] = stype
end
function printf(fmt,...)
log(string.format(fmt,...))
end
function qqq(n,o)
local scr = true
local con = true
if o then
if o == 1 or o == 0 then
scr = false
end
if o == 2 or o == 0 then
con = false
end
end
local k = "debug data QQQ "..tostring(n)
if scr then
if db.actor then
news_manager.send_tip(db.actor, k, nil, nil, 5000)
end
end
if con then
get_console():execute ("load "..k)
get_console():execute ("flush")
end
end
function qqqv(v,n,o)
local scr = true
local con = true
if type(v) == "string" then
v_name = v
else
o = n
n = v
v_name = "vector"
end
if o then
if o == 1 or o == 0 then
scr = false
end
if o == 2 or o == 0 then
con = false
end
end
local v_comp = ": nil"
if n ~= nil then
v_comp = ": x = "..n.x..", y = "..n.y..", z = "..n.z
end
local k = "debug data QQQ "..v_name..v_comp
if scr then
if db.actor then
news_manager.send_tip(db.actor, k, nil, nil, 5000)
end
end
if con then
get_console():execute ("load "..k)
get_console():execute ("flush")
end
end
function parse_data(str)
local string_parts = {}
if str == nil then
string_parts[1] = nil
return string_parts
end
local str_beg,str_end
str_end = str
local split_pos = find_split_pos(str_end)
while split_pos ~= nil do
str_beg, str_end = split_string(str_end,split_pos)
table.insert(string_parts,str_beg)
split_pos = find_split_pos(str_end)
end
table.insert(string_parts,str_end)
return string_parts
end
function find_split_pos(str)
local split_pos = string.find(str,",")
if split_pos == nil then
return nil
end
local br1_pos = string.find(str,"(",1,true)
local br2_pos = string.find(str,")",1,true)
if br1_pos ~= nil and br2_pos ~= nil and br1_pos < br2_pos and split_pos > br1_pos then
local str_end1 = string.sub(str,(br2_pos +1),string.len(str))
if string.find(str_end1,",") ~= nil then
split_pos = br2_pos + string.find(str_end1,",")
else
split_pos = nil
end
end
return split_pos
end
function split_string(str,split_pos)
local str_beg = (string.sub(str,1,split_pos-1))
local str_end = string.sub(str,(split_pos+1),string.len(str))
return str_beg,str_end
end
----------------------------------------------------------------------
if nil == time_global then
time_global = function () return device():time_global() end
end
function wait_game(time_to_wait)
verify_if_thread_is_running()
if (time_to_wait == nil) then
coroutine.yield()
else
local time_to_stop = game.time() + time_to_wait
while game.time() <= time_to_stop do
coroutine.yield()
end
end
end
function wait(time_to_wait)
verify_if_thread_is_running()
отредактировал(а) xalk2012: 28-12-2011 19:11 GMT3 час. <<<[red]Ушел в долгострой >>>
]Как сделать ГГ определенное количество денег в начале игры по умолчанию.
[left] actor_name ui_npc_u_actor
Actor
[spawn] \n
device_torch \n
actor actor
00 0 actors\hero\stalker_novice
Добавить эту строку в файл по пути gamedata\config\gameplay\character_desc_general
и все, у вас в начале игры у Сидоровича 100000 монет вместо 40!
Функцией можно что хочешь повысить, и ранг в том числе и репутацию!!!
function reputation_down_10(stalker, player)
db.actor:change_character_reputation(db.actor:character_reputation() - 10)
end
-10 репутации! Так же и ранг по анологии.
Внатуре пацаны, гаси их... Как сделать НПС бессмертным...
Логика в ТЧ!
Здесь нарисована цифра четыре "8", если вы видите восемь, то вам нужно к нам...
Привет Андрюха!!!
Ты никогда не ковырял "исполнитель желаний"??? Как они там эти эффекты сделали, звуки, темноту, туман, через рестрикторы или по времени в игре подвязали и где логику спрятали, в all.spawn что ли вся зашита???
отредактировал(а) losiara: 28-12-2011 19:43 GMT3 час. Внатуре пацаны, гаси их... Как сделать НПС бессмертным...
Логика в ТЧ!
Здесь нарисована цифра четыре "8", если вы видите восемь, то вам нужно к нам...
вылетает когда в баре загружаю квиксейв с логом
[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description :
[error]Arguments : LUA error: ...r. - Золотое издание\shoc\gamedata\scripts\_g.script:20: bad argument #2 to 'format' (string expected, got no value)
и петренко во время перестрелки бегает без ствола.
г_скрипт не трогал, те скрипты что изменены и патч стоят давно и раньше такого вылета не было
еще иногда безлоговые вылеты на других локациях
Маленький оружейный мод на ТЧ с более реалистичными по ТТХ оригиналльными стволами новые визуалы долговцев и целая бригада бандюков
в моём журнале
Я делал так,как у тебя в журнале: - не помогло.
Через all.spawn - работает.
Функцией можно что хочешь повысить, и ранг в том числе и репутацию!!!
Уже замучился вылеты получать пробуя rank подставить.Самой функции нет?
Простым впихиванием в таблицу???
Первоначальные отношения, между персонажами игры, устанавливаются в файле "gamedata/config/creatures/game_relations.ltx"
Отношения нпс к актору, актора к нпс, а так же нпс к нпс, устанавливаются в секции:
[communities_relations]
Где:
враг = число меньше нуля
нейтрал = 0
друг = число больше нуля
Отношения мутантов к нпс, нпс к мутантам, и мутантов к мутантам, устанавливается в секции:
[monster_relations]
Где:
human = нпс (сталкеры)
отредактировал(а) Arist: 28-12-2011 20:29 GMT3 час.
Arist
Быть такого не может, значит не ту секцию правил, название внимательно посмотри??? - эту!!!
Там еще есть no_random = "1"> - это не то!!!
Если в all.spawn, убрать [dont_spawn_character_supplies] - это, тогда можно затаривать ГГ и через character_...general.
Но деньги и без спауна ставятся, сколько хочешь. Скопируй секцию и пропиши!
Внатуре пацаны, гаси их... Как сделать НПС бессмертным...
Логика в ТЧ!
Здесь нарисована цифра четыре "8", если вы видите восемь, то вам нужно к нам...
losiara
У меня в character_desc_general.xml, только одна секция и есть:
А этого нет.А как ранг повысить через функцию(изв. за повтор).Если актор новичёк,то ....
function reputation_down(stalker, player)
local actor = db.actor
local _rank = ranks.get_obj_rank_name(actor)
if _rank == "novice" and then
return false
else
_rank == "master"
return true
end
end
отредактировал(а) Arist: 28-12-2011 21:44 GMT3 час.
Привет всем!
У меня такая проблема я перенес модель нпс из чистого неба, при экспорте в ogf конвертирует вот с такой ошибкой ..Object doesn't have own motion(Объект не имеет собственное движение)
Обьясните почему так
losiara Привет! Исполнителя желаний у меня не было, но туман и всякие ужасы мне знакомы по моду АВС инферно 1.1 Вся рандомность настроена в скрипте АВС. Изначальный скрипт ak rw, а позже был присвоен бразильцем Cabrobro. Исполнитель вроде как на нём и построен, но точно не скажу, т.к. не качал его.
Самое простое как повысить ранг на простых заданиях из цикла "Мне нужна работа"
config/misc/task_manager.ltx
К примеру возьмём задания Сидрыча.
tm_eliminate_camp_3 ---уничтожить бандитов в подземке агры
[tm_eliminate_camp_3]
type = eliminate_lager
community = actor
init_condition = {=actor_on_level(l03u_agr_underground)}--автоматически при попадании ГГ в подземку
text = tm_eliminate_camp_3_text
description = tm_eliminate_camp_3_descr
parent = trader ---- заказчик Сидор
target = agr_u_bandits ---лагерь бандосов в подземке
reward_money = 1500 ---дает деньги за работу
reward_reputation = +25 -- репутация повысится
reward_relation = dolg, 10 -- Если поставить 1000. то Долг будут корешами
reward_rank = 5 --- Ранк, если поставить 1000, то ГГ должен стать мастером
reward_item = grenade_rgd5, grenade_rgd5--дает за это всего лишь 2 гранаты
time = 86400 -- время до провала, если закомментить, то время будет не ограничено.
Поясню, чтобы не путали. Почему заказчик Сидор parent = trader
Открываем скрипт task_manager.script, и в самом верху смотрим [003] = "trader",
003 - Стори id Сидора.
Ещё в старом моде (не помню мод) была создана такая типа фигня. Сидор мог помирить со всеми группировками за бутылку водки. Вверху конфига нужно раскомментить
tm_find_item_1 Далее ищем.
[tm_find_item_1]
type = find_item
community = actor ;condlist = {+agroprom_military_case_done}--условие после сдачи квеста с кейсом с агропрома можно закомментить
text = tm_find_item_1_text
description = tm_find_item_1_descr
parent = trader
target = wpn_fort_m1--Вместо форта Кузнецова вписать водку
reward_money = 6000
reward_reputation = +15 reward_relation = dolg, 5000, killer,5000, freedom, 5000, stalker, 5000, bandit, 5000 --Сидор скорешил ГГ с 5 группировками. 5000 большая цифра, и только для того если ГГ был всем враг, т.е. порвал отношение
reward_rank = 3
time = 604800
losiara Там к примеру внизу скрипта должна быть такая беда: Война группировок на баре и АС. Рандомно спавнятся неписи (с разных группировок) с выводом сообщений на худ. Можно озвучку сделать. Вверху указ
if level_name == "l05_bar" then van_events("bar") end
if level_name == "l07_military" then van_events("mil") end
Внизу
if w == "bar" then
if db.storage[db.actor:id()].pstor["bar_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randbar = math.random(-70,100)
if randbar == 50 then
db.storage[db.actor:id()].pstor["bar_war"] = "yes"
local checkbarpos, checkbarpos1, checkbarpos2, checkbarpos3, checkbarpos4
checkbarpos1 = vector():set(246, 0, -50)
checkbarpos2 = vector():set(58, 0, 160)
checkbarpos3 = vector():set(191.49, 5.20, -141.46)
checkbarpos4 = vector():set(206, 0, -24)
local randpos = math.random(1,4)
if randpos == 1 then checkbarpos = checkbarpos1 end
if randpos == 2 then checkbarpos = checkbarpos2 end
if randpos == 3 then checkbarpos = checkbarpos3 end
if randpos == 4 then checkbarpos = checkbarpos4 end
local bar_spawn_pos = checkbarpos
if (checkbarpos1:distance_to_sqr(db.actor:position()) <= 100) then bar_spawn_pos = checkbarpos2 end
if (checkbarpos2:distance_to_sqr(db.actor:position()) <= 100) then bar_spawn_pos = checkbarpos3 end
if (checkbarpos3:distance_to_sqr(db.actor:position()) <= 100) then bar_spawn_pos = checkbarpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "mon", "kil"}
fac = faction[math.random(5)]
db.storage[db.actor:id()].pstor["bar_war_fac"] = fac
local fac_npc
for ccs = 1, 15 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, bar_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["bar_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["bar_war_count"]
fac = db.storage[db.actor:id()].pstor["bar_war_fac"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["bar_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["bar_war_count"] == 50 and level.name() == "l05_bar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[default]"..game.translate_string("abc_bar_news")
abc_news(news_text, "abc_bar")
end
if db.storage[db.actor:id()].pstor["bar_war_count"] == 60 and level.name() == "l05_bar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[default]"..game.translate_string(fac.."_abc_reply")
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["bar_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["bar_war_count"] = 0
db.storage[db.actor:id()].pstor["bar_war"] = "no"
end
end
end
if w == "mil" then
if db.storage[db.actor:id()].pstor["mil_war"] ~= "yes" and (db.lvlstartout < time_global()) then
-- alterar para -70,100
local randmil = math.random(-70,100)
if randmil == 50 then
db.storage[db.actor:id()].pstor["mil_war"] = "yes"
local checkmilpos, checkmilpos1, checkmilpos2, checkmilpos3, checkmilpos4
checkmilpos1 = vector():set(28, -13, 228)
checkmilpos2 = vector():set(30, -1, 85)
checkmilpos3 = vector():set(-150, -8, 82)
checkmilpos4 = vector():set(45, -9, 228)
local randpos = math.random(1,4)
if randpos == 1 then checkmilpos = checkmilpos1 end
if randpos == 2 then checkmilpos = checkmilpos2 end
if randpos == 3 then checkmilpos = checkmilpos3 end
if randpos == 4 then checkmilpos = checkmilpos4 end
local mil_spawn_pos = checkmilpos
if (checkmilpos1:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos2 end
if (checkmilpos2:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos3 end
if (checkmilpos3:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos4 end
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local dol = {"abc_dol_respawn_1", "abc_dol_respawn_2", "abc_dol_respawn_3", "abc_dol_respawn_4", "abc_dol_respawn_5"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local faction = {"dol", "mil", "mon", "kil"}
fac = faction[math.random(4)]
db.storage[db.actor:id()].pstor["mil_war_fac"] = fac
local fac_npc
for ccs = 1, 20 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "dol" then fac_npc = ban[math.random(5)] end
alife():create(fac_npc, mil_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["mil_war"] == "yes" then
local countfmw = db.storage[db.actor:id()].pstor["mil_war_count"]
fac = db.storage[db.actor:id()].pstor["mil_war_fac"]
if countfmw == nil then countfmw = 0 end
db.storage[db.actor:id()].pstor["mil_war_count"] = countfmw + 1
if db.storage[db.actor:id()].pstor["mil_war_count"] == 50 and level.name() == "l07_military" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[default]"..game.translate_string("abc_mil_news")
abc_news(news_text, "abc_frd")
end
if db.storage[db.actor:id()].pstor["mil_war_count"] == 60 and level.name() == "l07_military" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[default]"..game.translate_string(fac.."_abc_reply")
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["mil_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["mil_war_count"] = 0
db.storage[db.actor:id()].pstor["mil_war"] = "no"
end
end
end
end
Таким местом войну сделать на всех локах. Я делал для аддона солянки.
Вверху
--if level_name == "l01_escape" then van_events("esc") end
if level_name == "l07_military" then van_events("mil") end
if level_name == "l02_garbage" then van_events("gar") end
if level_name == "l03_agroprom" then van_events("agr") end
if level_name == "l03u_agr_underground" then van_events("und") end
if level_name == "l04_darkvalley" then van_events("dar") end
--if level_name == "l04u_labx18" then van_events("lab") end
if level_name == "l06_rostok" then van_events("ros") end
--if level_name == "l08_yantar" then van_events("yan") end
if level_name == "l08u_brainlab" then van_events("brain") end
if level_name == "l10_radar" then van_events("rad") end
--if level_name == "l10u_bunker" then van_events("bun") end
if level_name == "l11_pripyat" then van_events("pri") end
if level_name == "l12u_sarcofag" then van_events("sar") end
if level_name == "l12u_control_monolith" then van_events("con") end
if level_name == "l12_stancia_2" then van_events("aes2") end
if level_name == "jupiter" then van_events("mar") end
if level_name == "l05_bar" then van_events("bar") end
if level_name == "pripyat" then van_events("pry") end
Где закомменчено, неписи не появятся
Внизу
if w == "mil" then
if db.storage[db.actor:id()].pstor["mil_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randmil = math.random(1,100)
if randmil == 50 then
db.storage[db.actor:id()].pstor["mil_war"] = "yes"
local checkmilpos, checkmilpos1, checkmilpos2, checkmilpos3, checkmilpos4
checkmilpos1 = vector():set(28, -13, 228)
checkmilpos2 = vector():set(30, -1, 85)
checkmilpos3 = vector():set(-150, -8, 82)
checkmilpos4 = vector():set(45, -9, 228)
local randpos = math.random(1,4)
if randpos == 1 then checkmilpos = checkmilpos1 end
if randpos == 2 then checkmilpos = checkmilpos2 end
if randpos == 3 then checkmilpos = checkmilpos3 end
if randpos == 4 then checkmilpos = checkmilpos4 end
local mil_spawn_pos = checkmilpos
if (checkmilpos1:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos2 end
if (checkmilpos2:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos3 end
if (checkmilpos3:distance_to_sqr(db.actor:position()) <= 100) then mil_spawn_pos = checkmilpos4 end
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local faction = {"ved", "mil", "mon", "kil"}
fac = faction[math.random(4)]
local fac_npc
for ccs = 1, 10 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
alife():create(fac_npc, mil_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["mil_war"] == "yes" then
local countfmw = db.storage[db.actor:id()].pstor["mil_war_count"]
if countfmw == nil then countfmw = 0 end
db.storage[db.actor:id()].pstor["mil_war_count"] = countfmw + 1
if db.storage[db.actor:id()].pstor["mil_war_count"] == 1 and level.name() == "l07_military" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_mil_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_mil_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_frd")
end
if db.storage[db.actor:id()].pstor["mil_war_count"] == 10 and level.name() == "l07_military" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_8]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["mil_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["mil_war_count"] = 0
db.storage[db.actor:id()].pstor["mil_war"] = "no"
end
end
end
if w == "esc" then
if db.storage[db.actor:id()].pstor["esc_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randesc = math.random(1,100)
if randesc == 50 then
db.storage[db.actor:id()].pstor["esc_war"] = "yes"
local checkescpos, checkescpos1, checkescpos2, checkescpos3, checkescpos4
checkescpos1 = vector():set(197, 9, 104)
checkescpos2 = vector():set(-75, -27, -418)
checkescpos3 = vector():set(244, 5, 292)
checkescpos4 = vector():set(13, 18, 697)
local randpos = math.random(1,4)
if randpos == 1 then checkescpos = checkescpos1 end
if randpos == 2 then checkescpos = checkescpos2 end
if randpos == 3 then checkescpos = checkescpos3 end
if randpos == 4 then checkescpos = checkescpos4 end
local esc_spawn_pos = checkescpos
if (checkescpos1:distance_to_sqr(db.actor:position()) <= 100) then esc_spawn_pos = checkescpos2 end
if (checkescpos2:distance_to_sqr(db.actor:position()) <= 100) then esc_spawn_pos = checkescpos3 end
if (checkescpos3:distance_to_sqr(db.actor:position()) <= 100) then esc_spawn_pos = checkescpos4 end
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local faction = {"ban", "mil", "mon", "ved"}
fac = faction[math.random(4)]
local fac_npc
for ccs = 1, 15 do
if fac == "ved" then fac_npc = ved[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
alife():create(fac_npc, esc_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["esc_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["esc_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["esc_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["esc_war_count"] == 1 and level.name() == "l01_escape" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_esc_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_esc_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_esc")
end
if db.storage[db.actor:id()].pstor["esc_war_count"] == 10 and level.name() == "l01_escape" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_1")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_1]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["esc_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["esc_war_count"] = 0
db.storage[db.actor:id()].pstor["esc_war"] = "no"
end
end
end
if w == "gar" then
if db.storage[db.actor:id()].pstor["gar_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randgar = math.random(1,100)
if randgar == 50 then
db.storage[db.actor:id()].pstor["gar_war"] = "yes"
local checkgarpos, checkgarpos1, checkgarpos2, checkgarpos3, checkgarpos4
checkgarpos1 = vector():set(131, -1, 160)
checkgarpos2 = vector():set(-172, 2, 85)
checkgarpos3 = vector():set(-104, 21, 10)
checkgarpos4 = vector():set(72, 2, -196)
local randpos = math.random(1,4)
if randpos == 1 then checkgarpos = checkgarpos1 end
if randpos == 2 then checkgarpos = checkgarpos2 end
if randpos == 3 then checkgarpos = checkgarpos3 end
if randpos == 4 then checkgarpos = checkgarpos4 end
local gar_spawn_pos = checkgarpos
if (checkgarpos1:distance_to_sqr(db.actor:position()) <= 100) then gar_spawn_pos = checkgarpos2 end
if (checkgarpos2:distance_to_sqr(db.actor:position()) <= 100) then gar_spawn_pos = checkgarpos3 end
if (checkgarpos3:distance_to_sqr(db.actor:position()) <= 100) then gar_spawn_pos = checkgarpos4 end
local ban = {"ros_bandit_respawn_4", "ros_bandit_respawn_3", "esc_bandit_respawn_2", "val_bandit_respawn_4"}
local faction = {"ban"}
fac = faction[math.random(1)]
local fac_npc
for ccs = 1, 12 do
if fac == "ban" then fac_npc = ban[math.random(4)] end
alife():create(fac_npc, gar_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["gar_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["gar_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["gar_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["gar_war_count"] == 1 and level.name() == "l02_garbage" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_gar_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_gar_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_gar")
end
if db.storage[db.actor:id()].pstor["gar_war_count"] == 10 and level.name() == "l02_garbage" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_2")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_2]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["gar_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["gar_war_count"] = 0
db.storage[db.actor:id()].pstor["gar_war"] = "no"
end
end
end
if w == "agr" then
if db.storage[db.actor:id()].pstor["agr_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randagr = math.random(1,100)
if randagr == 50 then
db.storage[db.actor:id()].pstor["agr_war"] = "yes"
local checkagrpos, checkagrpos1, checkagrpos2, checkagrpos3, checkagrpos4
checkagrpos1 = vector():set(263, 2, -3)
checkagrpos2 = vector():set(103, 2, 6)
checkagrpos3 = vector():set(-127, 1, -21)
checkagrpos4 = vector():set(-137, 17, -198)
local randpos = math.random(1,4)
if randpos == 1 then checkagrpos = checkagrpos1 end
if randpos == 2 then checkagrpos = checkagrpos2 end
if randpos == 3 then checkagrpos = checkagrpos3 end
if randpos == 4 then checkagrpos = checkagrpos4 end
local agr_spawn_pos = checkagrpos
if (checkagrpos1:distance_to_sqr(db.actor:position()) <= 100) then agr_spawn_pos = checkagrpos2 end
if (checkagrpos2:distance_to_sqr(db.actor:position()) <= 100) then agr_spawn_pos = checkagrpos3 end
if (checkagrpos3:distance_to_sqr(db.actor:position()) <= 100) then agr_spawn_pos = checkagrpos4 end
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "ros_killer_respawn_3", "ros_killer_respawn_4", "abc_ved_respawn_6"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local mon = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "ros_killer_respawn_4", "ros_killer_respawn_3", "ros_killer_respawn_2"}
local faction = {"ved", "ban", "mil", "mon", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 10 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
alife():create(fac_npc, agr_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["agr_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["agr_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["agr_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["agr_war_count"] == 1 and level.name() == "l03_agroprom" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_agr_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_agr_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_agr")
end
if db.storage[db.actor:id()].pstor["agr_war_count"] == 10 and level.name() == "l03_agroprom" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_3")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_3]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["agr_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["agr_war_count"] = 0
db.storage[db.actor:id()].pstor["agr_war"] = "no"
end
end
end
if w == "und" then
if db.storage[db.actor:id()].pstor["und_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randund = math.random(1,100)
if randund == 50 then
db.storage[db.actor:id()].pstor["und_war"] = "yes"
local checkundpos, checkundpos1, checkundpos2, checkundpos3, checkundpos4
checkundpos1 = vector():set(263, 2, -3)
checkundpos2 = vector():set(103, 2, 6)
checkundpos3 = vector():set(-127, 1, -21)
checkundpos4 = vector():set(-137, 17, -198)
local randpos = math.random(1,4)
if randpos == 1 then checkundpos = checkundpos1 end
if randpos == 2 then checkundpos = checkundpos2 end
if randpos == 3 then checkundpos = checkundpos3 end
if randpos == 4 then checkundpos = checkundpos4 end
local und_spawn_pos = checkundpos
if (checkundpos1:distance_to_sqr(db.actor:position()) <= 100) then und_spawn_pos = checkundpos2 end
if (checkundpos2:distance_to_sqr(db.actor:position()) <= 100) then und_spawn_pos = checkundpos3 end
if (checkundpos3:distance_to_sqr(db.actor:position()) <= 100) then und_spawn_pos = checkundpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "ved", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 10 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, und_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["und_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["und_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["und_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["und_war_count"] == 1 and level.name() == "l03u_agr_underground" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_und_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_und_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_und")
end
if db.storage[db.actor:id()].pstor["und_war_count"] == 10 and level.name() == "l03u_agr_underground" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_4")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_4]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["und_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["und_war_count"] = 0
db.storage[db.actor:id()].pstor["und_war"] = "no"
end
end
end
if w == "dar" then
if db.storage[db.actor:id()].pstor["dar_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randdar = math.random(1,100)
if randdar == 50 then
db.storage[db.actor:id()].pstor["dar_war"] = "yes"
local checkdarpos, checkdarpos1, checkdarpos2, checkdarpos3, checkdarpos4
checkdarpos1 = vector():set(11, 2, -239)
checkdarpos2 = vector():set(26, 3, -478)
checkdarpos3 = vector():set(129, 16, -233)
checkdarpos4 = vector():set(17, 15, 34)
local randpos = math.random(1,4)
if randpos == 1 then checkdarpos = checkdarpos1 end
if randpos == 2 then checkdarpos = checkdarpos2 end
if randpos == 3 then checkdarpos = checkdarpos3 end
if randpos == 4 then checkdarpos = checkdarpos4 end
local dar_spawn_pos = checkdarpos
if (checkdarpos1:distance_to_sqr(db.actor:position()) <= 100) then dar_spawn_pos = checkdarpos2 end
if (checkdarpos2:distance_to_sqr(db.actor:position()) <= 100) then dar_spawn_pos = checkdarpos3 end
if (checkdarpos3:distance_to_sqr(db.actor:position()) <= 100) then dar_spawn_pos = checkdarpos4 end
local ban = {"abc_ban_respawn_1", "ros_bandit_respawn_4", "ros_bandit_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local faction = {"ban"}
fac = faction[math.random(1)]
local fac_npc
for ccs = 1, 10 do
if fac == "ban" then fac_npc = ban[math.random(5)] end
alife():create(fac_npc, dar_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["dar_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["dar_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["dar_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["dar_war_count"] == 1 and level.name() == "l04_darkvalley" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_dar_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_lab_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_dar")
end
if db.storage[db.actor:id()].pstor["dar_war_count"] == 10 and level.name() == "l04_darkvalley" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_5")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_5]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["dar_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["dar_war_count"] = 0
db.storage[db.actor:id()].pstor["dar_war"] = "no"
end
end
end
if w == "lab" then
if db.storage[db.actor:id()].pstor["lab_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randlab = math.random(1,100)
if randlab == 50 then
db.storage[db.actor:id()].pstor["lab_war"] = "yes"
local checklabpos, checklabpos1, checklabpos2, checklabpos3, checklabpos4
checklabpos1 = vector():set(-13, 5, 9)
checklabpos2 = vector():set(1, 5, -2)
checklabpos3 = vector():set(19, -13, 55)
checklabpos4 = vector():set(23, -9, -22)
local randpos = math.random(1,4)
if randpos == 1 then checklabpos = checklabpos1 end
if randpos == 2 then checklabpos = checklabpos2 end
if randpos == 3 then checklabpos = checklabpos3 end
if randpos == 4 then checklabpos = checklabpos4 end
local lab_spawn_pos = checklabpos
if (checklabpos1:distance_to_sqr(db.actor:position()) <= 100) then lab_spawn_pos = checklabpos2 end
if (checklabpos2:distance_to_sqr(db.actor:position()) <= 100) then lab_spawn_pos = checklabpos3 end
if (checklabpos3:distance_to_sqr(db.actor:position()) <= 100) then lab_spawn_pos = checklabpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "ved", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 10 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, lab_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["lab_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["lab_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["lab_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["lab_war_count"] == 1 and level.name() == "l04u_labx18" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_lab_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_lab_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_lab")
end
if db.storage[db.actor:id()].pstor["lab_war_count"] == 10 and level.name() == "l04u_labx18" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_5")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_5]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["lab_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["lab_war_count"] = 0
db.storage[db.actor:id()].pstor["lab_war"] = "no"
end
end
end
if w == "ros" then
if db.storage[db.actor:id()].pstor["ros_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randros = math.random(1,100)
if randros == 50 then
db.storage[db.actor:id()].pstor["ros_war"] = "yes"
local checkrospos, checkrospos1, checkrospos2, checkrospos3, checkrospos4
checkrospos1 = vector():set(-5, 1, 137)
checkrospos2 = vector():set(-76, -13, -211)
checkrospos3 = vector():set(-262, 2, 171)
checkrospos4 = vector():set(-278, 16, 22)
local randpos = math.random(1,4)
if randpos == 1 then checkrospos = checkrospos1 end
if randpos == 2 then checkrospos = checkrospos2 end
if randpos == 3 then checkrospos = checkrospos3 end
if randpos == 4 then checkrospos = checkrospos4 end
local ros_spawn_pos = checkrospos
if (checkrospos1:distance_to_sqr(db.actor:position()) <= 100) then ros_spawn_pos = checkrospos2 end
if (checkrospos2:distance_to_sqr(db.actor:position()) <= 100) then ros_spawn_pos = checkrospos3 end
if (checkrospos3:distance_to_sqr(db.actor:position()) <= 100) then ros_spawn_pos = checkrospos4 end
local fre = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local ban = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local mil = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local mon = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local faction = {"ved"}
fac = faction[math.random(1)]
local fac_npc
for ccs = 1, 10 do
if fac == "ved" then fac_npc = ved[math.random(5)] end
alife():create(fac_npc, ros_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["ros_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["ros_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["ros_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["ros_war_count"] == 1 and level.name() == "l06_rostok" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_ros_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_lab_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_ros")
end
if db.storage[db.actor:id()].pstor["ros_war_count"] == 10 and level.name() == "l06_rostok" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_5")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_5]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["ros_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["ros_war_count"] = 0
db.storage[db.actor:id()].pstor["ros_war"] = "no"
end
end
end
if w == "yan" then
if db.storage[db.actor:id()].pstor["yan_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randyan = math.random(1,100)
if randyan == 50 then
db.storage[db.actor:id()].pstor["yan_war"] = "yes"
local checkyanpos, checkyanpos1, checkyanpos2, checkyanpos3, checkyanpos4
checkyanpos1 = vector():set(183, -5, -114)
checkyanpos2 = vector():set(41, 1, 3)
checkyanpos3 = vector():set(35, 4, -146)
checkyanpos4 = vector():set(-104, -10, -252)
local randpos = math.random(1,4)
if randpos == 1 then checkyanpos = checkyanpos1 end
if randpos == 2 then checkyanpos = checkyanpos2 end
if randpos == 3 then checkyanpos = checkyanpos3 end
if randpos == 4 then checkyanpos = checkyanpos4 end
local yan_spawn_pos = checkyanpos
if (checkyanpos1:distance_to_sqr(db.actor:position()) <= 100) then yan_spawn_pos = checkyanpos2 end
if (checkyanpos2:distance_to_sqr(db.actor:position()) <= 100) then yan_spawn_pos = checkyanpos3 end
if (checkyanpos3:distance_to_sqr(db.actor:position()) <= 100) then yan_spawn_pos = checkyanpos4 end
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"ved", "kil"}
fac = faction[math.random(2)]
local fac_npc
for ccs = 1, 5 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
alife():create(fac_npc, yan_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["yan_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["yan_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["yan_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["yan_war_count"] == 1 and level.name() == "l08_yantar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_yan_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_yan_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_yan")
end
if db.storage[db.actor:id()].pstor["yan_war_count"] == 10 and level.name() == "l08_yantar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_6")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_6]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["yan_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["yan_war_count"] = 0
db.storage[db.actor:id()].pstor["yan_war"] = "no"
end
end
end
if w == "brain" then
if db.storage[db.actor:id()].pstor["brain_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randbrain = math.random(1,100)
if randbrain == 50 then
db.storage[db.actor:id()].pstor["brain_war"] = "yes"
local checkbrainpos, checkbrainpos1, checkbrainpos2, checkbrainpos3, checkbrainpos4
checkbrainpos1 = vector():set(35, 6, -0)
checkbrainpos2 = vector():set(-8, 2, -7)
checkbrainpos3 = vector():set(-65, 13, -11)
checkbrainpos4 = vector():set(-118, 23, -30)
local randpos = math.random(1,4)
if randpos == 1 then checkbrainpos = checkbrainpos1 end
if randpos == 2 then checkbrainpos = checkbrainpos2 end
if randpos == 3 then checkbrainpos = checkbrainpos3 end
if randpos == 4 then checkbrainpos = checkbrainpos4 end
local brain_spawn_pos = checkbrainpos
if (checkbrainpos1:distance_to_sqr(db.actor:position()) <= 100) then brain_spawn_pos = checkbrainpos2 end
if (checkbrainpos2:distance_to_sqr(db.actor:position()) <= 100) then brain_spawn_pos = checkbrainpos3 end
if (checkbrainpos3:distance_to_sqr(db.actor:position()) <= 100) then brain_spawn_pos = checkbrainpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local faction = {"fre", "ban", "mil", "mon", "ved"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 10 do
if fac == "ved" then fac_npc = ved[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, brain_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["brain_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["brain_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["brain_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["brain_war_count"] == 1 and level.name() == "l08u_brainlab" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_brain_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_brain_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_brain")
end
if db.storage[db.actor:id()].pstor["brain_war_count"] == 10 and level.name() == "l08u_brainlab" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_7")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_7]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["brain_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["brain_war_count"] = 0
db.storage[db.actor:id()].pstor["brain_war"] = "no"
end
end
end
if w == "rad" then
if db.storage[db.actor:id()].pstor["rad_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randrad = math.random(1,100)
if randrad == 50 then
db.storage[db.actor:id()].pstor["rad_war"] = "yes"
local checkradpos, checkradpos1, checkradpos2, checkradpos3, checkradpos4
checkradpos1 = vector():set(573, -48, 11)
checkradpos2 = vector():set(380, -29, 179)
checkradpos3 = vector():set(173, -9, 77)
checkradpos4 = vector():set(49, 1, 14)
local randpos = math.random(1,4)
if randpos == 1 then checkradpos = checkradpos1 end
if randpos == 2 then checkradpos = checkradpos2 end
if randpos == 3 then checkradpos = checkradpos3 end
if randpos == 4 then checkradpos = checkradpos4 end
local rad_spawn_pos = checkradpos
if (checkradpos1:distance_to_sqr(db.actor:position()) <= 100) then rad_spawn_pos = checkradpos2 end
if (checkradpos2:distance_to_sqr(db.actor:position()) <= 100) then rad_spawn_pos = checkradpos3 end
if (checkradpos3:distance_to_sqr(db.actor:position()) <= 100) then rad_spawn_pos = checkradpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local ved = {"abc_ved_respawn_1", "abc_ved_respawn_2", "abc_ved_respawn_3", "abc_ved_respawn_4", "abc_ved_respawn_6"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "ved", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 15 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "ved" then fac_npc = ved[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, rad_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["rad_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["rad_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["rad_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["rad_war_count"] == 1 and level.name() == "l10_radar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_rad_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_rad_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_rad")
end
if db.storage[db.actor:id()].pstor["rad_war_count"] == 10 and level.name() == "l10_radar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_8]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["rad_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["rad_war_count"] = 0
db.storage[db.actor:id()].pstor["rad_war"] = "no"
end
end
end
if w == "bun" then
if db.storage[db.actor:id()].pstor["bun_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randbun = math.random(1,100)
if randbun == 50 then
db.storage[db.actor:id()].pstor["bun_war"] = "yes"
local checkbunpos, checkbunpos1, checkbunpos2, checkbunpos3, checkbunpos4
checkbunpos1 = vector():set(1, -6, -65)
checkbunpos2 = vector():set(0, -7, -30)
checkbunpos3 = vector():set(3, -22, -0)
checkbunpos4 = vector():set(-54, -22, 55)
local randpos = math.random(1,4)
if randpos == 1 then checkbunpos = checkbunpos1 end
if randpos == 2 then checkbunpos = checkbunpos2 end
if randpos == 3 then checkbunpos = checkbunpos3 end
if randpos == 4 then checkbunpos = checkbunpos4 end
local bun_spawn_pos = checkbunpos
if (checkbunpos1:distance_to_sqr(db.actor:position()) <= 100) then bun_spawn_pos = checkbunpos2 end
if (checkbunpos2:distance_to_sqr(db.actor:position()) <= 100) then bun_spawn_pos = checkbunpos3 end
if (checkbunpos3:distance_to_sqr(db.actor:position()) <= 100) then bun_spawn_pos = checkbunpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local mon = {"abc_mon_respawn_1", "abc_mon_respawn_2", "abc_mon_respawn_3", "abc_mon_respawn_4", "abc_mon_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "mon", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 10 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "mon" then fac_npc = mon[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, bun_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["bun_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["bun_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["bun_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["bun_war_count"] == 1 and level.name() == "l10u_bunker" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_bun_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_bun_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_bun")
end
if db.storage[db.actor:id()].pstor["bun_war_count"] == 10 and level.name() == "l10u_bunker" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_5")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_8]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["bun_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["bun_war_count"] = 0
db.storage[db.actor:id()].pstor["bun_war"] = "no"
end
end
end
if w == "pri" then
if db.storage[db.actor:id()].pstor["pri_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randpri = math.random(1,100)
if randpri == 50 then
db.storage[db.actor:id()].pstor["pri_war"] = "yes"
local checkpripos, checkpripos1, checkpripos2, checkpripos3, checkpripos4
checkpripos1 = vector():set(15, -1, 67)
checkpripos2 = vector():set(8, 4, 204)
checkpripos3 = vector():set(30, 15, 280)
checkpripos4 = vector():set(135, 2, 195)
local randpos = math.random(1,4)
if randpos == 1 then checkpripos = checkpripos1 end
if randpos == 2 then checkpripos = checkpripos2 end
if randpos == 3 then checkpripos = checkpripos3 end
if randpos == 4 then checkpripos = checkpripos4 end
local pri_spawn_pos = checkpripos
if (checkpripos1:distance_to_sqr(db.actor:position()) <= 100) then pri_spawn_pos = checkpripos2 end
if (checkpripos2:distance_to_sqr(db.actor:position()) <= 100) then pri_spawn_pos = checkpripos3 end
if (checkpripos3:distance_to_sqr(db.actor:position()) <= 100) then pri_spawn_pos = checkpripos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local dol = {"abc_dol_respawn_1", "abc_dol_respawn_2", "abc_dol_respawn_3", "abc_dol_respawn_4", "abc_dol_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "dol", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 15 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "dol" then fac_npc = dol[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, pri_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["pri_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["pri_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["pri_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["pri_war_count"] == 1 and level.name() == "l11_pripyat" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_pri_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_pri_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_pri")
end
if db.storage[db.actor:id()].pstor["pri_war_count"] == 10 and level.name() == "l11_pripyat" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_8")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_9]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["pri_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["pri_war_count"] = 0
db.storage[db.actor:id()].pstor["pri_war"] = "no"
end
end
end
if w == "sar" then
if db.storage[db.actor:id()].pstor["sar_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randsar = math.random(1,100)
if randsar == 50 then
db.storage[db.actor:id()].pstor["sar_war"] = "yes"
local checksarpos, checksarpos1, checksarpos2, checksarpos3, checksarpos4
checksarpos1 = vector():set(36, 1, 37)
checksarpos2 = vector():set(54, 13, 7)
checksarpos3 = vector():set(27, 14, -20)
checksarpos4 = vector():set(55, 13, -2)
local randpos = math.random(1,4)
if randpos == 1 then checksarpos = checksarpos1 end
if randpos == 2 then checksarpos = checksarpos2 end
if randpos == 3 then checksarpos = checksarpos3 end
if randpos == 4 then checksarpos = checksarpos4 end
local sar_spawn_pos = checksarpos
if (checksarpos1:distance_to_sqr(db.actor:position()) <= 100) then sar_spawn_pos = checksarpos2 end
if (checksarpos2:distance_to_sqr(db.actor:position()) <= 100) then sar_spawn_pos = checksarpos3 end
if (checksarpos3:distance_to_sqr(db.actor:position()) <= 100) then sar_spawn_pos = checksarpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local dol = {"abc_dol_respawn_1", "abc_dol_respawn_2", "abc_dol_respawn_3", "abc_dol_respawn_4", "abc_dol_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "dol", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 12 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "dol" then fac_npc = dol[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, sar_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["sar_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["sar_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["sar_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["sar_war_count"] == 1 and level.name() == "l12u_sarcofag" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_sar_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_pri_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_sar")
end
if db.storage[db.actor:id()].pstor["sar_war_count"] == 10 and level.name() == "l12u_sarcofag" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_8")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_9]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["sar_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["sar_war_count"] = 0
db.storage[db.actor:id()].pstor["sar_war"] = "no"
end
end
end
if w == "con" then
if db.storage[db.actor:id()].pstor["con_war"] ~= "yes" and (db.lvlstartout < time_global()) then
local randcon = math.random(1,100)
if randcon == 50 then
db.storage[db.actor:id()].pstor["con_war"] = "yes"
local checkconpos, checkconpos1, checkconpos2, checkconpos3, checkconpos4
checkconpos1 = vector():set(36, -33, -12)
checkconpos2 = vector():set(18, -33, -37)
checkconpos3 = vector():set(-36, -33, -36)
checkconpos4 = vector():set(-18, -33, 13)
local randpos = math.random(1,4)
if randpos == 1 then checkconpos = checkconpos1 end
if randpos == 2 then checkconpos = checkconpos2 end
if randpos == 3 then checkconpos = checkconpos3 end
if randpos == 4 then checkconpos = checkconpos4 end
local con_spawn_pos = checkconpos
if (checkconpos1:distance_to_sqr(db.actor:position()) <= 100) then con_spawn_pos = checkconpos2 end
if (checkconpos2:distance_to_sqr(db.actor:position()) <= 100) then con_spawn_pos = checkconpos3 end
if (checkconpos3:distance_to_sqr(db.actor:position()) <= 100) then con_spawn_pos = checkconpos4 end
local fre = {"abc_fre_respawn_1", "abc_fre_respawn_2", "abc_fre_respawn_3", "abc_fre_respawn_4", "abc_fre_respawn_5"}
local ban = {"abc_ban_respawn_1", "abc_ban_respawn_2", "abc_ban_respawn_3", "abc_ban_respawn_4", "abc_ban_respawn_5"}
local mil = {"abc_mil_respawn_1", "abc_mil_respawn_2", "abc_mil_respawn_3", "abc_mil_respawn_4", "abc_mil_respawn_5"}
local dol = {"abc_dol_respawn_1", "abc_dol_respawn_2", "abc_dol_respawn_3", "abc_dol_respawn_4", "abc_dol_respawn_5"}
local kil = {"abc_kil_respawn_1", "abc_kil_respawn_2", "abc_kil_respawn_3", "abc_kil_respawn_4", "abc_kil_respawn_5"}
local faction = {"fre", "ban", "mil", "dol", "kil"}
fac = faction[math.random(5)]
local fac_npc
for ccs = 1, 12 do
if fac == "kil" then fac_npc = kil[math.random(5)] end
if fac == "mil" then fac_npc = mil[math.random(5)] end
if fac == "dol" then fac_npc = dol[math.random(5)] end
if fac == "ban" then fac_npc = ban[math.random(5)] end
if fac == "fre" then fac_npc = fre[math.random(5)] end
alife():create(fac_npc, con_spawn_pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
end
end
end
if db.storage[db.actor:id()].pstor["con_war"] == "yes" then
local countfnw = db.storage[db.actor:id()].pstor["con_war_count"]
if countfnw == nil then countfnw = 0 end
db.storage[db.actor:id()].pstor["con_war_count"] = countfnw + 1
if db.storage[db.actor:id()].pstor["con_war_count"] == 1 and level.name() == "l12u_control_monolith" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string("abc_sar_news")
local snd_obj = xr_sound.get_safe_sound_object([[abc_news\abc_pri_news]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_con")
end
if db.storage[db.actor:id()].pstor["con_war_count"] == 10 and level.name() == "l12u_control_monolith" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[255,1,255,1]"..game.translate_string(fac.."_abc_reply_8")
local snd_obj = xr_sound.get_safe_sound_object ([[abc_news\ban_abc_reply_9]])
snd_obj:play_no_feedback(db.actor, sound_object.s2d, 0, vector(), 1.0)
abc_news(news_text, "abc_"..fac)
end
if db.storage[db.actor:id()].pstor["con_war_count"] > 3600 then
db.storage[db.actor:id()].pstor["con_war_count"] = 0
db.storage[db.actor:id()].pstor["con_war"] = "no"
end
end
end
Иконки группировок дописываются в new_maneger.script
if db.storage[db.actor:id()].pstor["bar_war_count"] == 50 and level.name() == "l05_bar" and db.actor:alive() then
local news_text = "\\n".."%c[255,160,160,160]"..game.translate_string("st_tip").." \\n".."%c[default]"..game.translate_string("abc_bar_news")
abc_news(news_text, "abc_bar")
end
if db.storage[db.actor:id()].pstor["bar_war_count"] == 60 and level.name() == "l05_bar" and db.actor:alive() then
Цифры, что выделил лучше поменяять на
== 1
== 10
В качестве лекарства от критичного вылета с кодом в конце "fac"
отредактировал(а) dimak: 29-12-2011 12:45 GMT3 час. Как здорово быть тёртым сталкером! Не бояться каждого шороха, оружия не носить с собой много!
Привет всем!
я заменил визуал гг на другой, но почему то как старая модель так она и есть.
прописал в алл.спавне и character_desc_general.xml
помогите разобраться, может еще где нибудь прописать надо
xalk2012 Для ГГ идёт стандартная модель ГГ в новичке и нет смысла его передевать. Возьмешь с ЧН модель ГГ Шрама, будет Шрам в Плаще, но если переоденешь, то будет Стрелок в переодетом облике.
Как здорово быть тёртым сталкером! Не бояться каждого шороха, оружия не носить с собой много!
Эта тема закрыта, публикация новых сообщений недоступна.
Продолжая пользоваться сайтом, вы соглашаетесь с использованием файлов cookie. Страницы сайта могут содержать информацию, запрещенную для просмотра посетителям младше 18 лет. Авторское право на серию игр «S.T.A.L.K.E.R» и используемые в ней материалы принадлежит GSC Game World.