sound.AJAJ = data/sound/npc/ajaj.wav
sound.npc_watch = data/sound/npc/npc-drsnak.wav
sound.npc_man3 = data/sound/npc/npc-hvizd.wav
sound.npc_highlander = data/sound/npc/npc-mladik.wav
sound.npc_beggar = data/sound/npc/npc-dedek.wav
sound.npc_ukmar1 = data/sound/enemy/rimbrock.wav
sound.npc_woman_unger = data/sound/npc/npc-tetka.wav
sound.npc_woman_fear = data/sound/npc/npc-vydesena.wav
sound.npc_woman_hello = data/sound/npc/woman_hello.wav
sound.npc_merchant = data/sound/npc/npc-zabak.wav


[behavior=RESPAWN-wolf]
  <on_enter = 0, 1>
    check_global.253=0,0
  <on_check=0,0,1>
    enemy.wolf_respawn=0,0
    change_global.253=-1

--------------------------------------------------------------------------------

[behavior=tstone]
  # top = tomb
  # left = dunghill
  # right = nighor
  # bottom = forest
  <on_click=0>
    text_id=travelstone
    button_id=b_tstone1
    button_id=b_tstone2
    button_id=b_tstone3
    button_id=b_tstone4
    button_id=b_tstone5
  <on_button=0,0>
    flash_view=0,250,250,100
    play_sound.skill_ancestor =0
    teleport.tomb=-1,23,10
  <on_button=0,1>
    flash_view=0,250,250,100
    play_sound.skill_ancestor =0
    teleport=-1,10,17
  <on_button=0,2>
    flash_view=0,250,250,100
    play_sound.skill_ancestor =0
    teleport=-1,44,6
  <on_button=0,3>
    flash_view=0,250,250,100
    play_sound.skill_ancestor =0
    teleport=-1,27,11

-------------------------------------------------------------------------------
[behavior = apple_tree]
  <on_click=0>
    item.apple = -1,0
    item.apple = 1,0
    item.apple = 0,1
    item.apple = 0,-1
    state = 1
  <on_click=1>
    item.apple = -1,0
    item.apple = 1,0
    item.apple = 0,1
    item.apple = 0,-1
    state = 2
  <on_click=2>
    text_id = dh_no_apple


-------------------------------------------------------------------------------

[behavior = stone_sign1]
  <on_click=0>
    text_id = dh_sign_townhall
    text_width = 300

-------------------------------------------------------------------------------

[behavior = direction1]
  <on_click=0>
    text_id = dh_sign_direction1

[behavior = direction2]
  <on_click=0>
    text_id = dh_sign_direction2

--------------------------------------------------------------------------------

[behavior = shop_smith]
  <on_click=0>
    text_id = dh_sign_smith

[behavior = shop_inn]
  <on_click=0>
    text_id = dh_sign_inn

[behavior = shop_magic]
  <on_click=0>
    text_id = dh_sign_magic

[behavior = shop_general]
  <on_click=0>
    text_id = dh_sign_general

--------------------------------------------------------------------------------

[behavior = gate_locked]
  <on_init = 0>
    animate = 0, 0, 0, 1
    block = 1
  <on_click=0>
    text_id = dh_locked_gate
    play_sound.locked_door = 0

--------------------------------------------------------------------------------

[behavior = door1]
  <on_move = 0,2>
    do_click = 0
  <on_click=0>
    text_id = locked_door
    play_sound.locked_door = 0


[behavior = door_townhall]
  <on_move = 0,2>
    do_click = 0
  <on_click=0>
    text_width=310
    text_id = dh_no_visit_townhall
    play_sound.locked_door = 0


[behavior = door_th_cellar]
  <on_click=0>
    check_item.townhall_cellar_key=0
  <on_move=0,2>
    do_click=0
  <on_check=0,0,0>
    text_id = locked_door
    play_sound.locked_door = 0
  <on_check=0,0,1>
    state=1
    remove_party_item.townhall_cellar_key=1
    play_sound.unlock=0
    text_id = action_used_key
  <on_click=1>
    play_sound.door = 0
    teleport.dunghill2 = 0,10,9
  <on_move=1,2>
    do_click = 0

[behavior = inn_cellar]
  <on_enter=0,1>
    do_click=1
  <on_click=0>
    play_sound.ladder=0
    teleport.dunghill2 = 1,7,1


