<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-10000001</depth>
  <persistent>0</persistent>
  <parentName>parDeactivator</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>num = 0
num_val = 0
ok = 0
storage_mode = 0
shop_mode = 0
object = noone
alarm[0] = 1

x = view_xview[0]
y = view_yview[0]

_x[1]=x+84+v_offset
_x[2]=x+192+v_offset
for (var i=0; i&lt;10; i++)
{
    _y[i+1]=y+42+i*13;
}

x1 = 0+v_offset
x2 = 23+v_offset
x3 = 46+v_offset
x4 = 69+v_offset
x5 = 92+v_offset
eqp = ""

cursor_x  = _x[1]
cursor_y  = _y[1]
cursor_x2 = x1
cursor_image_index = 0
cursor_timer = 0

event_user(0)
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>ok = 1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Keyboard controls
if ok {
    if keyboard_check_pressed(vk_left) {
        audio_play_sound(sndselect,0,0)

        if cursor_x = _x[2]
        {
        cursor_x = _x[1]
        }
        else if cursor_x = _x[1]
        {
        cursor_x = _x[2]
        }
    } else if keyboard_check_pressed(vk_right) {
        audio_play_sound(sndselect,0,0)
        if cursor_x = _x[1]
        {
        cursor_x = _x[2]
        }
        else if cursor_x = _x[2]
        {
        cursor_x = _x[1]
        }
    } else if keyboard_check_pressed(vk_down){
        audio_play_sound(sndselect2,0,0)
        if cursor_y = _y[1]
        {
        cursor_y = _y[2]
        }
        else if cursor_y = _y[2]
        {
        cursor_y = _y[3]
        }
        else if cursor_y = _y[3]
        {
        cursor_y = _y[4]
        }
        else if cursor_y = _y[4]
        {
        cursor_y = _y[5]
        }
        else if cursor_y = _y[5]
        {
        cursor_y = _y[6]
        }
        else if cursor_y = _y[6]
        {
        cursor_y = _y[7]
        }
        else if cursor_y = _y[7]
        {
        cursor_y = _y[8]
        }
        else if cursor_y = _y[8]
        {
        cursor_y = _y[9]
        }
        else if cursor_y = _y[9]
        {
        cursor_y = _y[10]
        }
        else if cursor_y = _y[10]
        {
        cursor_y = _y[1]
        }
    } else if keyboard_check_pressed(vk_up) {
        audio_play_sound(sndselect2,0,0)
        if cursor_y = _y[1]
        {
        cursor_y = _y[10]
        }
        else if cursor_y = _y[2]
        {
        cursor_y = _y[1]
        }
        else if cursor_y = _y[3]
        {
        cursor_y = _y[2]
        }
        else if cursor_y = _y[4]
        {
        cursor_y = _y[3]
        }
        else if cursor_y = _y[5]
        {
        cursor_y = _y[4]
        }
        else if cursor_y = _y[6]
        {
        cursor_y = _y[5]
        }
        else if cursor_y = _y[7]
        {
        cursor_y = _y[6]
        }
        else if cursor_y = _y[8]
        {
        cursor_y = _y[7]
        }
        else if cursor_y = _y[9]
        {
        cursor_y = _y[8]
        }
        else if cursor_y = _y[10]
        {
        cursor_y = _y[9]
        }
    } else if keyboard_check_pressed(global.kb_q) {
        audio_play_sound(sndselect,0,0)    
    
        switch global.pl_count {
            case 0: 
            case 1:
                if cursor_x2 = x1 { cursor_x2 = x2; global.current_inv = 4 }
                else { cursor_x2 = x1; global.current_inv = 0 }
                break;
            case 2:
                if cursor_x2 = x1 { cursor_x2 = x3; global.current_inv = 4 }
                else if cursor_x2 = x3 { cursor_x2 = x2; global.current_inv = 1 }
                else { cursor_x2 = x1; global.current_inv = 0 }
                break;
            case 3:
                if cursor_x2 = x1 { cursor_x2 = x4; global.current_inv = 4 }
                else if cursor_x2 = x2 { cursor_x2 = x1; global.current_inv = 0 }
                else if cursor_x2 = x3 { cursor_x2 = x2; global.current_inv = 1 }
                else if cursor_x2 = x4 { cursor_x2 = x3; global.current_inv = 2 }
                break;
            case 4:
                if cursor_x2 = x1 { cursor_x2 = x5; global.current_inv = 4 }
                else if cursor_x2 = x2 { cursor_x2 = x1; global.current_inv = 0 }
                else if cursor_x2 = x3 { cursor_x2 = x2; global.current_inv = 1 }
                else if cursor_x2 = x4 { cursor_x2 = x3; global.current_inv = 2 }
                else if cursor_x2 = x5 { cursor_x2 = x4; global.current_inv = 3 }
                break;
        }
        
        event_user(0)
    } else if keyboard_check_pressed(global.kb_w) {
        audio_play_sound(sndselect,0,0)
        
        switch global.pl_count {
            case 0: 
            case 1:
                if cursor_x2 = x1 { cursor_x2 = x2; global.current_inv = 4 }
                else { cursor_x2 = x1; global.current_inv = 0 }
                break;
            case 2:
                if cursor_x2 = x2 { cursor_x2 = x3; global.current_inv = 4 }
                else if cursor_x2 = x1 { cursor_x2 = x2; global.current_inv = 1 }
                else { cursor_x2 = x1; global.current_inv = 0 }
                break;
            case 3:
                if cursor_x2 = x3 { cursor_x2 = x4; global.current_inv = 4 }
                else if cursor_x2 = x4 { cursor_x2 = x1; global.current_inv = 0 }
                else if cursor_x2 = x1 { cursor_x2 = x2; global.current_inv = 1 }
                else if cursor_x2 = x2 { cursor_x2 = x3; global.current_inv = 2 }
                break;
            case 4:
                if cursor_x2 = x4 { cursor_x2 = x5; global.current_inv = 4 }
                else if cursor_x2 = x5 { cursor_x2 = x1; global.current_inv = 0 }
                else if cursor_x2 = x1 { cursor_x2 = x2; global.current_inv = 1 }
                else if cursor_x2 = x2 { cursor_x2 = x3; global.current_inv = 2 }
                else if cursor_x2 = x3 { cursor_x2 = x4; global.current_inv = 3 }
                break;
        }
        
        event_user(0)
    } else if keyboard_check_pressed(global.kb_choose) {
        if global.current_inv &lt; 4 {
            if !is_undefined(num) and ok and global.pl_count != 0 { //and !global.dead[global.current_inv+1] {
                ok = 0
                audio_play_sound(sndchoose,0,0)
                if !storage_mode and !shop_mode {
                    var a = instance_create(x+125,y+80,objInvUseMenu);
                    a.num = num
                    a.num_val = num_val
                } else if shop_mode {
                    object.item = num
                    object.item2 = num_val
                    object.price = ceil(global.item[num,19]/2)
                    instance_destroy()
                } else if storage_mode {
                    object.item = num
                    add_item_storage(num)
                    del_item_inv(num_val,global.current_inv)
                    //Dealing with equipment
                    if !item_exists(global.current_inv,global.weap_equip[global.current_inv+1]) {
                        global.weap_equip[global.current_inv+1] = 0
                        eqp_boosts(global.current_inv+1)
                    }
                    if !item_exists(global.current_inv,global.body_equip[global.current_inv+1]) {
                        global.body_equip[global.current_inv+1] = 0
                        eqp_boosts(global.current_inv+1)
                    }
                    if !item_exists(global.current_inv,global.arm_equip[global.current_inv+1]) {
                        global.arm_equip[global.current_inv+1] = 0
                        eqp_boosts(global.current_inv+1)
                    }
                    if !item_exists(global.current_inv,global.other_equip[global.current_inv+1]) {
                        global.other_equip[global.current_inv+1] = 0
                        eqp_boosts(global.current_inv+1)
                    }
                    global.current_inv = 0
                    instance_destroy()
                }
            }
        }
    } else if keyboard_check_pressed(global.kb_back) {
        if instance_exists(objInGameMenu) {
            objHealthBar.visible = 1
            objAilmentsBubble.visible = 1
            with objInGameMenu {alarm[0] = 1}
        }
        if storage_mode or shop_mode {
            object.item = 0;
        }
        global.current_inv = 0
        audio_play_sound(sndback,0,0)
        instance_destroy()
    }
}
</string>
          </argument>
        </arguments>
      </action>
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Does all the work

