sound.npc_watch2 = data/sound/npc/npc-drsnak.wav
sound.olga = data/sound/npc/npc-vztekloun.wav
sound.man = data/sound/npc/npc-mladik.wav
sound.edwin = data/sound/npc/npc-zabak.wav
sound.ajaj = data/sound/npc/ajaj.wav
sound.tree = data/sound/enemy/tree.wav
sound.npc_beggar = data/sound/npc/npc-dedek.wav


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

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


[behavior=tstone]
  <on_click=0>
    flash_view=0,250,250,100
    play_sound.skill_ancestor =0
    teleport.old_mines=-1,2,20

[behavior=broken_tstone]
  <on_click=0>
    text_id=something's_missing
    use_offer=0
  <on_use.runic_stones=0,0>
    text_id=nothing_happened
  <on_use.runic_stones=0,1>
    play_sound.move_stone =0
    remove_party_item.runic_stones=1
    object.tstone=2,0,0
    state=255
--------------------------------------------------------------------------------

[behavior = rock_entrance1]
  <on_move = 0,0>
    do_click = 0
  <on_click=0>
    teleport.wolf_lair = -1,9,14

[behavior = rock_entrance2]
  <on_move = 0,0>
    state=1
    quest.hidden_gold_mine=2
    exp = 1000
    do_click = 0
  <on_move = 1,0>
    do_click = 0
  <on_click=1>
    teleport.old_mines = -1,11,19

[behavior = rock_entrance3]
  <on_move = 0,0>
    do_click = 0
  <on_click=0>
    teleport.old_mines = -1,22,4

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

[behavior = aenor_statue]
  <on_click=0>
    check_global.2=1,0
  <on_check=0,0,-1>
    text_id = ag_aenor_statue
  <on_check=0,0,0>
    state=1
    text=@5rurn asar!
    play_sound.skill_wall =0
    item.spring_stone=0,0
  <on_click=1>
    text_id = ag_aenor_statue

--------------------------------------------------------------------------------
[behavior = sign_maze]
  <on_click=0>
    text_id = ag_sign_maze

[behavior = sign_druid]
  <on_click=0>
    text_id = ag_sign_druid

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

[behavior = shop_smith]
  <on_click=0>
    text_id = ag_sign_smith
[behavior = shop_smith2]
  <on_click=0>
    text_id = ag_sign_smith2

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

[behavior = shop_archery]
  <on_click=0>
    text_id = ag_shop_archery
    
--------------------------------------------------------------------------------

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

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

[behavior = lever_reset_maze]
<on_init = 0>
	animate = 1, 1, 0, 1
<on_init = 1>
	animate = 0, 0, 0, 1
