== 是判定
= 是賦值
if user.state?(269) && user.luk >=50 if user.luk >= 50 $game_variables[101] = rand(300) elsif user.luk >= 60 $game_variables[101] = rand(500) elsif user.luk >= 70 $game_variables[101] = rand(850) elsif user.luk >= 80 $game_variables[101] = rand(1000) end end
if user.state?(269) && user.luk >=50
if user.luk >= 50
$game_variables[101] = rand(300)
elsif user.luk >= 60
$game_variables[101] = rand(500)
elsif user.luk >= 70
$game_variables[101] = rand(850)
elsif user.luk >= 80
$game_variables[101] = rand(1000)
end
end
所以應該是這樣 |