Guest User

Untitled

a guest
Apr 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.45 KB | None | 0 0
  1.   def update_item_selection
  2.     if Input.trigger?(Input::B)
  3.           Sound.play_cancel
  4.           return_scene
  5.         elsif Input.trigger?(Input::C)
  6.           @item = @item_window.item
  7.           if @item != nil
  8.             $game_party.last_item_id = @item.id
  9.           end
  10.           if $game_party.item_can_use?(@item)
  11.             Sound.play_decision
  12.             determine_item
  13.           else
  14.             Sound.play_buzzer
  15.           end
  16.         elsif Input.trigger?( Input::NUMBERS[6] )
  17.             Sound.play_decision
  18.             id = @item_window.item.nil?() ? 0 : @item_window.item.id
  19.             $game_actors[1].set_item_slot(0, id)
  20.         elsif Input.trigger?( Input::NUMBERS[7] )
  21.             Sound.play_decision
  22.             id = @item_window.item.nil?() ? 0 : @item_window.item.id
  23.             $game_actors[1].set_item_slot(1, id)
  24.         elsif Input.trigger?( Input::NUMBERS[8] )
  25.             Sound.play_decision
  26.             id = @item_window.item.nil?() ? 0 : @item_window.item.id
  27.             $game_actors[1].set_item_slot(2, id)
  28.         elsif Input.trigger?( Input::NUMBERS[9] )
  29.             Sound.play_decision
  30.             id = @item_window.item.nil?() ? 0 : @item_window.item.id
  31.             $game_actors[1].set_item_slot(3, id)
  32.         elsif Input.trigger?( Input::NUMBERS[0] )
  33.             Sound.play_decision
  34.             id = @item_window.item.nil?() ? 0 : @item_window.item.id
  35.             $game_actors[1].set_item_slot(4, id)
  36.     end
  37.   end
Add Comment
Please, Sign In to add comment