ФЭНДОМ


Icon back

Часы с инкрементомПравить

@inputs Time Button
@outputs Screen1 Screen2
interval(1000)
Screen1=time*10
if(clk())
{
if(Button){Screen2++}
}

Консольный экран для Звездных врат(2009 год)Править

Не самый удачный пример, но он писался в дни, когда еще толком ничего не было и я только осваивался

@name Stargate Console Pc Screen© Darkanum 
@inputs Scr:wirelink Chevron Active Inbound Iris RecCode 
@persist Code 
Scr:writeCell(2042,1) 
Scr:writeCell(2041,0) 
Scr:writeCell(2040,2) 
Scr:writeCell(2043,3) 
Scr:writeCell(2044,4) 
Scr:writeCell(2045,   5) 
Scr:writeCell(2046,6) 
Scr:writeString("The", 0, 0) 
if(Active==1) 
{Scr:writeString("Chevron " + Chevron + " opened" ,0, 2)} 
else 
{Scr:writeString("The"+" gate "+"is "+"closed",0,0)} 
if(Chevron==7){Scr:writeString("The"+" gate "+"is "+"open",0,0)} 
if(Chevron==7) 
{Scr:writeString("Chevron " + Chevron + " fixed " ,0, 2)} 
if(Chevron!=7&Active==1) 
{Scr:writeString("The"+" gate"+" is "+"loading "+"now" ,0, 1)} 
if(Chevron!=7&Active==1) 
{Scr:writeString("Gate is active ",0, 0)} 
if(Inbound==1) 
{Scr:writeString("Incomming"+" connection",0,3)} 
if(Iris==1){Scr:writeString("iris is closed",0,4)} 
else{Scr:writeString("Iris is open",0,4)} 
Scr:writeString("Recieved code is "+RecCode,0,5) 
if(RecCode==Code) 
{Scr:writeString("The code is right",0,6)} 
if(RecCode==0) 
{Scr:writeString("No code incoming ",0,6)} 
if(RecCode!=0&RecCode!=Code) 
{Scr:writeString("The Code is wrong",0,6)} 
 Code=3471