[behavior = gate_myron]
  <on_init = 0>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 1>
    animate = 1, 1, 0, 1
    block = 0
  <on_init = 2>
    animate = 0, 0, 0, 1
    block = 1
  <on_click = 0>
    check_item.myron's_key = 0
  <on_check = 0,0,0>
    text_id = locked_gate
    play_sound.locked_door = 0
  <on_check = 0,0,1>
    state = 1
    animate = -1, 1, 0, 1
    block = 0
    text_id = action_used_key
    remove_party_item.myron's_key = 1
    play_sound.RUSTY_GATE = 0
  <on_click = 1>
    state = 2
    animate = 0, 0, 0, 1
    block = 1
    play_sound.RUSTY_GATE = 0
  <on_click = 2>
    state = 1
    animate = -1, 1, 0, 1
    block = 0
    play_sound.RUSTY_GATE = 0


[behavior = door_auntie]
  <on_move = 0,2>
    do_click = 0
  <on_click=0>
    play_sound.door = 0
    text_id = dh_auntie1
    button_id=b_next
  <on_button=0,0>
    text_id = dh_auntie2
    activate=1,3,4
    button_id=b_next
    state=1
  <on_button=1,0>
    text_id = dh_auntie3
    item.healing_potion=22,18
    item.small_healing_potion=22,18
    item.herbs=22,18
    item.herbs=22,18
    item.lizard_ring=22,18
    exp=250
    state=10

  <on_activate=0,1>
    state=2
  <on_click=2>
    play_sound.door = 0
    text_id = dh_auntie1
    button_id=b_next
  <on_button=2,0>
    text_id = dh_auntie2
    activate=1,3,4
    button_id=b_next
    state=3
  <on_button=3,0>
    text_id = dh_auntie3
    item.healing_potion=22,18
    item.small_healing_potion=22,18
    item.herbs=22,18
    item.herbs=22,18
    item.lizard_ring=22,18
    quest.auntie=2
    exp=250
    state=10

  <on_click=10>
    play_sound.door = 0
    text_id = dh_auntie_empty

--------------------------------------------------------------------------------

[behavior = ukmar1]
  <on_click=0>
    text_id = dh_ukmar_welcome
    quest.street_fight = 1
    button_id.245 = b_ukmar_retreat
    button_id.245 = b_ukmar_fight
    button_layout = 1
    play_sound.npc_ukmar1 = 0
  <on_button=0,1>
    check_money = 250,0
  <on_check = 0,0,0>
    text_id = dh_ukmar_nomoney
  <on_check = 0,0,1>
    change_money=-250
    enemy_type.ukmar_peace = ukmar_fight, 0, 0
    object.ukmar_block = 0,0,2
    state=255
  <on_activate = 0,1>
    state=1
  <on_click=1>
    text_id = dh_ukmar_no_more
    play_sound.ukmar_no = 0

[behavior = ukmar_block]
  <on_enter=0,1>
    teleport = -1,0,-1
    text_id = dh_ukmar_quit_question
    button_id = b_ukmar_continue
    button_id = b_ukmar_give_up
  <on_button =  0,1>
    text_id = dh_ukmar_quit
    end_round = 0
    enemy_type.ukmar_fight = ukmar_peace, 0, -2
    object.ukmar_dummy = 0,0,-2
    remove_object.ukmar_block = 0, 0
  <on_activate = 0,77>
    #signal od mrtveho ukmara
    end_round = 0
    quest.street_fight = 2
    exp=250
    text_id = dh_ukmar_defeated
    change_money=500
    object.ukmar_dummy = 0,0,-2
    activate = 1,0,-2
    enemy_type.ukmar_fight = ukmar_peace, 0, -2
    button_id = b_ok
    state=1
  <on_button=1,1>
    state=255

[behavior = gossip_yorik]
  <on_click=0>
    play_sound.npc_man3 = 0
    text_id = dh_gossip_yorik

[behavior = woman]
  <on_click=0>
    check_item.chicken=0,6
  <on_check = 0,0,0>
    text_id = dh_woman_welcome1
    play_sound.npc_woman_unger = 0
  <on_check = 0,0,1>
    text_id = dh_woman_done
    play_sound.npc_woman_unger = 0
    quest.leaving_dunghill = 2
    exp=500
    state=1
    remove_party_item.chicken=6
    activate=1,0,0
  <on_click=1>
    text_id = dh_woman_leave_me
    play_sound.npc_woman_unger = 0