if cursor_x = _x[1] and cursor_y = _y[1] { num = inv[1]; num_val = 0; }
if cursor_x = _x[2] and cursor_y = _y[1] { num = inv[2]; num_val = 1; }
if cursor_x = _x[1] and cursor_y = _y[2] { num = inv[3]; num_val = 2; }
if cursor_x = _x[2] and cursor_y = _y[2] { num = inv[4]; num_val = 3; }
if cursor_x = _x[1] and cursor_y = _y[3] { num = inv[5]; num_val = 4; }
if cursor_x = _x[2] and cursor_y = _y[3] { num = inv[6]; num_val = 5; }
if cursor_x = _x[1] and cursor_y = _y[4] { num = inv[7]; num_val = 6; }
if cursor_x = _x[2] and cursor_y = _y[4] { num = inv[8]; num_val = 7; }
if cursor_x = _x[1] and cursor_y = _y[5] { num = inv[9]; num_val = 8; }
if cursor_x = _x[2] and cursor_y = _y[5] { num = inv[10]; num_val = 9; }
if cursor_x = _x[1] and cursor_y = _y[6] { num = inv[11]; num_val = 10; }
if cursor_x = _x[2] and cursor_y = _y[6] { num = inv[12]; num_val = 11; }
if cursor_x = _x[1] and cursor_y = _y[7] { num = inv[13]; num_val = 12; }
if cursor_x = _x[2] and cursor_y = _y[7] { num = inv[14]; num_val = 13; }
if cursor_x = _x[1] and cursor_y = _y[8] { num = inv[15]; num_val = 14; }
if cursor_x = _x[2] and cursor_y = _y[8] { num = inv[16]; num_val = 15; }
if cursor_x = _x[1] and cursor_y = _y[9] { num = inv[17]; num_val = 16; }
if cursor_x = _x[2] and cursor_y = _y[9] { num = inv[18]; num_val = 17; }
if cursor_x = _x[1] and cursor_y = _y[10] { num = inv[19]; num_val = 18; }
if cursor_x = _x[2] and cursor_y = _y[10] { num = inv[20]; num_val = 19; }