<on_click = 0>
	state = 1
	animate = 0, 0, 0, 1
	play_sound.switch =0
	
	play_sound.move_stone =0
  quake=500

	remove_object.boulder4 = 0,0
  	
	remove_object.boulder4 = -1,1
	remove_object.boulder4 = 0,1
	remove_object.boulder4 = 2,1

	remove_object.boulder4 = -3,2
	remove_object.boulder4 = -2,2
	remove_object.boulder4 = -1,2
	remove_object.boulder4 =  0,2
	remove_object.boulder4 =  1,2
	remove_object.boulder4 =  2,2
	remove_object.boulder4 =  3,2

	remove_object.boulder4 = -4,3
	remove_object.boulder4 = -3,3
	remove_object.boulder4 = -2,3
	remove_object.boulder4 = -1,3
	remove_object.boulder4 =  0,3
	remove_object.boulder4 =  1,3
	remove_object.boulder4 =  2,3
	remove_object.boulder4 =  3,3

  	remove_object.boulder4 = -4,4
	remove_object.boulder4 = -3,4
	remove_object.boulder4 = -2,4
	remove_object.boulder4 = -1,4
	remove_object.boulder4 =  0,4
	remove_object.boulder4 =  1,4
	remove_object.boulder4 =  2,4
	remove_object.boulder4 =  3,4

	remove_object.boulder4 = -4,5
	remove_object.boulder4 = -3,5
	remove_object.boulder4 = -2,5
	remove_object.boulder4 = -1,5
	remove_object.boulder4 =  0,5
	remove_object.boulder4 =  1,5
	remove_object.boulder4 =  2,5
	remove_object.boulder4 =  3,5

	remove_object.boulder4 = -4,6
	remove_object.boulder4 = -3,6
	remove_object.boulder4 = -2,6
	remove_object.boulder4 = -1,6
	remove_object.boulder4 =  0,6
	remove_object.boulder4 =  1,6
	remove_object.boulder4 =  2,6
	remove_object.boulder4 =  3,6

	remove_object.boulder4 = -4,7
	remove_object.boulder4 = -3,7
	remove_object.boulder4 = -2,7
	remove_object.boulder4 = -1,7
	remove_object.boulder4 =  0,7
	remove_object.boulder4 =  1,7
	remove_object.boulder4 =  2,7
	remove_object.boulder4 =  3,7

	remove_object.boulder4 = -4,8
	remove_object.boulder4 = -3,8
	remove_object.boulder4 = -2,8
	remove_object.boulder4 = -1,8
	remove_object.boulder4 =  0,8
	remove_object.boulder4 =  1,8
	remove_object.boulder4 =  2,8
	remove_object.boulder4 =  3,8

	remove_object.boulder4 = -4,9
	remove_object.boulder4 = -3,9
	remove_object.boulder4 = -2,9
	remove_object.boulder4 = -1,9
	remove_object.boulder4 =  0,9
	remove_object.boulder4 =  1,9
	remove_object.boulder4 =  2,9
	remove_object.boulder4 =  3,9

	remove_object.boulder4 = -4,10
	remove_object.boulder4 = -3,10
	remove_object.boulder4 = -2,10
	remove_object.boulder4 = -1,10
	remove_object.boulder4 =  0,10
	remove_object.boulder4 =  1,10
	remove_object.boulder4 =  2,10
	remove_object.boulder4 =  3,10
  	
	object.boulder4 = 0,-2,2
	object.boulder4 = 0,-1,2
	object.boulder4 = 0,2,2

	object.boulder4 = 0,-1,3
	object.boulder4 = 0,0,3
	object.boulder4 = 0,1,3
	object.boulder4 = 0,2,3
    
	object.boulder4 = 0,-4,4
	object.boulder4 = 0,0,4
    
	object.boulder4 = 0,1,5
    
	object.boulder4 = 0,-3,6
	object.boulder4 = 0,-1,6
	object.boulder4 = 0,1,6
    
	object.boulder4 = 0,-1,7
	object.boulder4 = 0,0,7

	object.boulder4 = 0,-2,8
    
	object.boulder4 = 0,-1,9
    
    
  <on_click = 1>
	state = 0
	animate = -1, 1, 0, 1
	play_sound.switch =0


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

[behavior = troll_symbol]
  <on_enter=0,1>
    text_id=ag_troll_symbol
    button_id=b_ok
    state=1
  <on_move = 1,0>
    check_item.forest_spell_of_passage=0
  <on_check = 1,0,1>
    play_sound.step =0
    teleport=-1,0,0

[behavior = troll_symbol2]
  <on_enter=0,1>
    state=1
  <on_move = 1,0>
    check_item.forest_spell_of_passage=0
  <on_check = 1,0,1>
    play_sound.step =0
    teleport=-1,0,0

[behavior=troll_prisoner]
  <on_enter=0,1>
    play_sound.tree =0
    text_id = ag_troll_prisoner1
    picture = data\scene\troll.jpg
    button_id = talk_troll1
  <on_button=0,0>
    state=1
    text_id = ag_troll_prisoner2
    picture = data\scene\troll.jpg
    button_id = talk_troll2
  <on_button=1,0>
    state=2
    text_id = ag_troll_prisoner3
    picture = data\scene\troll.jpg
    quest.freeing_troll = 1
    item.forest_spell_of_passage = 255,255

