sound.goblin = data/sound/npc/npc-skret.wav

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

--------------------------------------------------------------------------------
[behavior = exit_cata1]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.GRAVEYARD_1 = -1,31,13

[behavior = exit_cata2]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.GRAVEYARD_1 = -1,35,13

[behavior = cata_down1]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.LOWER_CATACOMBS = -1,1,10

[behavior = cata_down2]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.LOWER_CATACOMBS = 1,4,1


[behavior = cata_down3]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.LOWER_CATACOMBS = 2,15,7

[behavior = cata_down4]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.LOWER_CATACOMBS = 1,9,21

[behavior = cata_down5]
<on_enter = 0,1>
  do_click=0
<on_click = 0>
  play_sound.ladder = 0
  teleport.LOWER_CATACOMBS = 1,13,20

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

[behavior = tomb_door]
  <on_init = 0>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 1>
    animate = 4, 4, 0, 1
    block = 0

  <on_click = 0>
    state = 1
    animate = -1, 4, 0, 1
    block = 0
    play_sound.move_stone = 0
    end_round=1
  <on_click = 1>
    state = 0
    animate = -1, 0, 0, 1
    block = 1
    play_sound.move_stone = 0
    end_round=1

[behavior = tomb_door_open]
  <on_init = 1>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 0>
    animate = 4, 4, 0, 1
    block = 0

  <on_click = 1>
    state = 0
    animate = -1, 4, 0, 1
    play_sound.move_stone = 0
    block = 0
    end_round=1

  <on_click = 0>
    state = 1
    animate = -1, 0, 0, 1
    play_sound.move_stone = 0
    block = 1
    end_round=1

[behavior = tomb_door_jammed]
  <on_init = 0>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 1>
    animate = 4, 4, 0, 1
    block = 0
  <on_init = 2>
    animate = 4, 4, 0, 1
    block = 0

  <on_click = 0>
    text_id = jammed
  <on_activate=0,1>
    state=2
  <on_click = 1>
    state = 2
    animate = -1, 0, 0, 1
    block = 1
    play_sound.move_stone = 0
    end_round=1
  <on_click = 2>
    state = 1
    animate = -1, 4, 0, 1
    block = 0
    play_sound.move_stone = 0
    end_round=1

[behavior = tomb_door_lever]
  <on_init = 0>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 1>
    animate = 4, 4, 0, 1
    block = 0
  <on_click = 0>
    text_id = locked_door
  <on_activate = -1,1>
    animate = -1, 4, 0, 1
    block = 0
    state=1
    play_sound.move_stone = 0
    end_round=1
  <on_activate = -1,2>
    animate = -1, 0, 0, 1
    block = 1
    state=0
    play_sound.move_stone = 0
    end_round=1

[behavior = tomb_door_of_three]
  <on_init = 1>
    animate = 0, 0, 0, 1
    block = 1
  <on_init = 0>
    animate = 4, 4, 0, 1
    block = 0
  <on_init = 2>
    animate = 4, 4, 0, 1
    block = 0
  <on_click = 1>
    text_id = locked_door
    play_sound.LOCKED_DOOR=0

  <on_activate=0,1>
    animate = -1, 0, 0, 1
    block = 1
    state=1
    play_sound.move_stone = 0
    end_round=1

  <on_global = 1,9,3>
    animate = -1, 4, 0, 1
    block = 0
    state=2
    play_sound.move_stone = 0
    end_round=1

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

[behavior = lever]
  <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_click=0>
    quest.broken_lever = 1
    text_id = cata_lever1
    state=1
  <on_click=1>
    use_offer=0
  <on_use.gear=1,0>
    text_id=nothing_happened
  <on_use.gear=1,1>
    text_id = cata_lever2
    remove_party_item.gear = 1
    state=2
  <on_click=2>
    use_offer=0
  <on_use.gear=2,0>
    text_id=nothing_happened
  <on_use.gear=2,1>
    text_id = cata_lever3
    remove_party_item.gear = 1
    quest.broken_lever=2
    exp=1000
    state=3

  <on_init = 3>
    animate = 0, 0, 0, 1
  <on_init = 4>
    animate = 1, 1, 0, 1
  <on_click = 3>
    state = 4
    animate = -1, 1, 0, 1
    activate = 1,0,0
    play_sound.switch=0
  <on_click = 4>
    state = 3
    animate = 0, 0, 0, 1
    activate = 2,0,0
    play_sound.switch=0



