def calculate
a = $game_variables
arr = [a[51],a[52],a[53],a[54],a[55],a[56],a[57]]
arr.each_index do |i|
arr[i] = arr[i].to_sym if arr[i].is_a?(String)
end
loop do
break if !arr.any?{|i| i.is_a?(Symbol)}
dm = arr.include?(:*) || arr.include?(:/)
arr.each_index do |i|
next unless arr[i].is_a?(Symbol)
next if dm && ![:*,:/].include?(arr[i])
arr[i-1] = arr[i-1].send(arr[i],arr[i+1])
arr.delete_at(i + 1)
arr.delete_at(i)
break
end
end
$game_variables[100] = arr[0]
end
def calculate
a = $game_variables
arr = [a[51],a[52],a[53],a[54],a[55],a[56],a[57]]
arr.each_index do |i|
arr[i] = arr[i].to_sym if arr[i].is_a?(String)
end
loop do
break if !arr.any?{|i| i.is_a?(Symbol)}
dm = arr.include?(:*) || arr.include?(:/)
arr.each_index do |i|
next unless arr[i].is_a?(Symbol)
next if dm && ![:*,:/].include?(arr[i])
arr[i-1] = arr[i-1].send(arr[i],arr[i+1])
arr.delete_at(i + 1)
arr.delete_at(i)
break
end
end
$game_variables[100] = arr[0]
end