Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- channel = -1 lastindex = 0
- function setwifi(i,x,y,surround_space,nt)
- if i < lastindex then -- if tpt has looped through every index, this
- channel = -1 -- must be a new frame, so reset entered channel
- end
- temp = math.floor(tpt.get_property("temp",i)-273.1)
- if temp == 22 and channel == -1 then
- channel = tpt.input("Enter a Channel Number", "Must Be Between 0 and 100")
- end
- if temp == 22 then
- tpt.set_property("temp", channel*100 + 23.15, i)
- end
- lastindex = i
- end
- tpt.element_func(setwifi,tpt.element("WIFI"),0,setwifi)
- tpt.element_func(setwifi,tpt.element("PRTI"),0,setwifi)
- tpt.element_func(setwifi,tpt.element("PRTO"),0,setwifi)
- --tpt.element_func(setwifi,tpt.element("PPTI"),0,setwifi) --uncomment these
- --tpt.element_func(setwifi,tpt.element("PPTO"),0,setwifi) --if using my mod
- function nothing(i,x,y,surround_space,nt)
- end
- --for i = 0, 159 do --uncomment this to delete
- -- pcall(tpt.element_func,nothing,i,1,nothing) --all element update functions
- --end --just a fun test I did
- --fun fact: I use this as storage... things past this point deleted...
Advertisement
Add Comment
Please, Sign In to add comment