[behavior=free_troll]
  <on_enter=0,1>
    remove_enemy.troll_prisoner = 0,0
    text_id = ag_free_troll
    item.forest_claw = 255,255
    picture = data\scene\troll.jpg
    quest.freeing_troll = 2
    exp = 800
    state=1
    
--------------------------------------------------------------------------------

[behavior = door_woodcutters]
  #state=0: init
  #state=2: mas ukol
  #state=3: splnils ukol

  <on_move = 0,2>
    do_click=1
  <on_click = 0>
    play_sound.door = 0
    text_id = ag_wood1
    button_id = b_woodcutters1
    button_id = b_trade
    button_id = b_leave
  <on_button = 0,1>
    item_offer=1,12

  <on_button = 0,0>
    state = 1
    text_id = ag_wood2
    button_id = b_woodcutters2
    button_id = b_trade
    button_id = b_leave
  <on_button = 1,1>
    state = 0
    item_offer=1,12
  <on_button = 1,2>
    state = 0

  <on_button = 1,0>
    state = 2
    text_id = ag_wood3
    quest.wolf_hunt = 1
    enemy_forced.highlander_ron = 0,0
    object.woodcutter_dummy = 0,0,0
    button_id = b_trade
    button_id = b_leave
  <on_button = 2,0>
    item_offer=1,12

  <on_move = 2,2>
    do_click=1
  <on_click = 2>
    play_sound.door = 0
    check_global.1=4,0
  <on_check=2,0,-1>
    item_offer=1,12
  <on_check=2,0,0>
    text_id = ag_wood4
    quest.wolf_hunt = 2
    change_money = 500
    exp = 800
    state = 3

  <on_move = 3,2>
    do_click=1
  <on_click = 3>
    play_sound.door = 0
    item_offer=1,12

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

[behavior=wood_lead1]
  <on_click=0>
    text_id = ag_wood_lead1
    play_sound.man=0
    button_id = b_wood_lead
    button_id = b_wood_cancel
  <on_button=0,0>
    teleport=2,1,5

[behavior=wood_lead2]
  <on_click=0>
    text_id = ag_wood_lead2
    play_sound.man=0
    button_id = b_wood_lead
    button_id = b_wood_cancel
  <on_button=0,0>
    teleport=2,0,-5

[behavior=count_wolves]
  <on_activate=0,1>
    change_global.1=1
    check_global.1=3,3
  <on_check=0,3,1>
    text_id = ag_wolfcleared
    button_id=b_ok

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

[behavior = stonehenge]
  <on_enter=0,1>
    check_item.spring_stone=0
  <on_check=0,0,1>
    remove_party_item.spring_stone=1
    item.charged_spring_stone=255,255
    text_id=ag_stonehenge
    play_sound.SKILL_ALCHEMY=0
    button_id=b_ok

[behavior = avalanche]
  <on_click = 0>
    check_item.spring_stone=0
    check_item.charged_spring_stone=1
  <on_check = 0,0,0>
    text_id = ag_avalanche1
  <on_check = 0,0,1>
    text_id = ag_avalanche2
  <on_check = 0,1,1>
    text_id=ag_avalanche3
    remove_party_item.charged_spring_stone=1
    item.spring_stone=255,255
    play_sound.skill_frost=0
    remove_object.block_all=0,-1
    remove_object.block_all=0,1
    remove_object.avalanche=0,0

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

[behavior = woodgate_locked]
  <on_init = 0>
  	animate = 0, 0, 0, 1
  	block = 1
  <on_init = 2>
  	animate = 1, 1, 0, 1
  	block = 0
  <on_init = 1>
  	animate = 1, 1, 0, 1
  	block = 0
  <on_click=0>
    check_global.3=2,0
  <on_check=0,0,-1>
    text_id = locked_gate
    play_sound.LOCKED_DOOR = 0
  <on_check=0,0,0>
  	state = 1
  	do_click=1
  <on_click=1>
  	play_sound.door = 0
  	animate = -1, 1, 0, 1
  	block = 0
  	state=2
  <on_click=2>
    play_sound.door = 0
  	animate = 0, 0, 0, 1
  	block = 1
  	state=1

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

