"Nuclear" lua string.

  • QuentinADay
    9th Oct 2014 Member 2 Permalink

    local a = elements.allocate("XXXX" , "AAAA")
    elements.element(a, elements.element(elements.DEFAULT_PT_PLUT))
    elements.property(a, "Name" , "XXXX")
    elements.property(a, "Description" , "Kinda like PLUT")
    function plutonium(i,x,y,s,n)
    if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.neut.id then
    if math.random(1,3) == 1 then
    tpt.parts[i].type = tpt.el.neut.id
    sim.pressure(x/4,y/4,75)
    tpt.set_property("temp", math.huge, x, y)
    elseif math.random(1,3) == 2 then
    tpt.parts[i].type = tpt.el.lava.id
    sim.pressure(x/4,y/4,75)
    tpt.set_property("temp", math.huge, x, y)
    elseif math.random(1,3) == 3 then
    tpt.parts[i].type = tpt.el.uran.id
    sim.pressure(x/4,y/4,75)
    tpt.set_property("temp", math.huge, x ,y)
    end
    end
    if sim.pressure(x/4,y/4) > 1 then
    if math.random(1,250) == 10 then
    tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'neut')
    end
    end
    end
    tpt.element_func(plutonium,a)

    function neutron(i,x,y,s,n)
    if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == a then
    if math.random(1,30) == 10 then
    tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'neut')
    end
    end
    end
    tpt.element_func(neutron,tpt.el.neut.id)

     

    Here, its a bit like Plutonium, it needs work but its more or less what PLUT does

  • RCAProduction
    16th Oct 2014 Member 1 Permalink

    Thanks quentin, the first reasonable reply if you ask me.

  • QuentinADay
    16th Oct 2014 Member 0 Permalink

    Thanks and No Problem 

  • boxmein
    16th Oct 2014 Former Staff 1 Permalink
    Considering they (1) said they were creating a new element, (2) asked for help rather than feeding them the code, it's fairly safe to assume that they were asking for help. As it turned out, it was code handouts. Glad you delivered, but they should be up front about wanting someone to do their work for them, rather than asking for help on how to write the element, and sorta expecting someone to write the entire element for them for free.
  • DanielGalrito
    17th Oct 2014 Member 0 Permalink

    @QuentinADay (View Post)

     That must be overpowered plutonium o.O

  • QuentinADay
    20th Oct 2014 Member 0 Permalink

    Every time I try to make one property more realistic it causes another to be less realistic so I couldn't really help making it overpowered