x = view_xview
y = view_yview

cursor_timer +=0.25

if cursor_timer = 1
{
cursor_image_index +=1
cursor_timer = 0
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="10">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>equipment_symbol_check()
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>draw_set_alpha(1)
draw_set_font(global.thenfont)
draw_set_halign(fa_left)
draw_set_color(c_white)
draw_window(view_xview+72+v_offset,view_yview+32,30,19)
draw_window(view_xview+72+v_offset,view_yview+184,30,6)

if storage_mode or shop_mode {
    draw_window(view_xview+8+v_offset,view_yview+8,7,4)
    if storage_mode {
        draw_text(view_xview+20+v_offset,view_yview+18,"Storing...")
    } else {
        draw_text(view_xview+20+v_offset,view_yview+18,"Selling...")
    }
}

draw_text(_x[1],_y[1],eqp[1]+global.item[inv[1],1])
draw_text(_x[2],_y[1],eqp[2]+global.item[inv[2],1])
draw_text(_x[1],_y[2],eqp[3]+global.item[inv[3],1])
draw_text(_x[2],_y[2],eqp[4]+global.item[inv[4],1])
draw_text(_x[1],_y[3],eqp[5]+global.item[inv[5],1])
draw_text(_x[2],_y[3],eqp[6]+global.item[inv[6],1])
draw_text(_x[1],_y[4],eqp[7]+global.item[inv[7],1])
draw_text(_x[2],_y[4],eqp[8]+global.item[inv[8],1])
draw_text(_x[1],_y[5],eqp[9]+global.item[inv[9],1])
draw_text(_x[2],_y[5],eqp[10]+global.item[inv[10],1])
draw_text(_x[1],_y[6],eqp[11]+global.item[inv[11],1])
draw_text(_x[2],_y[6],eqp[12]+global.item[inv[12],1])
draw_text(_x[1],_y[7],eqp[13]+global.item[inv[13],1])
draw_text(_x[2],_y[7],eqp[14]+global.item[inv[14],1])
draw_text(_x[1],_y[8],eqp[15]+global.item[inv[15],1])
draw_text(_x[2],_y[8],eqp[16]+global.item[inv[16],1])
draw_text(_x[1],_y[9],eqp[17]+global.item[inv[17],1])
draw_text(_x[2],_y[9],eqp[18]+global.item[inv[18],1])
draw_text(_x[1],_y[10],eqp[19]+global.item[inv[19],1])
draw_text(_x[2],_y[10],eqp[20]+global.item[inv[20],1])

draw_set_font(global.thenfont2)

if !instance_exists(objInvUseMenu) {
    draw_text_ext(_x[1],y+190,global.item[num,2],12,300)
} else {
    if objInvUseMenu.message != "" {
        draw_text_ext(_x[1],y+190,objInvUseMenu.message,12,300)
    } else {
        draw_text_ext(_x[1],y+190,global.item[num,2],12,300)
    }
}

draw_sprite(spr_cursor,cursor_image_index,cursor_x-3,cursor_y+8)

switch global.pl_count {
    case 0: 
        draw_sprite(sprPortraits,3,view_xview+72+v_offset,y+8);
        draw_sprite(sprPortraits,5,view_xview+72+v_offset+23,y+8);
        break;
    case 1:
        draw_sprite(sprPortraits,0,view_xview+72+v_offset,y+8);
        draw_sprite(sprPortraits,5,view_xview+72+v_offset+23,y+8);
        break;
    case 2:
        draw_sprite(sprPortraits,0,view_xview+72+v_offset,y+8);
        draw_sprite(sprPortraits,1,view_xview+72+v_offset+23,y+8);
        draw_sprite(sprPortraits,5,view_xview+72+v_offset+46,y+8);
        break;
    case 3:
        draw_sprite(sprPortraits,0,view_xview+72+v_offset,y+8);
        draw_sprite(sprPortraits,1,view_xview+72+v_offset+23,y+8);
        draw_sprite(sprPortraits,2,view_xview+72+v_offset+46,y+8);
        draw_sprite(sprPortraits,5,view_xview+72+v_offset+69,y+8);
        break;
    case 4:
        draw_sprite(sprPortraits,0,view_xview+72+v_offset,y+8);
        draw_sprite(sprPortraits,1,view_xview+72+v_offset+23,y+8);
        draw_sprite(sprPortraits,2,view_xview+72+v_offset+46,y+8);
        draw_sprite(sprPortraits,3,view_xview+72+v_offset+69,y+8);
        draw_sprite(sprPortraits,5,view_xview+72+v_offset+92,y+8);
        break;
}

draw_sprite(sprInvSel,0,view_xview+72+cursor_x2,y+8)
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints>
    <point>0,0</point>
    <point>160,160</point>
  </PhysicsShapePoints>
</object>