[behavior = lever_of_three]
  <on_init = 0>
    animate = 0, 0, 0, 1
  <on_init = 1>
    animate = 1, 1, 0, 1
  <on_init = 2>
    animate = 0, 0, 0, 1
    
  <on_activate=1,111>
    state=0
    animate = 0, 0, 0, 1

  <on_click = 0>
    state = 1
    animate = -1, 1, 0, 1
    change_global.9 = 1
    play_sound.switch=0
  <on_click = 1>
    state = 0
    animate = 0, 0, 0, 1
    change_global.9 = -1
    play_sound.switch=0

--------------------------------------------------------------------------------
[behavior = lever_bridge]
  <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_tomb=0,-1,0
    cube.g_tomb=0,-2,0
    cube.g_tomb=0,-3,0
    remove_object.sewer_bottom=0,0
    remove_object.sewer_bottom=-2,-1
    remove_object.sewer_bottom=-4,0
    object.sewer_bottom=1,-2,-1
    object.sewer_bottom=3,-2,-1
    play_sound.move_stone=0
  	play_sound.switch =0
  <on_click = 1>
    state = 0
    animate = 0, 0, 0, 1
  	play_sound.switch =0



--------------------------------------------------------------------------------
[behavior = lever_clay]
  <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_tomb=0,0,0
    play_sound.move_stone=0
  	play_sound.switch =0
  <on_click = 1>
    state = 0
    animate = 0, 0, 0, 1
    cube.w_clay=0,0,0
    play_sound.move_stone=0
  	play_sound.switch =0

--------------------------------------------------------------------------------
[behavior = timber]
  <on_click=0>
    text_id = remove_timber
    activate = 1,0,0
    remove_object.timber = 0,0
    play_sound.MOVE_STONE = 0



--------------------------------------------------------------------------------
[behavior = chest_seal]
  <on_click=0>
    activate = 111,-3,0
    activate = 111,3,0
    activate = 111,0,-3
    set_global.9=0
    item_offer = 0,1
    activate = 1,0,1
    enemy.headless = -3,0
    enemy.headless = 3,0
    enemy.headless = 0,-3
    state=1
  <on_click=1>
    item_offer = 0,1

--------------------------------------------------------------------------------
[behavior = cracked_stone]
<on_click=0>
  remove_object.cracked_stone = 0,0
  play_sound.break_wall = 0

--------------------------------------------------------------------------------
[behavior = goblin]
  <on_click=0>
    play_sound.goblin =0
    text_id=uc_goblin1
    use_offer=0
  <on_use.rat_meat=0,1>
    state=1
    picture=data\scene\goblin.jpg
    text_id=uc_goblin2
    button_id=b_next
    remove_party_item.rat_meat=1
  <on_use.chicken_leg=0,1>
    state=1
    picture=data\scene\goblin.jpg
    text_id=uc_goblin2
    button_id=b_next
    remove_party_item.chicken_leg=1
  <on_use.rat_meat=0,0>
    text_id=nothing_happened
  <on_use.chicken_leg=0,0>
    text_id=nothing_happened
  <on_button=1,0>
    item_offer=1,12
  <on_click=1>
    item_offer=1,12

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

[behavior=wake_bat]
<on_click=0>
	enemy_type.bat_sleeping=bat,0,0
	state=255
	play_sound.rat_att = 0

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

[behavior = teleport]
  <on_enter = 0,1>
    teleport = -1,0,0
    play_sound.teleport=0

[behavior=rat_horde]
  <on_enter=0,1>
    enemy.rat=0,0
    enemy.rat=0,0
    enemy.rat=1,0
    enemy.rat=1,0
    play_sound.rat_att=0
    text_id=cata_rats
    state=255
