Moskiton 0 Опубликовано 3 Мая 2009 (изменено) if moskiton_add.load_variable("spawn_moskiton",false)==false then moskiton_add.start_add_spawn() moskiton_add.save_variable("spawn_moskiton",true) end у меня вместо if sniper_add.load_variable("spawn_sniper",false)==false then sniper_add.start_add_spawn() sniper_add.save_variable("spawn_sniper",true) end если не сложно после какой строчки добавлять эту функцию, так как я добавил как сказано в теме был вылет expression : fatal error Function : CScriptEngine::lua_error File : E:\stalker\patch_1_0004\xr_3da\xrGame\script_engine.cpp Line : 73 Description : <no expression> Arguments : LUA error: ...:\s.t.a.l.k.e.r\gamedata\scripts\bind_stalker.script:568: attempt to index global 'moskiton_add' (a nil value) Изменено 3 Мая 2009 пользователем Moskiton Поделиться этим сообщением Ссылка на сообщение
Moskiton 0 Опубликовано 3 Мая 2009 (изменено) Вообщем вылет без лога, вот чего я добился эхх №1 !Фаил который редактирую = \gamedata\config\gameplay\character_desc_escape.xml <!---------------------------------------esc_Moskiton-----------------------------------------------------> <specific_character id="esc_moskiton" team_default = "1"> <name>Москитон</name> <icon>ui_npc_u_hunter_70_novice</icon> <map_icon x="1" y="0"></map_icon> <bio>Опытный сталкер. Детальная информация отсутствует.</bio> <class>esc_moskiton</class> <community>trader</community> <terrain_sect>stalker_terrain</terrain_sect> <rank>900</rank> <reputation>1000</reputation> <money min="100000" max="110000" infinitive="1"/> <snd_config>characters_voice\human_03\stalker\</snd_config> <crouch_type>-1</crouch_type> <panic_treshold>0</panic_treshold> <visual>actors\exoskelet_black</visual> <supplies> [spawn] \n wpn_vintorez \n ammo_9x39_sp5 = 1 \n </supplies> #include "gameplay\character_criticals_4.xml" #include "gameplay\character_dialogs.xml" </specific_character> №2 !Фаил который редактирую = \gamedata\config\gameplay\npc_profile.xml <character id="esc_moskiton"> <class>Trader</class> <specific_character>esc_moskiton</specific_character> </character> №3 !Фаил который редактирую = \gamedata\config\creatures\spawn_sections.ltx [esc_moskiton_respawn]:stalker_sakharov $spawn = "respawn\esc_moskiton_respawn" character_profile = esc_moskiton spec_rank = master community = Trader custom_data = scripts\moskiton_addon\moskiton_addon_friend_logic.ltx №4 !Фаил который редактирую = \gamedata\scripts\xr_conditions.script function is_moskiton_enemy(enemy, object) return enemy:id() ~= db.actor:id() end №5 пункты 5.1 и 5.2 пропустил так как работает все правильно, пункт 5.3 !Фаил который редактирую = \gamedata\scripts\moskiton_add.script function spawn_moskiton() end function spawn_moskiton() local x=130.7614440918 local y=0.21727779507637 local z=336.71932983398 local level_vertex=435469 local game_vertex_id=233 alife():create("esc_moskiton_respawn",vector():set(x,y,z),level_vertex,game_vertex_id) end function save_variable(variable_name, value) xr_logic.pstor_store(db.actor, variable_name, value) end function load_variable(variable_name, value_if_not_found) return xr_logic.pstor_retrieve(db.actor, variable_name, value_if_not_found) end №5.4 !Фаил который редактирую = \gamedata\scripts\bind_stalker.script строки 568-571 if moskiton_add.load_variable("spawn_moskiton",false)==false then moskiton_add.spawn_moskiton() moskiton_add.save_variable("spawn_moskiton",true) end №6 !Папка которую редактирую = \gamedata\config\scripts\moskiton_addon\ №6.1 !Фаил который редактирую = \gamedata\config\scripts\moskiton_addon\moskiton_addon_friend_logic.ltx [logic] active = walker combat_ignore = combat_ignore trade = misc\moskiton\moskiton.ltx [remark] anim = ward combat_ignore_cond = always danger_ignore = danger_ignore [combat_ignore] [danger_ignore] ignore_distance = 0 [walker] path_walk = walk path_look = look №6.2 !Фаил который редактирую = \gamedata\config\scripts\moskiton_addon\moskiton_addon_enemy_logic.ltx [logic] active = remark combat_ignore = combat_ignore trade = misc\moskiton\moskiton.ltx [remark] anim = ward combat_ignore_cond = always danger_ignore = danger_ignore [combat_ignore] [danger_ignore] ignore_distance = 0 №7 !Фаил который редактирую = \gamedata\config\misc\moskiton\moskiton.ltx [trader] buy_condition = generic_buy sell_condition = generic_sell buy_supplies = generic_start_sell [generic_buy] matras = 1, 1 treasure_item = 1, 1 gorelka = 1, 1 manometr = 1, 1 trubka = 1, 1 flamethrower_bad = 1, 1 amk_kanistra = 1, 1 amk_ballon = 1, 1 wpn_flame = 1, 1 tisku_arhara = 1, 1 device_pda_npc = 1, 1 arc_art_box_basic = 1, 1 arc_art_box_1basic = 1, 1 arc_art_box_8basic = 1, 1 ;Артефакты af_medusa = 1, 1 af_cristall_flower = 1, 1 af_night_star = 1, 1 af_vyvert = 1, 1 af_gravi = 1, 1 af_gold_fish = 1, 1 af_blood = 1, 1 af_mincer_meat = 1, 1 af_soul = 1, 1 af_electra_sparkler = 1, 1 af_electra_flash = 1, 1 af_electra_moonlight = 1, 1 af_rusty_thorn = 1, 1 af_rusty_kristall = 1, 1 af_rusty_sea-urchin = 1, 1 af_ameba_slime = 1, 1 af_ameba_slug = 1, 1 af_ameba_mica = 1, 1 af_drops = 1, 1 af_fireball = 1, 1 af_cristall = 1, 1 af_dummy_glassbeads = 1, 1 af_dummy_pellicle = 1, 1 af_dummy_battery = 1, 1 af_dummy_dummy = 1, 1 af_dummy_spring = 1, 1 af_fuzz_kolobok = 1, 1 af_buliz = 1, 1 af_spirit_1 = 1, 1 af_spirit_2 = 1, 1 af_spirit_3 = 1, 1 af_spirit_4 = 1, 1 af_cry_1 = 1, 1 af_cry_2 = 1, 1 af_cry_3 = 1, 1 af_babka_1 = 1, 1 af_babka_2 = 1, 1 af_babka_3 = 1, 1 af_pudd_1 = 1, 1 af_pudd_2 = 1, 1 af_pudd_3 = 1, 1 af_pudd_4 = 1, 1 af_dik_1 = 1, 1 af_dik_2 = 1, 1 af_dik_3 = 1, 1 af_dik_4 = 1, 1 af_kol_1 = 1, 1 af_kol_2 = 1, 1 af_kol_3 = 1, 1 af_kol_4 = 1, 1 af_armor_1 = 1, 1 af_armor_2 = 1, 1 af_armor_3 = 1, 1 af_armor_4 = 1, 1 af_simbion = 1, 1 af_dummy_battery_red = 1, 1 af_dummy_spring_red = 1, 1 af_dummy_pellicle_red = 1, 1 af_medusa_green = 1, 1 af_vyvert_green = 1, 1 af_blood_green = 1, 1 gold_art = 1, 1 af_caterpillar = 1, 1 ;Архара капсулы от Симбиона caps_mosquito_bald = 1, 1 caps_gravi = 1, 1 caps_mincer = 1, 1 caps_electra = 1, 1 caps_zharka = 1, 1 caps_ameba = 1, 1 ;Аммуниция ammo_9x39_sp5 = 1, 1 ammo_9x39_ap = 1, 1 ammo_9x39_pab9 = 1, 1 grenade_f1 = 1, 1 grenade_rgd5 = 1, 1 ;Оружие wpn_vintorez = 1, 1 ;БРОНЯ ЕЕ МАТЬ scientific_outfit = 1, 1 ;Медикаменты bandage = 1, 1 medkit = 1, 1 medkit_scientic = 1, 1 medkit_army = 1, 1 antirad = 1, 1 antizombie = 1, 1 ;Детали монстров mutant_flesh_eye = 1, 1 mutant_boar_leg = 1, 1 mutant_dog_tail = 1, 1 mutant_psevdodog_tail = 1, 1 mutant_krovosos_jaw = 1, 1 mutant_burer_hand = 1, 1 mutant_zombie_hand = 1, 1 mutant_snork_leg = 1, 1 mutant_face_tushkano = 1, 1 mutant_hand_kontroler = 1, 1 mutant_poltergeist_glas = 1, 1 mutant_psevdogigant_hand = 1, 1 mutant_tail_cat = 1, 1 mutant_chimera_kogot = 1, 1 mutant_fracture_hand = 1, 1 mutant_spleen_rat = 1, 1 ;Еда bread = 1, 1 kolbasa = 1, 1 conserva = 1, 1 vodka = 1, 1 energy_drink = 1, 1 mozg = 1, 1 lekarstvo = 1, 1 vorona_egg = 1, 1 ;Предметы zamok = 1, 1 bioradar = 1, 1 device_torch = 1, 1 detector_simple = 1, 1 detector_advances = 1, 1 detector_elite = 1, 1 device_pda = 1, 1 hand_radio = 1, 1 guitar_a = 1, 1 harmonica_a = 1, 1 arhara_tele = 1, 1 [generic_sell] matras = 1, 1 treasure_item = 1, 1 gorelka = 1, 1 manometr = 1, 1 trubka = 1, 1 flamethrower_bad = 1, 1 amk_kanistra = 1, 1 amk_ballon = 1, 1 wpn_flame = 1, 1 tisku_arhara = 1, 1 device_pda_npc = 1, 1 arc_art_box_basic = 1, 1 arc_art_box_1basic = 1, 1 arc_art_box_8basic = 1, 1 ;Артефакты af_medusa = 1, 1 af_cristall_flower = 1, 1 af_night_star = 1, 1 af_vyvert = 1, 1 af_gravi = 1, 1 af_gold_fish = 1, 1 af_blood = 1, 1 af_mincer_meat = 1, 1 af_soul = 1, 1 af_electra_sparkler = 1, 1 af_electra_flash = 1, 1 af_electra_moonlight = 1, 1 af_rusty_thorn = 1, 1 af_rusty_kristall = 1, 1 af_rusty_sea-urchin = 1, 1 af_ameba_slime = 1, 1 af_ameba_slug = 1, 1 af_ameba_mica = 1, 1 af_drops = 1, 1 af_fireball = 1, 1 af_cristall = 1, 1 af_dummy_glassbeads = 1, 1 af_dummy_pellicle = 1, 1 af_dummy_battery = 1, 1 af_dummy_dummy = 1, 1 af_dummy_spring = 1, 1 af_fuzz_kolobok = 1, 1 af_buliz = 1, 1 af_spirit_1 = 1, 1 af_spirit_2 = 1, 1 af_spirit_3 = 1, 1 af_spirit_4 = 1, 1 af_cry_1 = 1, 1 af_cry_2 = 1, 1 af_cry_3 = 1, 1 af_babka_1 = 1, 1 af_babka_2 = 1, 1 af_babka_3 = 1, 1 af_pudd_1 = 1, 1 af_pudd_2 = 1, 1 af_pudd_3 = 1, 1 af_pudd_4 = 1, 1 af_dik_1 = 1, 1 af_dik_2 = 1, 1 af_dik_3 = 1, 1 af_dik_4 = 1, 1 af_kol_1 = 1, 1 af_kol_2 = 1, 1 af_kol_3 = 1, 1 af_kol_4 = 1, 1 af_armor_1 = 1, 1 af_armor_2 = 1, 1 af_armor_3 = 1, 1 af_armor_4 = 1, 1 af_simbion = 1, 1 af_dummy_battery_red = 1, 1 af_dummy_spring_red = 1, 1 af_dummy_pellicle_red = 1, 1 af_medusa_green = 1, 1 af_vyvert_green = 1, 1 af_blood_green = 1, 1 gold_art = 1, 1 af_caterpillar = 1, 1 ;Архара капсулы от Симбиона caps_mosquito_bald = 1, 1 caps_gravi = 1, 1 caps_mincer = 1, 1 caps_electra = 1, 1 caps_zharka = 1, 1 caps_ameba = 1, 1 ;Аммуниция ammo_9x39_sp5 = 1, 1 ammo_9x39_ap = 1, 1 ammo_9x39_pab9 = 1, 1 grenade_f1 = 1, 1 grenade_rgd5 = 1, 1 ;Оружие wpn_vintorez = 1, 1 ;БРОНЯ ЕЕ МАТЬ scientific_outfit = 1, 1 ;Медикаменты bandage = 1, 1 medkit = 1, 1 medkit_scientic = 1, 1 medkit_army = 1, 1 antirad = 1, 1 antizombie = 1, 1 ;Детали монстров mutant_flesh_eye = 1, 1 mutant_boar_leg = 1, 1 mutant_dog_tail = 1, 1 mutant_psevdodog_tail = 1, 1 mutant_krovosos_jaw = 1, 1 mutant_burer_hand = 1, 1 mutant_zombie_hand = 1, 1 mutant_snork_leg = 1, 1 mutant_face_tushkano = 1, 1 mutant_hand_kontroler = 1, 1 mutant_poltergeist_glas = 1, 1 mutant_psevdogigant_hand = 1, 1 mutant_tail_cat = 1, 1 mutant_chimera_kogot = 1, 1 mutant_fracture_hand = 1, 1 mutant_spleen_rat = 1, 1 ;Еда bread = 1, 1 kolbasa = 1, 1 conserva = 1, 1 vodka = 1, 1 energy_drink = 1, 1 mozg = 1, 1 lekarstvo = 1, 1 vorona_egg = 1, 1 ;Предметы zamok = 1, 1 bioradar = 1, 1 device_torch = 1, 1 detector_simple = 1, 1 detector_advances = 1, 1 detector_elite = 1, 1 device_pda = 1, 1 hand_radio = 1, 1 guitar_a = 1, 1 harmonica_a = 1, 1 arhara_tele = 1, 1 [generic_start_sell] matras = 1, 1 treasure_item = 1, 1 gorelka = 1, 1 manometr = 1, 1 trubka = 1, 1 flamethrower_bad = 1, 1 amk_kanistra = 1, 1 amk_ballon = 1, 1 wpn_flame = 1, 1 tisku_arhara = 1, 1 device_pda_npc = 1, 1 arc_art_box_basic = 1, 1 arc_art_box_1basic = 1, 1 arc_art_box_8basic = 1, 1 ;Артефакты af_medusa = 1, 1 af_cristall_flower = 1, 1 af_night_star = 1, 1 af_vyvert = 1, 1 af_gravi = 1, 1 af_gold_fish = 1, 1 af_blood = 1, 1 af_mincer_meat = 1, 1 af_soul = 1, 1 af_electra_sparkler = 1, 1 af_electra_flash = 1, 1 af_electra_moonlight = 1, 1 af_rusty_thorn = 1, 1 af_rusty_kristall = 1, 1 af_rusty_sea-urchin = 1, 1 af_ameba_slime = 1, 1 af_ameba_slug = 1, 1 af_ameba_mica = 1, 1 af_drops = 1, 1 af_fireball = 1, 1 af_cristall = 1, 1 af_dummy_glassbeads = 1, 1 af_dummy_pellicle = 1, 1 af_dummy_battery = 1, 1 af_dummy_dummy = 1, 1 af_dummy_spring = 1, 1 af_fuzz_kolobok = 1, 1 af_buliz = 1, 1 af_spirit_1 = 1, 1 af_spirit_2 = 1, 1 af_spirit_3 = 1, 1 af_spirit_4 = 1, 1 af_cry_1 = 1, 1 af_cry_2 = 1, 1 af_cry_3 = 1, 1 af_babka_1 = 1, 1 af_babka_2 = 1, 1 af_babka_3 = 1, 1 af_pudd_1 = 1, 1 af_pudd_2 = 1, 1 af_pudd_3 = 1, 1 af_pudd_4 = 1, 1 af_dik_1 = 1, 1 af_dik_2 = 1, 1 af_dik_3 = 1, 1 af_dik_4 = 1, 1 af_kol_1 = 1, 1 af_kol_2 = 1, 1 af_kol_3 = 1, 1 af_kol_4 = 1, 1 af_armor_1 = 1, 1 af_armor_2 = 1, 1 af_armor_3 = 1, 1 af_armor_4 = 1, 1 af_simbion = 1, 1 af_dummy_battery_red = 1, 1 af_dummy_spring_red = 1, 1 af_dummy_pellicle_red = 1, 1 af_medusa_green = 1, 1 af_vyvert_green = 1, 1 af_blood_green = 1, 1 gold_art = 1, 1 af_caterpillar = 1, 1 ;Архара капсулы от Симбиона caps_mosquito_bald = 1, 1 caps_gravi = 1, 1 caps_mincer = 1, 1 caps_electra = 1, 1 caps_zharka = 1, 1 caps_ameba = 1, 1 ;Аммуниция ammo_9x39_sp5 = 1, 1 ammo_9x39_ap = 1, 1 ammo_9x39_pab9 = 1, 1 grenade_f1 = 1, 1 grenade_rgd5 = 1, 1 ;Оружие wpn_vintorez = 1, 1 ;БРОНЯ ЕЕ МАТЬ scientific_outfit = 1, 1 ;Медикаменты bandage = 1, 1 medkit = 1, 1 medkit_scientic = 1, 1 medkit_army = 1, 1 antirad = 1, 1 antizombie = 1, 1 ;Детали монстров mutant_flesh_eye = 1, 1 mutant_boar_leg = 1, 1 mutant_dog_tail = 1, 1 mutant_psevdodog_tail = 1, 1 mutant_krovosos_jaw = 1, 1 mutant_burer_hand = 1, 1 mutant_zombie_hand = 1, 1 mutant_snork_leg = 1, 1 mutant_face_tushkano = 1, 1 mutant_hand_kontroler = 1, 1 mutant_poltergeist_glas = 1, 1 mutant_psevdogigant_hand = 1, 1 mutant_tail_cat = 1, 1 mutant_chimera_kogot = 1, 1 mutant_fracture_hand = 1, 1 mutant_spleen_rat = 1, 1 ;Еда bread = 1, 1 kolbasa = 1, 1 conserva = 1, 1 vodka = 1, 1 energy_drink = 1, 1 mozg = 1, 1 lekarstvo = 1, 1 vorona_egg = 1, 1 ;Предметы zamok = 1, 1 bioradar = 1, 1 device_torch = 1, 1 detector_simple = 1, 1 detector_advances = 1, 1 detector_elite = 1, 1 device_pda = 1, 1 hand_radio = 1, 1 guitar_a = 1, 1 harmonica_a = 1, 1 arhara_tele = 1, 1 Добавлено: Неделя мучений увенчалась успехом, но данным способом лучше спавнить врагов которых убил и забыл, если хотите спавнить торговцев или охрану чего бы то нибыло лучше использовать all.spawn Изменено 8 Мая 2009 пользователем DiGGeR Поделиться этим сообщением Ссылка на сообщение