[behavior=promoter]
  <on_click=0>
    text_width=310
    text_id = ag_promoter1
    button_id = b_next
    play_sound.man = 0
  <on_button=0,0>
    text_width=310
    text_id = ag_promoter1b
    state=1
    button_id = b_go_on
    button_id = b_leave
  <on_button=1,1>
    state=0
  <on_button=1,0>
    check_money = 1000,0
  <on_check=1,0,0>
    text_id = not_enough_money
    state=0
  <on_check=1,0,1>
    state=2
    change_money=-1000
    rob_party = 0,-1
    #remove_party_item.arrows=999
    teleport=-1,0,1
  <on_click=2>
    play_sound.man = 0
    state=3
    teleport=-1,0,-1
    rob_party = 0,4
  <on_click=3>
    play_sound.man = 0
    text_id = ag_promoter2

[behavior = range]
  <on_enter=0,1>
    text_id = ag_range_help
    state=1
    
--------------------------------------------------------------------------------

[behavior=sad_archer]
  <on_click=0>
    play_sound.ajaj = 0
    text_id = ag_sad_archer1
    quest.sad_archer = 1
    state=1
  <on_click=1>
    play_sound.ajaj = 0
    check_item.icebear_bow = 0
  <on_check = 1,0,0>
    text_id=dh_woman_leave_me
  <on_check = 1,0,1>
    text_id=dh_woman_leave_me
    button_id=b_ag_show_bow
    button_id=b_leave
  <on_button=1,0>
    text_id = ag_sad_archer2
    quest.sad_archer = 2
    exp = 800
    remove_party_item.icebear_bow = 1
    item.shadow_jerkin = 255,255
    state=2
  <on_click=2>
    play_sound.man= 0
    text_id = hello

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

[behavior=edwin]
  <on_click=0>
    play_sound.edwin =0
    text_id = ag_edwin1
    button_id = b_go_on
    button_id = b_leave
  <on_button=0,0>
    quest.lazy_apprentice = 1
    text_id = ag_edwin2
    state=1
  <on_click=1>
    play_sound.edwin =0
    check_item.ogla's_herbs=0
  <on_click=2>
    play_sound.edwin =0
    text_id = ag_edwin5
  <on_check=1,0,0>
    text_id = ag_edwin3
  <on_check=1,0,1>
    text_id = ag_edwin4
    remove_party_item.ogla's_herbs=1
    item.edwin's_note = 255, 255
    set_global.2=1
    quest.lazy_apprentice = 2
    exp = 800
    state = 2

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

[behavior = tree_ogla1]
  <on_click=0>
    check_global.2=1,0
  <on_check=0,0,0>
    state=1
    play_sound.skill_wall =0
    text=@5rurn asar!
    item.healing_potion=0,0
    item.healing_potion=0,0
[behavior = tree_ogla2]
  <on_click=0>
    check_global.2=1,0
  <on_check=0,0,0>
    state=1
    play_sound.skill_wall =0
    text=@5rurn asar!
    item.stamina_potion=0,0
    item.stamina_potion=0,0
[behavior = tree_ogla3]
  <on_click=0>
    check_global.2=1,0
  <on_check=0,0,0>
    state=1
    play_sound.skill_wall =0
    text=@5rurn asar!
    item.medicine=0,0
    item.medicine=0,0
[behavior = well_ogla]
  <on_click=0>
    check_global.2=1,0
  <on_check=0,0,0>
    state=1
    play_sound.skill_wall =0
    text=@5rurn asar!
    item.stone_crook=0,0

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

