
;------------------------------------------------
; ----- Freedom trader -----
; mutant hunt
[freedom_poselok_ug_trader_task_1]
icon = ui_iconsTotal_mutant
storyline = false
prior = 35
repeat_timeout = 43200
precondition = {=validate_assault_task(freedom_poselok_ug_trader_task_1:1:1:nil:false:true:nil)} true, false

title = freedom_poselok_ug_trader_task_1_name
descr = freedom_poselok_ug_trader_task_1_text
job_descr = freedom_poselok_ug_trader_task_1_about
task_complete_descr = freedom_poselok_ug_trader_1_finish

stage_complete = 1
target_functor = assault_task_target_functor
status_functor = assault_task_status_functor
status_functor_params = monster, monster_predatory_day, monster_predatory_night, monster_vegetarian, monster_zombied_day, monster_zombied_night, monster_special
condlist_0 = {+freedom_poselok_ug_trader_death} fail

on_job_descr = %=setup_assault_task(freedom_poselok_ug_trader_task_1)%
on_init = %+freedom_poselok_ug_trader_mutant_task%
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_random_money(3500:5000) =reward_stash(true) =inc_task_stage(freedom_poselok_ug_trader_task_1) -freedom_poselok_ug_trader_mutant_task%
on_fail = %=fail_task_dec_goodwill(25:freedom)%

; artefact
[freedom_poselok_ug_trader_task_2]
icon = ui_iconsTotal_artefact
storyline = false
prior = 65
repeat_timeout = 21200
;precondition = true

title = freedom_poselok_ug_trader_task_2_name
title_functor = general_fetch_task
descr = freedom_poselok_ug_trader_task_2_text
descr_functor = general_fetch_task
job_descr = freedom_poselok_ug_trader_task_2_about
fetch_descr = freedom_poselok_ug_trader_task_2_fetch_about
task_complete_descr = freedom_poselok_ug_trader_task_2_fetch_finish

stage_complete = 1
target_functor = general_fetch_task
status_functor = actor_has_fetch_item
condlist_0 = {+freedom_poselok_ug_trader_death} fail

fetch_func = %=setup_fetch_task(freedom_poselok_ug_trader_task_2_fetch:artefacts:1:1)%
on_complete = %=complete_task_inc_goodwill(50:freedom) =fetch_reward_and_remove(freedom_poselok_ug_trader_task_2_fetch:1.3) =reward_stash(true) =inc_task_stage(freedom_poselok_ug_trader_task_2)%
on_fail = %=fail_task_dec_goodwill(25:freedom)%


; documents
[freedom_poselok_ug_trader_task_3]
icon = ui_inGame2_Poslednie_razrabotki
storyline = false
prior = 39
repeat_timeout = 43200
precondition = {-drx_sl_quest_item_task_1_started} true, false

title = freedom_poselok_ug_trader_task_3_name
descr = freedom_poselok_ug_trader_task_3_text
job_descr = freedom_poselok_ug_trader_task_3_about
task_complete_descr = freedom_poselok_ug_trader_task_3_finish

stage_complete = 1
target_functor = drx_sl_quest_item_task_target
status_functor = drx_sl_quest_item_task_status
condlist_0 = {+freedom_poselok_ug_trader_death} fail

on_job_descr = %=drx_sl_create_quest_stash(freedom_poselok_ug_trader_task_3:1)%
on_complete = %=reward_random_money_by_dist(freedom_poselok_ug_trader_task_3:3000:3500:0.4) =reward_stash(true) =complete_task_inc_goodwill(50:freedom) =remove_item(drx_sl_quest_item_1) =inc_task_stage(freedom_poselok_ug_trader_task_3) -drx_sl_quest_item_task_1_started =drx_sl_unregister_task_giver(freedom_poselok_ug_trader_task_3) =drx_sl_reset_stored_task(freedom_poselok_ug_trader_task_3)%
on_fail = %=fail_task_dec_goodwill(25:freedom) -drx_sl_quest_item_task_1_started =drx_sl_unregister_task_giver(freedom_poselok_ug_trader_task_3) =drx_sl_reset_stored_task(freedom_poselok_ug_trader_task_3)%


