OP Explosives LUA mod

  • batman333
    21st May 2014 Member 2 Permalink

    I made a mod for people who are tired of tpt's weak as explosives, This mod makes explosives WAAAAAY more powerful and adds three more.

    And to everyone I am a noob beginer so this mod is really simple and kinda sucky- plus I learnt how to make it by altering someone elses mod so don't say this is a copy.

    This mod is really derpy now that I think about it but here it is.

    Ask if you want me to add any other elements but they might not turn out right...(EDITED)

    tpt.message_box("OP explosives","Makes all explosives completely over powered.")
    tpt.el.dest.flammable=1000
    tpt.el.fire.flammable=9999
    tpt.el.fire.explosive=9999
    tpt.el.tnt.flammable=5
    tpt.el.fire.explosive=9999

    local a = elements.allocate("X", "C")
    elements.element(elements.X_PT_C, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_C, "Name", "FLUB")
    elements.property(elements.X_PT_C, "Description", "Flubber-highly explosive heavy gas like powder.")
    elements.property(elements.X_PT_C, "Colour", 0xFFFF66)
    elements.property(elements.X_PT_C, "MenuSection", 5)
    elements.property(elements.X_PT_C, "Gravity", 1)
    elements.property(elements.X_PT_C, "Flammable", 9999)
    elements.property(elements.X_PT_C, "Explosive", 9999)
    elements.property(elements.X_PT_C, "Weight", 20)
    elements.property(elements.X_PT_C, "Diffusion", 10)
    elements.property(elements.X_PT_C, "Falldown", 1)

    local a = elements.allocate("X", "B")
    elements.element(elements.X_PT_B, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_B, "Name", "EXPL")
    elements.property(elements.X_PT_B, "Description", "Explode-base destroying explosive powder-beware can displace diamond.")
    elements.property(elements.X_PT_B, "Colour", 0xFFFF66)
    elements.property(elements.X_PT_B, "MenuSection", 5)
    elements.property(elements.X_PT_B, "Gravity", 1)
    elements.property(elements.X_PT_B, "Flammable", 5)
    elements.property(elements.X_PT_B, "Explosive", 5)
    elements.property(elements.X_PT_B, "Weight", 1000)
    elements.property(elements.X_PT_B, "Diffusion", 0.5)
    elements.property(elements.X_PT_B, "Falldown", 1)

    local a = elements.allocate("X", "A")
    elements.element(elements.X_PT_A, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_A, "Name", "BOOM")
    elements.property(elements.X_PT_A, "Description", "BOOM- Automatically explodes with a lightning bolt/s.")
    elements.property(elements.X_PT_A, "Colour", z)
    elements.property(elements.X_PT_A, "MenuSection", 5)
    elements.property(elements.X_PT_A, "Gravity", 1)
    elements.property(elements.X_PT_A, "Flammable", 0)
    elements.property(elements.X_PT_A, "Explosive", 9999)
    elements.property(elements.X_PT_A, "Weight", 0)
    elements.property(elements.X_PT_A, "Diffusion", 0.5)
    elements.property(elements.X_PT_A, "Falldown", 0)

    local q={0x99FFFF,0x9999FF,0xCCFF00,0x00FFCC,0x00CC00,0x330099}
    local z=q[math.random(1,6)]

    elements.property(elements.X_PT_A, "Colour", z)

    function light(i,x,y,s,n)
        if math.random(1,300000) == 10 then
            tpt.create(x + math.random(-1,1), y + math.random(-1,1),

    'ligh')
        end
    end
    tpt.element_func(light,a)

    Edited once by batman333. Last: 1st Jun 2014
  • Protcom
    21st May 2014 Member 0 Permalink

    @batman333 (View Post)

    did you test it there is an error but i fixed it

    after every description there is a new line and you didn't close the discrebtion with ) so tpt didn't count it but i fixed it just remove the extra lines and the script is awesome :D good work as a starter i need to do things like that

  • batman333
    21st May 2014 Member 0 Permalink

    Yes I did test it but I am a noobie a lua and I coudn't figure how to fix it.

  • Protcom
    21st May 2014 Member 0 Permalink

    @batman333 (View Post)

     ok i will fix it for you this is the fixed version it does the same

     I am also a noob at scripting so don't think that i am a pro

     

    tpt.message_box("OP explosives","Makes all explosives completely over powered.")
    tpt.el.dest.flammable=1000
    tpt.el.fire.flammable=9999
    tpt.el.fire.explosive=9999
    tpt.el.tnt.flammable=5
    tpt.el.fire.explosive=9999

    local a = elements.allocate("X", "C")
    elements.element(elements.X_PT_C, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_C, "Name", "FLUB")
    elements.property(elements.X_PT_C, "Description", "Flubber-highly explosive heavy gas like powder.")
    elements.property(elements.X_PT_C, "Colour", 0xFFFF66)
    elements.property(elements.X_PT_C, "MenuSection", 5)
    elements.property(elements.X_PT_C, "Gravity", 1)
    elements.property(elements.X_PT_C, "Flammable", 9999)
    elements.property(elements.X_PT_C, "Explosive", 9999)
    elements.property(elements.X_PT_C, "Weight", 20)
    elements.property(elements.X_PT_C, "Diffusion", 10)
    elements.property(elements.X_PT_C, "Falldown", 1)

    local a = elements.allocate("X", "B")
    elements.element(elements.X_PT_B, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_B, "Name", "EXPL")
    elements.property(elements.X_PT_B, "Description", "Explode-base destroying explosive powder-beware can displace diamond.")
    elements.property(elements.X_PT_B, "Colour", 0xFFFF66)
    elements.property(elements.X_PT_B, "MenuSection", 5)
    elements.property(elements.X_PT_B, "Gravity", 1)
    elements.property(elements.X_PT_B, "Flammable", 5)
    elements.property(elements.X_PT_B, "Explosive", 5)
    elements.property(elements.X_PT_B, "Weight", 1000)
    elements.property(elements.X_PT_B, "Diffusion", 0.5)
    elements.property(elements.X_PT_B, "Falldown", 1)

    local a = elements.allocate("X", "A")
    elements.element(elements.X_PT_A, elements.element(elements.DEFAULT_PT_WOOD))
    elements.property(elements.X_PT_A, "Name", "BOOM")
    elements.property(elements.X_PT_A, "Description", "BOOM- Automatically explodes with a lightning bolt/s.")
    elements.property(elements.X_PT_A, "Colour", z)
    elements.property(elements.X_PT_A, "MenuSection", 5)
    elements.property(elements.X_PT_A, "Gravity", 1)
    elements.property(elements.X_PT_A, "Flammable", 0)
    elements.property(elements.X_PT_A, "Explosive", 9999)
    elements.property(elements.X_PT_A, "Weight", 0)
    elements.property(elements.X_PT_A, "Diffusion", 0.5)
    elements.property(elements.X_PT_A, "Falldown", 0)

    local q={0x99FFFF,0x9999FF,0xCCFF00,0x00FFCC,0x00CC00,0x330099}
    local z=q[math.random(1,6)]

    elements.property(elements.X_PT_A, "Colour", z)

    function light(i,x,y,s,n)
        if math.random(1,300000) == 10 then
            tpt.create(x + math.random(-1,1), y + math.random(-1,1),

    'ligh')
        end
    end
    tpt.element_func(light,a)

    Edited 2 times by Protcom. Last: 23rd May 2014
  • batman333
    22nd May 2014 Member 0 Permalink

    Thanks.

  • Protcom
    22nd May 2014 Member 1 Permalink

    @batman333 (View Post)

     no problem :)

     also update your script so everyone can use it and i can delete mine

    Edited once by Protcom. Last: 22nd May 2014
  • chillinpenguin311
    29th Jun 2015 Member 1 Permalink

    How to download?

  • poolord66
    3rd Jul 2015 Member 0 Permalink

    im new to this whole thing how do you use this

     

  • io
    3rd Jul 2015 Member 0 Permalink

    Ifyou don't know about script manageres and you use windows do this:

    Open notepad and paste this, then save it in the same folder of TPT's executable file. Save it as autorun.lua (be carefull of select all file types, then put name). Open TPT.