Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unhide()
- elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SHD4, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SHD3, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SHD2, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_BIZS, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_RIME, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_LOLZ, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SPWN, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_BRAY, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_LOVE, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_EQVE, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_DYST, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_BIZG, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_FRZW, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_PSTS, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_EMBR, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHD4, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHD3, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHD2, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_BIZS, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_RIME, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_LOLZ, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SPWN, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_BRAY, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_LOVE, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_EQVE, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_DYST, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_BIZG, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_FRZW, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_PSTS, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_EMBR, "MenuVisible", 1)
- end
- moveicon=0
- iconx=100
- icony=100
- time=0
- tmp2=0
- icons=0
- checkbox1=0
- checkbox2=0
- checkbox3=0
- checkbox4=0
- checkbox5=0
- button1='unpressed'
- button2='unpressed'
- button3='unpressed'
- button4='unpressed'
- button5='unpressed'
- button6='unpressed'
- show=0
- filename='luamod.ini'
- --read config file--
- if tostring(fs.exists('luamod.ini'))=='true' then
- local f=io.open(filename,'rb')
- ab1=tonumber(f:read("*line"))
- ab2=tonumber(f:read("*line"))
- ab3=tonumber(f:read("*line"))
- ab4=tonumber(f:read("*line"))
- ab5=tonumber(f:read("*line"))
- ab6=tonumber(f:read("*line"))
- ab7=tonumber(f:read("*line"))
- f:close()
- if ab6==nil then
- iconx=100
- else
- iconx=ab6
- end
- if ab7==nil then
- icony=100
- else
- icony=ab7
- end
- time=ab1
- checkbox3=ab1
- tmp2=ab2
- checkbox4=ab2
- icons=ab3
- checkbox5=ab3
- mfps=ab4
- checkbox1=ab4
- elh=ab5
- checkbox2=ab5
- if mfps==1 then
- tpt.setfpscap(10000)
- end
- if elh==1 then
- unhide()
- end
- end
- --------------------
- function press(mousex, mousey, button, event)
- if show==1 then
- if (mousex>=179) and (mousex<=191) and (mousey>=129) and (mousey<=141) and (button==1) and (event==2) then
- if checkbox1==0 then
- tpt.setfpscap(10000)
- checkbox1=1
- else
- tpt.setfpscap(60)
- checkbox1=0
- end
- end
- if (mousex>=340) and (mousex<=352) and (mousey>=146) and (mousey<=158) and (button==1) and (event==2) then
- if checkbox2==0 then
- checkbox2=1
- unhide()
- else
- checkbox2=0
- elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_SHD4, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_SHD3, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_SHD2, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_BIZS, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_RIME, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_LOLZ, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_SPWN, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_BRAY, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_LOVE, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_EQVE, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_DYST, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_BIZG, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_FRZW, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_PSTS, "MenuVisible", 0)
- elements.property(elements.DEFAULT_PT_EMBR, "MenuVisible", 0)
- end
- end
- if (mousex>=397) and (mousex<=409) and (mousey>=170) and (mousey<=182) and (button==1) and (event==2) then
- if checkbox3==0 then
- checkbox3=1
- time=1
- else
- checkbox3=0
- time=0
- end
- end
- if (mousex>=352) and (mousex<=364) and (mousey>=187) and (mousey<=199) and (button==1) and (event==2) then
- if checkbox4==0 then
- checkbox4=1
- tmp2=1
- else
- checkbox4=0
- tmp2=0
- end
- end
- if (mousex>=357) and (mousex<=369) and (mousey>=206) and (mousey<=218) and (button==1) and (event==2) then
- if checkbox5==0 then
- checkbox5=1
- icons=1
- else
- checkbox5=0
- icons=0
- end
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=167) and (mousey<=182) and (button==1) and (event==2) then
- tpt.set_property("type","none","clne")
- tpt.set_property("type","none","bcln")
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=190) and (mousey<=205) and (button==1) and (event==2) then
- tpt.set_property("life","1000000","metl")
- tpt.set_property("life","1000000","merc")
- tpt.set_property("life","1000000","tung")
- tpt.set_property("life","1000000","inst")
- tpt.set_property("life","1000000","tesc")
- tpt.set_property("life","1000000","wwld")
- tpt.set_property("life","1000000","etrd")
- tpt.set_property("life","1000000","ptct")
- tpt.set_property("life","1000000","ntct")
- tpt.set_property("life","1000000","nscn")
- tpt.set_property("life","1000000","pscn")
- tpt.set_property("life","1000000","lrbd")
- tpt.set_property("life","1000000","rbdm")
- tpt.set_property("life","1000000","nble")
- tpt.set_property("life","1000000","rbdm")
- tpt.set_property("life","1000000","brmt")
- tpt.set_property("life","1000000","brel")
- tpt.set_property("life","1000000","bmtl")
- tpt.set_property("life","1000000","iron")
- tpt.set_property("life","1000000","ttan")
- tpt.set_property("life","1000000","gold")
- end
- if (mousex>=117) and (mousex<=268) and (mousey>=260) and (mousey<=275) and (button==1) and (event==2) then
- button6='unpressed'
- show=0
- moveicon=1
- tpt.log('Drag the \'M\' icon in the new place.')
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=213) and (mousey<=228) and (button==1) and (event==2) then
- sim.resetTemp()
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=236) and (mousey<=251) and (button==1) and (event==2) then
- for i1=1, 607 do
- for i2=1, 379 do
- if tpt.get_property('type',i1,i2) ~=0 then
- local t=tpt.get_property('dcolour',i1,i2)
- sim.partCreate(-3,i1,i2,115)
- tpt.set_property("dcolour",t,i1,i2)
- end
- end
- end
- end
- if (mousex>=467) and (mousex<=479) and (mousey>=100) and (mousey<=112) and (button==1) and (event==2) then
- show=0
- end
- if (mousex>=103) and (mousex<=476) and (mousey>=291) and (mousey<=306) and (button==1) and (event==2) then
- conf=time..'\n'..tmp2..'\n'..icons..'\n'..checkbox1..'\n'..checkbox2..'\n'..iconx..'\n'..icony..'\n^^config file for tpt lua script by ssccsscc^^'
- local f = io.open(filename,"w")
- if f then
- f:write(conf)
- f:close()
- end
- show=0
- button5='unpressed'
- end
- end
- end
- tpt.register_mouseclick(press)
- function HUD()
- if tpt.hud()==0 then
- return
- end
- local x2=tpt.mousex
- local y2=tpt.mousey
- local x, y = sim.adjustCoords(x2, y2)
- if tpt.get_property("type", x, y)~=0 then
- a=tpt.get_property('tmp2', x, y)
- b=tpt.get_property('dcolour', x, y)
- else
- a=0
- b=0
- end
- if tmp2==1 then
- graphics.drawText(15,30,'Tmp2: '..a..', dcolour: '..string.upper(bit.tohex(b)), 255, 255, 255, 170)
- end
- if time==1 then
- if renderer.debugHUD()==0 then
- graphics.drawText(250, 15, os.date())
- else
- graphics.drawText(200, 15, os.date())
- end
- end
- end
- tpt.register_step(HUD)
- function icon1(mousex, mousey, button, event)
- if (mousex>=0+iconx) and (mousex<=10+iconx) and (mousey>=0+icony) and (mousey<=10+icony) and (button==1) and (event==2) then
- show=1
- end
- end
- tpt.register_mouseclick(icon1)
- function moveicon(mousex, mousey, button, event)
- if moveicon==1 then
- if ((button==1) and (event==1)) and (((mousex<iconx) or (mousex>11+iconx)) or ((mousey<icony) or (mousey>11+icony))) then
- fpi=0
- end
- if (button==1) and (event==1) and (mousex>=iconx) and (mousex<=11+iconx) and (mousey>=icony) and (mousey<=11+icony) then
- fpi=1
- fxi=mousex-iconx
- fyi=mousey-icony
- end
- if (button==1) and (event==3) and (fpi==1) then
- iconx=mousex-fxi
- icony=mousey-fyi
- if icony<1 then
- icony=-1
- end
- if icony>411 then
- icony=412
- end
- end
- if iconx<2 then
- iconx=1
- end
- if iconx>617 then
- iconx=618
- end
- end
- if (button==1) and (event==2) and (mousex>=iconx) and (mousex<=11+iconx) and (mousey>=icony) and (mousey<=11+icony) then
- moveicon=0
- end
- end
- tpt.register_mouseclick(moveicon)
- function icon()
- end
- tpt.register_step(icon)
- function image()
- if show==0 then
- return
- end
- --Show UI
- function press2(mousex, mousey, button, event)
- if show==1 then
- if (mousex>=118) and (mousex<=267) and (mousey>=167) and (mousey<=182) and (button==1) and (event==1) then
- button1='pressed'
- elseif (mousex>=118) and (mousex<=267) and (mousey>=167) and (mousey<=182) and (button==1) and (event==2) then
- button1='unpressed'
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=190) and (mousey<=205) and (button==1) and (event==1) then
- button2='pressed'
- elseif (mousex>=118) and (mousex<=267) and (mousey>=190) and (mousey<=205) and (button==1) and (event==2) then
- button2='unpressed'
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=213) and (mousey<=228) and (button==1) and (event==1) then
- button3='pressed'
- elseif (mousex>=118) and (mousex<=267) and (mousey>=213) and (mousey<=228) and (button==1) and (event==2) then
- button3='unpressed'
- end
- if (mousex>=118) and (mousex<=267) and (mousey>=236) and (mousey<=251) and (button==1) and (event==1) then
- button4='pressed'
- elseif (mousex>=118) and (mousex<=267) and (mousey>=236) and (mousey<=251) and (button==1) and (event==2) then
- button4='unpressed'
- end
- if (mousex>=103) and (mousex<=476) and (mousey>=291) and (mousey<=306) and (button==1) and (event==1) then
- button5='pressed'
- elseif (mousex>=103) and (mousex<=476) and (mousey>=291) and (mousey<=306) and (button==1) and (event==2) then
- button5='unpressed'
- end
- if (mousex>=117) and (mousex<=268) and (mousey>=260) and (mousey<=275) and (button==1) and (event==1) then
- button6='pressed'
- elseif (mousex>=117) and (mousex<=268) and (mousey>=260) and (mousey<=275) and (button==1) and (event==2) then
- button6='unpressed'
- end
- end
- end
- tpt.register_mouseclick(press2)
- if button4=='pressed' then
- else
- end
- if button3=='pressed' then
- else
- end
- if checkbox1==0 then
- else
- end
- if checkbox2==0 then
- else
- end
- if button1=='unpressed' then
- else
- end
- if button2=='pressed' then
- else
- end
- if checkbox3==0 then
- else
- end
- if checkbox4==0 then
- else
- end
- if checkbox5==0 then
- else
- end
- if button5=='unpressed' then
- else
- end
- if button6=='unpressed' then
- else
- end
- end
- tpt.register_step(image)
- function UI()
- if show==0 then
- return
- end
- end
- tpt.register_step(UI)
- function image()
- if icons==1 then
- end
- end
- tpt.register_step(image)
Advertisement
Add Comment
Please, Sign In to add comment