[behavior=niece]
  <on_click=0>
    text_id=dh_niece1
    quest.auntie=1
    activate=1,0,0
    state=1
    play_sound.npc_woman_hello = 0
  <on_click=1>
    text_id=dh_niece2
    play_sound.npc_woman_hello = 0
  <on_activate=1,1>
    state=2
  <on_click=2>
    text_id=dh_niece3
    play_sound.npc_woman_hello = 0
  <on_activate=0,1>
    state=3
  <on_click=3>
    text_id=hello
    play_sound.npc_woman_hello = 0

[behavior = captain]
  <on_init=1>
    block=0
  <on_init=2>
    block=0
  <on_click=0>
    text_id = dh_captain_no_pass
    play_sound.npc_watch = 0
  <on_activate=0,1>
    block=0
    state=1
  <on_click=1>
    text_id = dh_captain_pass
    play_sound.npc_watch = 0
    state=2
  <on_click=2>
    text_id = dh_captain_proceed
    play_sound.npc_watch = 0

[behavior = beggar]
  <on_click=1>
    text_id = dh_beggar_paid
    play_sound.npc_beggar = 0

  <on_click=0>
    text_id = dh_beggar_offer
    button_id = b_beggar_no
    button_id = b_beggar_yes
    play_sound.npc_beggar = 0

  <on_button =  0,1>
    check_money=5,0
  <on_check = 0,0,0>
    text_id = dh_beggar_no_money
  <on_check = 0,0,1>
    text_id = dh_beggar_thanks
    state=1
    change_money=-5
    item.townhall_cellar_key = 255,255

[behavior=dog]
  <on_enter=0,1>
    check_item.bloody_meat=0
  <on_check=0,0,1>
    remove_party_item.bloody_meat=1
    text_id=dh_dog1
    enemy_forced.dog=0,0
    state=1
  <on_global=1,31,1>
    text_width=310
    text_id=dh_dog2
    item.wounded_dog=255,255
    button_id=b_ok

[behavior=brother]
  <on_init=0>
    check_global.35=2,0
  <on_check=0,0,0>
    remove_enemy.townsman=0,0
    state=255
  <on_click=0>
    text_id=dh_brother1
    set_global.35=1
    quest.brother=1
    play_sound.AJAJ = 0


--------------------------------------------------------------------------------



[behavior=leave]
  <on_move=0,0>
    text_id = dh_leave
    button_id = b_yes
    button_id = b_no
  <on_button = 0,0>
    state=1
    picture = data/scene/travel_forest.jpg
    text_id = to_the_forest
    button_id = b_next
    #reset respawnu
    set_global.255 = 0
    set_global.254 = 0
    set_global.253 = 0
    set_global.252 = 0
    set_global.251 = 0
  <on_button = 1,0>
    teleport.forest,forest = -1,2,26







--------------------------------------------------------------------------------
helps
--------------------------------------------------------------------------------

[behavior=help_start]
  <on_enter=0,1>
    exp=1100
    check_global.0=1,0
  <on_check=0,0,0>
    state=255
  <on_check=0,0,-1>
    text_id = dh_help_level_1
    button_id = b_next
    #button_id = b_skip
    state=1
  <on_button = 1,1>
    set_global.0=1
    state=255
  <on_button = 1,0>
    text_id = dh_help_level_2
    button_id = b_next
    #button_id = b_skip
    state=2
  <on_button = 2,1>
    set_global.0=1
    state=255
  <on_button = 2,0>
    text_id = dh_help_1
    button_id = b_ok
    state=3
  <on_button = 3,0>
    state=255

[behavior=help_garden]
  <on_enter=0,1>
    text_id = dh_help_garden
    button_id = b_ok
  <on_button =  0,0>
    state=255

[behavior=help_demon]
  <on_enter=0,1>
    text_id = dh_help_demon
    button_id = b_ok
  <on_button =  0,0>
    state=255

[behavior=help_leaving]
  <on_enter=0,1>
    text_id = dh_help_leaving
    button_id = b_ok
  <on_button =  0,0>
    state=255


--------------------------------------------------------------------------------
[behavior=jng]
  <on_click=0>
    text_id=dh_jng

--------------------------------------------------------------------------------
[behavior=rake_joke]
  <on_enter=0,1>
    text_id = dh_rake1
    hit = 102,0,1,2,2,2
    item.rake=0,0
    state=1