[behavior=ogla]
  <on_move = 0,2>
    do_click=0
  <on_move = 1,2>
    do_click=0
  <on_move = 2,2>
    do_click=0
  <on_move = 3,2>
    do_click=0
  <on_move = 4,2>
    do_click=0
  <on_click=0>
    play_sound.olga =0
    check_global.3=1,0
    check_global.3=2,1
  <on_check=0,0,-1>
    text_id = ogla1
    picture = data\scene\ogla.jpg
  <on_check=0,1,0>
    text_id = ogla1
    picture = data\scene\ogla.jpg
  <on_check=0,0,0>
    text_id = ogla1
    button_id = b_roland
    button_id = b_leave
    picture = data\scene\ogla.jpg
  <on_button = 0,0>
    state=1
    text_id = ogla2
    button_id = b_next
    picture = data\scene\ogla.jpg
  <on_button = 1,0>
    state=2
    text_id = ogla3
    button_id = b_next
    picture = data\scene\ogla.jpg
  <on_button = 2,0>
    state=3
    text_id = ogla4
    button_id = b_next
    picture = data\scene\ogla.jpg
  <on_button = 3,0>
    state=4
    text_id = ogla5
    quest.lost_captain = 1
    picture = data\scene\ogla.jpg
  <on_click=4>
    play_sound.olga =0
    text_id = ogla1b

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

[behavior=guard]
  <on_click=0>
    text_id = ag_guard1
    button_id = b_roland
    play_sound.npc_watch2 = 0
  <on_button=0,0>
    text_id = ag_guard2
    set_global.3=1
    quest.passing_glen = 1
    state=1
  <on_click=1>
    text_id = dh_captain_proceed
    play_sound.npc_watch2 = 0
  <on_activate=0,1>
    state=2
  <on_activate=1,1>
    state=2
  <on_click=2>
    text_id = ag_guard3
    state=3
    play_sound.npc_watch2 = 0
  <on_click=3>
    text_id = dh_captain_proceed
    play_sound.npc_watch2 = 0

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

[behavior=tent_mage]
  <on_click=0>
    text_width=310
    text_id = aenor_tent1
    play_sound.inventory = 0
    state=1
    button_id=b_trade
    button_id=b_leave
  <on_button=1,0>
    item_offer=1,4
  <on_click=1>
    item_offer=1,4
    
[behavior=tent_soldier]
  <on_click=0>
    play_sound.inventory = 0
    check_global.3=2,0
  <on_check=0,0,-1>
    text_id = ag_soldier
    text_width=300
  <on_check=0,0,0>
    state=1
    text_id = ag_empty_tent
  <on_click=1>
    play_sound.inventory = 0
    text_id = ag_empty_tent

[behavior=tent_roland]
  <on_click=0>
    play_sound.inventory = 0
    check_global.3=2,0
  <on_check=0,0,-1>
    text_id = ag_roland
    set_global.3=2
    activate=1,0,0
    quest.lost_captain = 2
    exp = 1000
  <on_check=0,0,0>
    state=1
    text_id = ag_empty_tent
  <on_click=1>
    play_sound.inventory = 0
    text_id = ag_empty_tent

--------------------------------------------------------------------------------
[behavior=end_of_chapter]
  <on_move=0,2>
    text_id=ag_leave
    button_id = b_yes
    button_id = b_no
  <on_button=0,0>
    text_id = leaving_ag1
    picture = data/scene/travel_gy.jpg
    button_id = b_next
    quest.passing_glen=2
    exp = 1000
    state=1
    remove_party_item.spring_stone=1
    remove_party_item.charged_spring_stone=1
    remove_party_item.forest_spell_of_passage=1
    remove_party_item.forest_spell_of_passage = 1
    remove_party_item.spring_stone = 1
    remove_party_item.edwin's_note = 1
    remove_party_item.miner's_note = 1
    remove_party_item.miner's_key = 1
    remove_party_item.runic_stones = 1
    #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>
    text_id = leaving_ag2
    picture = data/scene/dark_passage.jpg
    button_id = b_next
    state=2
  <on_button=2,0>
    text_id = leaving_ag3
    picture = data\scene\dark_passage.jpg
    button_id = b_next
    state=3
  <on_button=3,0>
    text_id = leaving_ag4
    picture = data\scene\graveyard.jpg
    button_id = b_next
    state=4
  <on_button=4,0>
    teleport.graveyard_1,graveyard = 2,4,20
    
