You can visit my...

User Page | Scratch Profile | Talk Page | Contrib's | Sandbox

Gaza101 logo.png

Welcome to Gaza101's User-page!

Hello there! I'm Gareth and I've been Scratching for more than four years now. I applied for the wiki in February 2014 and here I am!

My goal on the wiki is to keep this place organised, up-to-date, and to make it useful and clear for New Scratchers.

That's about it.

Want Some <scratchblocks>? Here you go:

Ported from Smiley Creations 80a...

define update block visibility
set [worldupdateitem v] to [0]
repeat (length of [worldBlockVisibility v])
    change [worldupdateitem v] by (1)
    if <<<((item (worldupdateitem) of [worldx v]) + (blocksposx)) < [-240]> or <((item (worldupdateitem) of [worldx v]) + (blocksposx)) > [240]>> or <<((item (worldupdateitem) of [worldy v]) + (blocksposy)) < [-160]> or <((item (worldupdateitem) of [worldy v]) + (blocksposy)) > [180]>>> then
        if <not <(item (worldupdateitem) of [worldBlockVisibility v]) = [0]>> then
            replace item (worldupdateitem) of [worldBlockVisibility v] with [0]
        end
    else
        if <not <(item (worldupdateitem) of [worldBlockVisibility v]) = [1]>> then
            replace item (worldupdateitem) of [worldBlockVisibility v] with [1]
        end
    end
end


define generate world (size) ²
show variable [load% v]
delete (all v) of [world v]
delete (all v) of [worldBlockVisibility v]
delete (all v) of [worldx v]
delete (all v) of [worldy v]
delete (all v) of [worldData v]
set [load v] to [0]
set [load% v] to [0%]
repeat ((size) * (size))
    add [1] to [world v]
    add [0] to [worldBlockVisibility v]
    add [] to [worldData v]
    change [load v] by (((100) / (((size) * (size)) * (5))) * (3))
    set [load% v] to (join (round (load)) [%])
end
repeat (size)
    add (((((size) - (1)) * (16)) / (2)) * (-1)) to [worldx v]
    change [load v] by ((100) / (((size) * (size)) * (5)))
    set [load% v] to (join (round (load)) [%])
    repeat ((size) - (1))
        add ((item (last v) of [worldx v]) + (16)) to [worldx v]
        change [load v] by ((100) / (((size) * (size)) * (5)))
        set [load% v] to (join (round (load)) [%])
    end
end
add ((((size) - (1)) * (16)) / (2)) to [worldy v]
change [load v] by ((100) / (((size) * (size)) * (5)))
set [load% v] to (join (round (load)) [%])
repeat ((size) - (1))
    add (item (last v) of [worldy v]) to [worldy v]
    change [load v] by ((100) / (((size) * (size)) * (5)))
    set [load% v] to (join (round (load)) [%])
end
repeat ((size) - (1))
    add ((item (last v) of [worldy v]) - (16)) to [worldy v]
    change [load v] by ((100) / (((size) * (size)) * (5)))
    set [load% v] to (join (round (load)) [%])
    repeat ((size) - (1))
        add (item (last v) of [worldy v]) to [worldy v]
        change [load v] by ((100) / (((size) * (size)) * (5)))
        set [load% v] to (join (round (load)) [%])
    end
end
set [load% v] to [100%]
hide variable [load% v]


