@name Maddnes Chip
@inputs 
@outputs Madness
@persist Time Madness Cleanup
interval(1000)
if(first()){Cleanup=0}
Time += 1
P = "+"
M = "-"
F = "forward"
B = "back"
A1 = "attack"
ML = "moveleft"
J = "jump"
A2 = "attack2"
MR = "moveright"
LL = "left"
LR = "right" 
LU = "lookup"
LD = "lookdown"
MU = "moveup"
MD = "movedown"
S = ";"
if (entity():owner():lastSaid()=="Oh Freakout!") {Madness = 1}
if (entity():owner():lastSaid()=="Jane stop this crazy thing!") {Madness = 0 Cleanup=1}
if (Madness) {
if (Time==1) {concmd(P + F)}
if (Time==2) {concmd(P+ LL)}
if (Time==3) {concmd(M + LL + S + P + LR)}
if (Time==4) {concmd(M + LR + S + P + J)}
if (Time==5) {concmd(M + J  + S + M + F +  S + P + B)}
if (Time==6) {concmd(P + A1 + S + P + ML)}
if (Time==7) {concmd(M + A1 + S + P + J)}
if (Time==8) {concmd(M + J  + S + M + ML + S + P + LU)}
if (Time==9) {concmd(P + LR + S + M + B  + S + M + LU )}
if (Time==10) {concmd(P + F + S + P + MR + S + P + LD)}
if (Time==11) {concmd(M + F + S + M + LR + S + M + LD)}
if (Time==12) {concmd(P + J + S + M + MR)}
if (Time==13) {concmd(P + F + S + P + ML)}
if (Time==14) {concmd(M + F + S + M + ML + ";say_team I'm looping")}
if (Time==15) {Time = 0}
} else {
concmd(
M + A2 + S + 
M + A1 + S + 
M + J + S +
M + ML + S + 
M + MR + S + 
M + LR + S + 
M + LL + S + 
M + F + S + 
M + B + S +
M + LU + S + 
M + LD)}
if(Cleanup){print("Chip Self Destructing") selfDestruct()}