;------------------------------------------------
; ----- Bandit trader -----
; mutant hunt
[bandit_poselok_ug_trader_task_1]

icon = ui_inGame2_Nochnaya_ohota
storyline = false
prior = 55
repeat_timeout = 21000
precondition = {=validate_assault_task(bandit_poselok_ug_trader_task_1:1:1:nil:false:true:nil)} true, false

title = bandit_poselok_ug_trader_task_1_name
descr = bandit_poselok_ug_trader_task_1_text
job_descr = bandit_poselok_ug_trader_task_1_about
task_complete_descr = bandit_poselok_ug_trader_task_1_finish

stage_complete = 1
target_functor = assault_task_target_functor
status_functor = assault_task_status_functor
status_functor_params = monster, monster_predatory_day, monster_predatory_night, monster_vegetarian, monster_zombied_day, monster_zombied_night, monster_special
condlist_0 = {+bandit_poselok_ug_trader_death} fail

on_job_descr = %=setup_assault_task(bandit_poselok_ug_trader_task_1)%
on_complete = %=reward_random_money(6500:8000) =reward_stash(true) =complete_task_inc_goodwill(50:bandit) =inc_task_stage(bandit_poselok_ug_trader_task_1) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_1) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_1)%
on_fail = %=fail_task_dec_goodwill(25:bandit) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_1) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_1)%

; bounty
[bandit_poselok_ug_trader_task_2]

icon = ui_inGame2_Odin_vistrel
storyline = false
prior = 45
repeat_timeout = 21000
;precondition = true

title = bandit_poselok_ug_trader_task_2_name
descr = bandit_poselok_ug_trader_task_2_text
job_descr = bandit_poselok_ug_trader_task_2_about
task_complete_descr = bandit_poselok_ug_trader_task_2_finish

stage_complete = 1
target_functor = general_bounty_task
status_functor = bounty_task
condlist_0 = {+bandit_poselok_ug_trader_death} fail

on_job_descr = %=setup_bounty_task(bandit_poselok_ug_trader_task_2:true:false:bandit)%
on_complete = %=reward_random_money(7500:8500) =reward_stash(true) =complete_task_inc_goodwill(50:bandit) =inc_task_stage(bandit_poselok_ug_trader_task_2) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_2) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_2)%
on_fail = %=fail_task_dec_goodwill(25:bandit) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_2) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_2)%

; meat
[bandit_poselok_ug_trader_task_3]

icon = ui_inGame2_Pripasi
storyline = false
prior = 30
repeat_timeout = 16200
;precondition = true

title = bandit_poselok_ug_trader_task_3_name
title_functor = general_fetch_task
descr = bandit_poselok_ug_trader_task_3_text
descr_functor = general_fetch_task
job_descr = bandit_poselok_ug_trader_task_3_about
fetch_descr = bandit_poselok_ug_trader_task_3_fetch_about
task_complete_descr = bandit_poselok_ug_trader_task_3_fetch_finish

stage_complete = 1
target_functor = general_fetch_task
status_functor = actor_has_fetch_item
condlist_0 = {+bandit_poselok_ug_trader_death} fail

fetch_func = %=setup_fetch_task(bandit_poselok_ug_trader_task_3_fetch:mutant_meat:6:10)%
on_complete = %=fetch_reward_and_remove(bandit_poselok_ug_trader_task_3_fetch:1.25) =reward_stash(true) =complete_task_inc_goodwill(50:bandit) =inc_task_stage(bandit_poselok_ug_trader_task_3) =pstor_reset(bandit_poselok_ug_trader_task_3_fetch) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_3) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_3)%
on_fail = %=fail_task_dec_goodwill(25:bandit) =pstor_reset(bandit_poselok_ug_trader_task_3_fetch) =drx_sl_unregister_task_giver(bandit_poselok_ug_trader_task_3) =drx_sl_reset_stored_task(bandit_poselok_ug_trader_task_3)%