gg.setSpeed(0.8)
gg.searchNumber('0.5~1.2;0.3~0.8;0.1~0.5', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local list = gg.getResults(100)
for i = 1, #list do
    if list[i].value > 0.4 then
        list[i].value = 0.0
    end
end
gg.setResults(list)

gg.searchNumber('0.05;0.1;0.15', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local spread = gg.getResults(10)
for i = 1, #spread do
    spread[i].value = 0.0
    spread[i].freeze = true
end
gg.setResults(spread)

gg.searchNumber('40;50;60', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local damage = gg.getResults(50)
for i = 1, #damage do
    if damage[i].value >= 40 then
        damage[i].value = 999.0
        damage[i].freeze = true
    end
end
gg.setResults(damage)

gg.searchNumber('1.0', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local hitbox = gg.getResults(20)
for i = 1, #hitbox do
    local v = gg.getNearby(hitbox[i].address - 0x10, gg.TYPE_DWORD, 1, 0)
    if v and v[1] and v[1].value == 0x437F0000 then
        hitbox[i].value = 5.0
        hitbox[i].freeze = true
    end
end
gg.setResults(hitbox)

gg.searchNumber('800', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local speed = gg.getResults(10)
for i = 1, #speed do
    speed[i].value = 9999.0
    speed[i].freeze = true
end
gg.setResults(speed)

gg.searchNumber('0.08;0.1', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local rate = gg.getResults(10)
for i = 1, #rate do
    rate[i].value = 0.01
    rate[i].freeze = true
end
gg.setResults(rate)

gg.searchNumber('BulletVelocity', gg.TYPE_FLOAT, true, gg.SIGN_EQUAL, 0, -1)
local bullets = gg.getResults(50)
for i = 1, #bullets, 3 do
    if i+2 <= #bullets then
        local x = bullets[i+0].value
        local y = bullets[i+1].value
        local z = bullets[i+2].value
        local dx, dy, dz = 100-x, 5-y, 80-z
        local len = (dx*dx + dy*dy + dz*dz)^0.5
        if len > 1 then
            dx, dy, dz = dx/len, dy/len, dz/len
            bullets[i+0].value = dx * 5000
            bullets[i+1].value = dy * 5000
            bullets[i+2].value = dz * 5000
        end
    end
end
gg.setResults(bullets)

gg.searchNumber('9.8', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)  -- 重力
local gravity = gg.getResults(5)
for i = 1, #gravity do
    gravity[i].value = 0.0
end
gg.setResults(gravity)
