Sobeman459
Member
Im trying to get this snippit to work but i get and error on this line "loot2 = rand($LOOT.size)"
Code:
def gain_random_loot
case $game_variables[2]
when 1
$LOOT = [153, 154, 155, 156, 157, 158, 159]
when 5
$LOOT = [142, 143, 144, 145, 146, 147, 148, 149, 150, 151]
end
loot2 = rand($LOOT.size)
$game_party.gain_item($LOOT[loot2], 1)
@help_window.set_text("You stole a " + $data_items[$LOOT[loot2]].name + "!", 1)
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
break
end
end
$game_variables[2] += 1
$scene = Scene_Map.new
end