--------------------------------------------------------------------------------
[behavior=menhir]
  <on_init=0>
    animate=0,0,0,1
  <on_init=1>
    animate=0,0,0,1
  <on_init=2>
    animate=0,0,0,1
  <on_init=3>
    animate=0,0,0,1
  <on_init=4>
    animate=0,0,0,1
  <on_init=5>
    animate=0,0,0,1
  <on_init=6>
    animate=0,0,0,1
  <on_init=7>
    animate=1,1,0,1
  <on_click=0>
    text_id=dh_thorns1
    hit=102,0,1,5,0,0
    enemy.barkmonster=-1,1
    enemy.barkmonster=-1,1
    state=1
  <on_click=1>
    text_id=dh_thorns2
    remove_object.troll_thorns=0,0
    hit=102,0,1,5,0,0
    state=2
  <on_click=2>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 130
    play_sound.skill_alchemy=0
    state=3
  <on_click=3>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 110
    play_sound.skill_alchemy=0
    state=4
  <on_click=4>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 90
    play_sound.skill_alchemy=0
    state=5
  <on_click=5>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 70
    play_sound.skill_alchemy=0
    state=6
  <on_click=6>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 50
    play_sound.skill_alchemy=0
    animate=1,1,0,1
    state=7

[behavior=thorns]
  <on_click=0>
    text_id=dh_thorns2
    hit=102,0,1,5,0,0
    enemy.barkmonster=0,0
    state=255

--------------------------------------------------------------------------------
[behavior=well]
  <on_check=3,0,1>
    text_id=dh_well4
    change_state=1
  <on_click=-1>
    text_id=dh_well1
    button_id=b_yes
    button_id=b_no
  <on_button=-1,0>
    check_money=1,0
  <on_check=-1,0,0>
    text_id=dh_well2
  <on_check=-1,0,1>
    text_id=dh_well3
    change_money=-1
    change_state=1
    
    
--------------------------------------------------------------------------------
[behavior = rock_entrance1]
  <on_move=0,0>
    do_click=0
  <on_click=0>
    teleport=-1,0,0
    
[behavior=ancient_entrance]
  <on_enter=0,1>
    do_click=0
  <on_click=0>
    play_sound.ladder=0
    teleport.tomb=-1,2,20

--------------------------------------------------------------------------------
[behavior=woman_fire]
  <on_click=0>
    text_width=300
    text_id=dh_woman_fire1
    quest.fire_demon=1
    state=1
    play_sound.npc_woman_fear=0   
  <on_activate=0,1>
    state=2
  <on_click=1>
    text_id=dh_woman_fire1
    play_sound.npc_woman_fear=0   
  <on_activate=1,1>
    state=2
  <on_click=2>
    text_width=300
    text_id=dh_woman_fire2
    play_sound.npc_woman_fear=0   
    quest.fire_demon=2
    exp=250
    state=100
  <on_click=100>
    text_id=hello
    play_sound.npc_woman_hello=0   

--------------------------------------------------------------------------------
[behavior=berries]
  <on_click=0>
    text_id = berries
    item.berries=255,255
    state=255
    
--------------------------------------------------------------------------------
[behavior = lever]
  <on_init = 0>
  	animate = 0, 0, 0, 1
  <on_init = 1>
  	animate = 1, 1, 0, 1
  <on_click = 0>
  	state = 1
  	animate = -1, 1, 0, 1
    cube.g_grass=0,0,0
    play_sound.move_stone =0
  <on_click = 1>
  	state = 0
  	animate = 0, 0, 0, 1
    cube.wall1=0,0,0
    play_sound.move_stone =0


--------------------------------------------------------------------------------
[behavior=watch2]
  <on_click=0>
    text_id=dh_w1
    button_id=b_w1
    button_id=b_w2
    play_sound.npc_watch = 0
   
  <on_button=0,0>
    text_width = 220
    text_id=dh_w2
    use_offer=0
  <on_button=0,1>
    text_id=dh_w3
    button_id=b_yes
    button_id=b_no
    state=1
  <on_button=1,0>
    text_id=not_enough_money
    state=0
  <on_button=1,1>
    state=0
  <on_use.proof_of_heroism=0,0>
    text_id=dh_w5
  <on_use.proof_of_heroism=0,1>
    text_id=dh_w4
    remove_party_item.proof_of_heroism=1
    activate=1,0,0
    state=2
  <on_click=2>
    text_id = dh_captain_proceed
    play_sound.npc_watch =0

--------------------------------------------------------------------------------
[behavior = woodgate_locked]
  <on_init = 0>
  	animate = 0, 0, 0, 1
  	block = 1
  <on_init = 1>
  	animate = 1, 1, 0, 1
  	block = 0
  <on_click = 0>
    text_id=locked_gate
    play_sound.locked_door=0
  <on_activate=0,1>
  	state = 1
  	animate = -1, 1, 0, 1
  	block = 0
	  play_sound.door = 0