--------------------------------------------------------------------------------

[behavior = miner]
  <on_click=0>
    check_item.orkish_brandy = 0
    play_sound.npc_beggar = 0
  <on_check = 0,0,0>
    text_id = ag_miner1
  <on_check = 0,0,1>
    text_id = ag_miner2
    button_id = b_yes
    button_id = b_no
  <on_button = 0,0>
    text_id = ag_miner3
    quest.hidden_gold_mine = 1
    remove_party_item.orkish_brandy = 1
    activate=1,0,0
    state = 1
  <on_click=1>
    text_id = ag_miner4
    play_sound.npc_beggar = 0
    
--------------------------------------------------------------------------------

[behavior=monk_statue]
  <on_click=0>
    text_id = ag_monk_crook0
  <on_activate=0,1>
    # kdyz mi o sose povi miner
    state=1
  <on_click=1>
    text_id = ag_monk_crook1
    use_offer=0
    <on_use.stone_crook=1,0>
      text_id=nothing_happened
    <on_use.stone_crook=1,1>
      text_id = ag_monk_crook2
      remove_object.rock=0,0
      remove_object.block_enemy=1,0
      state=1
      play_sound.move_stone=0
      remove_party_item.stone_crook=1

[behavior=monk_statue_old]
  <on_click=0>
    check_item.stone_crook=0
  <on_activate=0,1>
    state=1
  <on_check=0,0,1>
    text_id = ag_monk_crook2
    remove_object.rock=0,0
    remove_object.block_enemy=1,0
    state=1
    remove_party_item.stone_crook=1
  <on_click=1>
    check_item.stone_crook=0
  <on_check=1,0,0>
    text_id = ag_monk_crook1
  <on_check=1,0,1>
    text_id = ag_monk_crook2
    remove_object.rock=0,0
    remove_object.block_enemy=1,0
    state=1
    play_sound.move_stone=0
    remove_party_item.stone_crook=1

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

[behavior=menhir]
  <on_init=0>
    animate=1,1,0,1

--------------------------------------------------------------------------------
[behavior=menhir2]
  <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=1,1,0,1
    
  <on_click=0>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 130
    play_sound.skill_alchemy=0
    state=1
  <on_click=1>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 110
    play_sound.skill_alchemy=0
    state=2
  <on_click=2>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 90
    play_sound.skill_alchemy=0
    state=3
  <on_click=3>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 70
    play_sound.skill_alchemy=0
    state=4
  <on_click=4>
    change_stamina=0,100,2
    flash_view = 100, 150, 200, 50
    play_sound.skill_alchemy=0
    animate=1,1,0,1
    state=5


[behavior=door1]
  <on_move = 0,2>
    do_click=0
  <on_click=0>
    text_id=locked_door
    play_sound.locked_door=0
    
[behavior = door_tavern]
  <on_move = 0,2>
    do_click = 0
  <on_click=0>
    play_sound.door = 0
    text_id = ag_tavern
    picture = data\scene\intro3.jpg
    button_id = b_rest_200
    button_id = b_trade
    button_id.60 = b_leave
    button_layout = 0
  <on_button = 0, 0>
    check_money = 200, 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 = -200
    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 = archery_offer]
  <on_move = 0,2>
    do_click=0
  <on_click = 0>
    play_sound.door = 0
    item_offer = 1,6


[behavior=save-t]
  <on_click=0>
    play_sound.SKILL_ANCESTOR=0
    teleport=2,0,0
