Flammable Everything script

  • FeynmanLogomaker
    16th Sep 2013 Member 0 Permalink

     

    allburn = function()
    for k = 1, 145 do
    if k ~= 11 and k ~= 130 then
    local str = 'tpt.el.' .. string.gsub(string.lower(tpt.element(k)), '-', '') .. '.flammable=9999'
    local f = io.open('allburn','w')
    f:write(str)
    f:close()
    dofile('allburn')
    end
    end

     

    To use, just call the function allburn() in the console.

     

    An interesting glitch with this feature.
    Edited once by FeynmanLogomaker. Last: 16th Sep 2013
  • nucular
    16th Sep 2013 Member 0 Permalink

    WTF, dat code...

    Still fun, though.

  • mniip
    16th Sep 2013 Developer 0 Permalink
    @FeynmanLogomaker (View Post)
    1) t.a == t["a"]
    2) there exists loadstring
  • boxmein
    16th Sep 2013 Former Staff 0 Permalink
    @FeynmanLogomaker (View Post)
    function burnitall (i)
    for k, _ in pairs(tpt.el) do
    tpt.el[k].flammable = i
    end
    end
  • mniip
    16th Sep 2013 Developer 0 Permalink
    1) i don't think tpt.el has any actual pairs
    2) > k,_
  • FeynmanLogomaker
    19th Sep 2013 Member 0 Permalink

    @mniip (View Post)

     Yes, but I have a bug that causes loadstring not to work...I would have done that, except it wouldn't work for me.