local function SHEG(i,x,y,s,n) local c=math.random(0,300) if c==60 then tpt.set_property("dcolour",0xFFFF0080,i) end if c==120 then tpt.set_property("dcolour",0xFFFF2080,i) end if c==180 then tpt.set_property("dcolour",0xFFFF4080,i) end if c==240 then tpt.set_property("dcolour",0xFFFF60080,i) end if c==300 then tpt.set_property("dcolour",0xFFFF8080,i) end --Creating SEG function begin local s=math.random(0,20000) if s==60 then tpt.create(x + math.sin(math.random(0, 4)), y + math.cos(math.random(0, 4)), "SEG") end --Creating SEG function end end tpt.element_func(SHEG,elements.KSMOD_PT_SHEG)
function SEG(i, x, y, s, n) tpt.set_property("life", "100", x, y) tick1 = math.random(1, 10) if tick1 == 1 then xxx = {1,-1,1,-1,1,0,-1,0} yyy = {1,-1,-1,1,0,1,0,-1} for l = 1, 8 do tpt.set_property("type", "NONE", x+xxx[l], y+yyy[l]) end end tick2 = math.random(0, 300) if tick2 == 50 then tpt.delete(x, y) end end tpt.element_func(SEG,elements.KSMOD_PT_SEG)
In this script i used parts of other scripts:
MrSalit0s's mod - GOLD color script
FeynmanLogomaker's BPDR mod - some element properties
powderisfalling's PowderIsFallingMod 2.0.0 - part of WFLM code
Luezma's mod - part of SMKS code (as an example of using tpt.create function)
Thanx to these guys. Sorry for using your code. I dont know LUA =)
And sorry for not using code tags, it not working for me for some reason.