/* DropDead v1.0*/

options results
bufferflush

signal on syntax;signal on ioerr;signal on error

path1='pfiles:DD/';path2='ram:'
tr ='transmit';del='c:delete'

credsleft = 0;filesleft = 0;status = 1;max = 2

getuser 1;handle=result
getuser 40;number = result

if exists(path1||number)=1 then signal there
tt=1
call open(1,path1||number,'w')
call writeln(1,tt)
call close(1)
signal quit

there:
call open(1,path1||number)
tt = readln(1)
call close(1)
if tt >= max then signal punish
tt=tt+1
call open(1,path1||number,'w')
call writeln(1,tt)
call close(1)
signal quit

punish:
if status > 31 then signal next
setobject status
putuser 15

next:
if credsleft = 'none' then signal next2
setobject credsleft
putuser 30 
putuser 35 
putuser 42 

next2:
if filesleft = 'none' then signal next3
setobject filesleft
putuser 31 
putuser 34 
putuser 44 

next3:
call open(1,path2||number,'w')
call writeln(1,center('c6 Hello there 'handle' this was the last time you dropped',79))
call writeln(1,center('carrier at this board!! The punishment is carried out as you',76))
call writeln(1,center("soon will found out...Don't ever do this again!!",76))
call writeln(1,' ')
call writeln(1,center('c7z4 DropDead (C) 1994 by Wolverine / DMIc3z0 ',88))
call close(1)
loadeditor path2||number
setmailsubj "DropDead v1.0"
a = number
writemail a
address command del' 'path1||number
signal final

quit:
tp = max - tt + 1
call open(1,path2||number,'w')
call writeln(1,center('c6 Hello there 'handle'. This is the 'tt' time you dropped',79))
call writeln(1,center('carrier at this board. If you do this 'tp' more times',76))
call writeln(1,center("I will have to punish you, so now don't come and say that",76))
call writeln(1,center("I didn't warn you!!!",79))
call writeln(1,' ')
call writeln(1,center('c7z4 DropDead (C) 1994 by Wolverine / DMIc3z0 ',88))
call close(1)
loadeditor path2||number
setmailsubj "DropDead v1.0"
a = number
writemail a;
signal final

final:
address command del' 'path2||number
logentry 'c2DropDead went into action!!'
exit

error:
exit

syntax:
exit

ioerr:
exit