define explode ID: (eID)
destroy block at ID: (((eID) - (3)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) - (2)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) - (1)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: ((eID) - (([sqrt v] of (length of [world v])) * (3))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) + (1)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) + (2)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) + (3)) - (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) + (48)) with mode: (3)
destroy block at ID: (((eID) - (3)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) + (32)) with mode: (3)
destroy block at ID: (((eID) - (2)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) + (32)) with mode: (1)
destroy block at ID: (((eID) - (1)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) + (32)) with mode: (0)
destroy block at ID: ((eID) - (([sqrt v] of (length of [world v])) * (2))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) + (32)) with mode: (0)
destroy block at ID: (((eID) + (1)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) + (32)) with mode: (0)
destroy block at ID: (((eID) + (2)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) + (32)) with mode: (1)
destroy block at ID: (((eID) + (3)) - (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) + (32)) with mode: (3)
destroy block at ID: (((eID) - (3)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) + (16)) with mode: (3)
destroy block at ID: (((eID) - (2)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) + (16)) with mode: (0)
destroy block at ID: (((eID) - (1)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) + (16)) with mode: (0)
destroy block at ID: ((eID) - ([sqrt v] of (length of [world v]))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) + (16)) with mode: (0)
destroy block at ID: (((eID) + (1)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) + (16)) with mode: (0)
destroy block at ID: (((eID) + (2)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) + (16)) with mode: (0)
destroy block at ID: (((eID) + (3)) - ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) + (16)) with mode: (3)
destroy block at ID: ((eID) - (3)) x: ((item (eID) of [worldx v]) - (48)) y: (item (eID) of [worldy v]) with mode: (3)
destroy block at ID: ((eID) - (2)) x: ((item (eID) of [worldx v]) - (32)) y: (item (eID) of [worldy v]) with mode: (0)
destroy block at ID: ((eID) - (1)) x: ((item (eID) of [worldx v]) - (16)) y: (item (eID) of [worldy v]) with mode: (0)
destroy block at ID: (eID) x: (item (eID) of [worldx v]) y: (item (eID) of [worldy v]) with mode: (2)
destroy block at ID: ((eID) + (1)) x: ((item (eID) of [worldx v]) + (16)) y: (item (eID) of [worldy v]) with mode: (0)
destroy block at ID: ((eID) + (2)) x: ((item (eID) of [worldx v]) + (32)) y: (item (eID) of [worldy v]) with mode: (0)
destroy block at ID: ((eID) + (3)) x: ((item (eID) of [worldx v]) + (48)) y: (item (eID) of [worldy v]) with mode: (3)
destroy block at ID: (((eID) - (3)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) - (16)) with mode: (3)
destroy block at ID: (((eID) - (2)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) - (16)) with mode: (0)
destroy block at ID: (((eID) - (1)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) - (16)) with mode: (0)
destroy block at ID: ((eID) + ([sqrt v] of (length of [world v]))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) - (16)) with mode: (0)
destroy block at ID: (((eID) + (1)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) - (16)) with mode: (0)
destroy block at ID: (((eID) + (2)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) - (16)) with mode: (0)
destroy block at ID: (((eID) + (3)) + ([sqrt v] of (length of [world v]))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) - (16)) with mode: (3)
destroy block at ID: (((eID) - (3)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) - (32)) with mode: (3)
destroy block at ID: (((eID) - (2)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) - (32)) with mode: (1)
destroy block at ID: (((eID) - (1)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) - (32)) with mode: (0)
destroy block at ID: ((eID) + (([sqrt v] of (length of [world v])) * (2))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) - (32)) with mode: (0)
destroy block at ID: (((eID) + (1)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) - (32)) with mode: (0)
destroy block at ID: (((eID) + (2)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) - (32)) with mode: (1)
destroy block at ID: (((eID) + (3)) + (([sqrt v] of (length of [world v])) * (2))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) - (32)) with mode: (3)
destroy block at ID: (((eID) - (3)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (48)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: (((eID) - (2)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (32)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: (((eID) - (1)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) - (16)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: ((eID) + (([sqrt v] of (length of [world v])) * (3))) x: (item (eID) of [worldx v]) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: (((eID) + (1)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (16)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: (((eID) + (2)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (32)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)
destroy block at ID: (((eID) + (3)) + (([sqrt v] of (length of [world v])) * (3))) x: ((item (eID) of [worldx v]) + (48)) y: ((item (eID) of [worldy v]) - (48)) with mode: (3)


define destroy block at ID: (dID) x: (x) y: (y) with mode: (mode)
if <<not <<(dID) < [1]> or <(dID) > (length of [world v])>>> and <<[worldx v] contains (x)> and <[worldy v] contains (y)>>> then
    if <(mode) = [0]> then
        if <<(item (dID) of [world v]) = [26]> or <(item (dID) of [world v]) = [27]>> then
            if <(item (dID) of [world v]) = [26]> then
                replace item (dID) of [worldData v] with (pick random (2) to (6))
                replace item (dID) of [world v] with [27]
            end
        else
            replace item (dID) of [world v] with [1]
        end
    end
    if <(mode) = [1]> then
        if <(pick random (1) to (2)) = [1]> then
            if <<(item (dID) of [world v]) = [26]> or <(item (dID) of [world v]) = [27]>> then
                if <(item (dID) of [world v]) = [26]> then
                    replace item (dID) of [worldData v] with (pick random (2) to (6))
                    replace item (dID) of [world v] with [27]
                end
            else
                replace item (dID) of [world v] with [1]
            end
        end
    end
    if <(mode) = [2]> then
        if <(item (dID) of [world v]) = [26]> then
            replace item (dID) of [worldData v] with (pick random (2) to (6))
            replace item (dID) of [world v] with [27]
        else
            replace item (dID) of [world v] with [1]
        end
    end
    if <(mode) = [3]> then
        if <(pick random (1) to (2)) = [1]> then
            if <(item (dID) of [world v]) = [26]> then
                replace item (dID) of [worldData v] with (pick random (2) to (6))
                replace item (dID) of [world v] with [27]
            end
        end
    end
end