IceDragon200

D: HOLY CRAP

Jul 24th, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.98 KB | None | 0 0
  1.   def update_input
  2.     if Input.trigger?(Input::C)
  3.       if @windows["Inventory"].active
  4.         Sound.play_decision
  5.         act_inv_win_active(false)
  6.         act_inv_visible(true)
  7.       elsif @windows["MainInve"].active
  8.         Sound.play_decision
  9.         inv_win_active(false)
  10.         inv_act_visible(true)
  11.       elsif @windows["Act_To_Inventory"].active
  12.         case @windows["Act_To_Inventory"].commands[@windows["Act_To_Inventory"].index]
  13.         when IEX::ACTOR_INVENTORY::USE_ITEM
  14.           Sound.play_decision
  15.           use_actor_item
  16.         when IEX::ACTOR_INVENTORY::SWITCH_TO_INVENTORY
  17.           if @actor.is_a_merchant?
  18.             Sound.play_buzzer
  19.           else  
  20.             Sound.play_decision
  21.             inv_win_active(true)
  22.             act_inv_visible(false)
  23.           end  
  24.         when IEX::ACTOR_INVENTORY::SEND_TO_INVENTORY
  25.           unless @windows["Inventory"].item == nil
  26.             if @actor.is_a_merchant?
  27.               Sound.play_buzzer
  28.             else  
  29.               Sound.play_decision
  30.               @to_actor = false
  31.               @to_inventory = true
  32.               act_inv_visible(false)
  33.               start_send_to_inventory
  34.             end
  35.           else
  36.             Sound.play_buzzer
  37.             @windows["MainHelp"].set_header("Item Invalid", 0, 0)
  38.           end
  39.         when IEX::ACTOR_INVENTORY::SEND_ALL_TO_INVENTORY
  40.           if @actor.is_a_merchant?
  41.             Sound.play_buzzer
  42.           else  
  43.             unless @actor.inventory.empty?
  44.               Sound.play_decision
  45.               send_item_to_inventory(true)
  46.               refresh_inventory
  47.             else
  48.               Sound.play_buzzer
  49.               @windows["MainHelp"].set_header("No Items", 0, 0)
  50.             end
  51.           end  
  52.         when IEX::ACTOR_INVENTORY::CANCEL
  53.           Sound.play_cancel
  54.           act_inv_win_active(true)
  55.           act_inv_visible(false)
  56.         end  
  57.       elsif @windows["Inventory_To_Act"].active
  58.         case @windows["Inventory_To_Act"].commands[@windows["Inventory_To_Act"].index]
  59.         when IEX::ACTOR_INVENTORY::USE_ITEM
  60.           Sound.play_decision
  61.           use_inventory_item
  62.         when IEX::ACTOR_INVENTORY::SWITCH_TO_ACTOR
  63.           Sound.play_decision
  64.           act_inv_win_active(true)
  65.           inv_act_visible(false)
  66.         when IEX::ACTOR_INVENTORY::SEND_TO_ACTOR
  67.           unless @windows["MainInve"].item == nil
  68.             Sound.play_decision
  69.             @to_actor = true
  70.             @to_inventory = false
  71.             inv_act_visible(false)
  72.             start_send_to_actor
  73.           else
  74.             Sound.play_buzzer
  75.             @windows["MainHelp"].set_header("Item Invalid", 0, 0)
  76.           end
  77.         when IEX::ACTOR_INVENTORY::CANCEL
  78.           Sound.play_cancel
  79.           inv_win_active(true)
  80.           inv_act_visible(false)
  81.         end
  82.       elsif @windows["Number"].active
  83.          Sound.play_decision
  84.          if @to_actor
  85.            send_item_to_actor
  86.            inv_win_active(true)
  87.            #inv_act_visible(true)
  88.          elsif @to_inventory
  89.            send_item_to_inventory
  90.            act_inv_win_active(true)
  91.            #act_inv_visible(true)
  92.          end
  93.          refresh_inventory
  94.          @to_actor = false
  95.          @to_inventory = false
  96.          number_visible(false)
  97.        elsif @windows["Confirm"].active
  98.          case @windows["Confirm"].commands[@windows["Confirm"].index]
  99.          when IEX::ACTOR_INVENTORY::CONFIRM
  100.            Sound.play_decision
  101.            return_scene
  102.          when IEX::ACTOR_INVENTORY::CANCEL
  103.            Sound.play_cancel
  104.            if @to_actor
  105.              act_inv_win_active(true)
  106.            elsif @to_inventory
  107.              inv_win_active(true)
  108.            end  
  109.             @to_actor = false
  110.             @to_inventory = false
  111.             confirm_visible(false)
  112.          end  
  113.       end
  114.     elsif Input.trigger?(Input::B)
  115.       if @windows["Inventory"].active
  116.         Sound.play_cancel
  117.         @to_actor = true
  118.         @to_inventory = false
  119.         act_inv_win_active(false)
  120.         confirm_visible(true)
  121.       elsif @windows["MainInve"].active
  122.         Sound.play_cancel
  123.         @to_inventory = true
  124.         @to_actor = false
  125.         inv_win_active(false)
  126.         confirm_visible(true)
  127.       elsif @windows["Act_To_Inventory"].active
  128.         Sound.play_cancel
  129.         act_inv_win_active(true)
  130.         act_inv_visible(false)
  131.       elsif @windows["Inventory_To_Act"].active
  132.         Sound.play_cancel
  133.         inv_win_active(true)
  134.         inv_act_visible(false)
  135.       elsif @windows["Number"].active
  136.         Sound.play_cancel
  137.          if @to_actor
  138.            inv_act_visible(true)
  139.            number_visible(false)
  140.            @to_actor = false
  141.          elsif @to_inventory
  142.            act_inv_visible(true)
  143.            number_visible(false)
  144.            @to_inventory = false
  145.          end
  146.       elsif @windows["Confirm"].active
  147.          Sound.play_cancel
  148.          if @to_actor
  149.            act_inv_win_active(true)
  150.          elsif @to_inventory
  151.            inv_win_active(true)
  152.          end  
  153.           @to_actor = false
  154.           @to_inventory = false
  155.           confirm_visible(false)
  156.         end
  157.       elsif Input.trigger?(Input::L)
  158.         for i in 0..$game_party.members.size
  159.           act = $game_party.members[i]
  160.           next if act == nil
  161.           if act.id == @actor.id
  162.             act_index = (i - 1) % $game_party.members.size
  163.             break
  164.           else
  165.             act_index = i
  166.           end
  167.         end  
  168.         $scene = IEX_Scene_Actor_Inventory.new($game_party.members[act_index])
  169.       elsif Input.trigger?(Input::R)
  170.         for i in 0..$game_party.members.size
  171.           act = $game_party.members[i]
  172.           next if act == nil
  173.           if act.id == @actor.id
  174.             act_index = (i + 1) % $game_party.members.size
  175.             break
  176.           else
  177.             act_index = i
  178.           end
  179.         end
  180.         $scene = IEX_Scene_Actor_Inventory.new($game_party.members[act_index])
  181.     end
  182.   end
Advertisement
Add Comment
Please, Sign In to add comment