--------------------------------------------------------------------------------
# SHOPS
--------------------------------------------------------------------------------

[behavior = door_inn]
  <on_move = 0,2>
    do_click = 0
  <on_click=0>
    play_sound.door = 0
    text_id = dh_rathole_inn
    picture = data\scene\intro3.jpg
    button_id = b_rest_100
    button_id = b_trade
    button_id.60 = b_leave
    button_layout = 0
  <on_button = 0, 0>
    check_money = 100, 0
  <on_button = 0, 1>
    item_offer=1,2
  <on_check = 0, 0, 1>
    text_id = dh_inn_rest
    picture = data\scene\intro3.jpg
    change_money = -100
    change_hp = 0, 100, 2
    change_stamina = 0, 100, 2
    play_sound.YAWN = 0
  <on_check = 0, 0, 0>
    picture = data\scene\intro3.jpg
    text_id = not_enough_money

//------------------------------------------------------------------------------

[behavior = door_smith]
  #=======

  <on_click=0>
    play_sound.door = 0
    text_id = dh_smith_first_hello
    picture = data\scene\smith.jpg
    button_id = b_work
    button_id = b_trade
    button_id = b_leave
  <on_move = 0,2>
    do_click = 0
  <on_button =  0,0>
    text_id = dh_smith_work
    picture = data\scene\smith.jpg
    button_id = b_trade
    button_id = b_leave
    item.myron's_key = 255,255
    state=1
    quest.kill_vermin = 1
  <on_button =  0,1>
    item_offer = 1,3

  #=======

  <on_click=1>
    play_sound.door = 0
    text_id = dh_smith_in_progress
    picture = data\scene\smith.jpg
    button_id = b_trade
    button_id = b_leave
  <on_move = 1,2>
    do_click = 0
  <on_button =  1,0>
    item_offer = 1,3

  #=======

  <on_activate = 1,77>
    #signal od mrtveho worma
    state=2
  <on_click=2>
    play_sound.door = 0
    text_id = dh_smith_success
    picture = data\scene\smith.jpg
    change_money=200
    quest.kill_vermin = 2
    exp=250
    button_id = b_trade
    button_id = b_leave
    state=3
  <on_move = 2,2>
    do_click = 0
  <on_button =  2,0>
    item_offer = 1,3

  #=======

  <on_click=3>
    play_sound.door = 0
    text_id = dh_smith_after_success
    picture = data\scene\smith.jpg
    button_id = b_trade
    button_id = b_leave
  <on_move = 3,2>
    do_click = 0
  <on_button =  3,0>
    item_offer = 1,3

--------------------------------------------------------------------------------
[behavior=yorik]
  <on_click=0>
    text_id=dh_yorik
    button_id=b_trade
    button_id=b_leave
    play_sound.npc_man3 = 0
  <on_button=0,0>
    item_offer=1,12

--------------------------------------------------------------------------------
[behavior = hunter]
  <on_click=0>
    text_id=dh_hunter1
    button_id=b_yes
    button_id=b_no
    button_id=b_trade
    play_sound.npc_highlander = 0

  <on_button=0,2>
    item_offer = 1,12
  <on_button=0,0>
    text_id=dh_hunter2
    item.bloody_meat=255,255
    quest.hunter's_dog=1
    state=1
  <on_click=1>
    check_global.31=1,0
    play_sound.npc_highlander = 0
  <on_check=1,0,-1>
    text_id=dh_hunter3
    button_id=b_trade
    button_id=b_leave
  <on_check=1,0,0>
    text_id=dh_hunter4
    quest.hunter's_dog=2
    exp=250
    item.vorack's_crossbow=255,255
    remove_party_item.wounded_dog=1
    state=2
  <on_button=1,0>
    item_offer = 1,12
  <on_click=2>
    item_offer = 1,12
    play_sound.npc_highlander = 0

--------------------------------------------------------------------------------
[behavior=merchant]
  <on_click=0>
    text_id=dh_merchant1
    button_id=b_yes
    button_id=b_trade
    button_id=b_leave
    play_sound.npc_merchant = 0
  <on_button=0,0>
    quest.messenger=1
    item.merchant's_letter=255,255
    state=1
  <on_button=0,1>
    item_offer=1,12
  <on_click=1>
    item_offer=1,12
    play_sound.npc_merchant = 0


