Upload
calum
View
22
Download
1
Embed Size (px)
DESCRIPTION
;-----------------------------. ;. ; extended conf-join by X-con. ;. ; VERSION 1.10. ;-----------------------------. ;-----------------------------. ; global variable dec. ;-----------------------------. string confdesc(50), conf(10). - PowerPoint PPT Presentation
Citation preview
;-----------------------------;; extended conf-join by X-con;; VERSION 1.10;----------------------------- ;-----------------------------; global variable dec;----------------------------- string confdesc(50), conf(10)string choice, oldconf, startb, conf2join, col(4)integer confxx, confy, confxp, yy, num, enum, confsinteger ypos, xpos, i, oldypos, oldxpos, loop, oldin, confx(5), r, rmax ;-----------------------------; procedure declaration;----------------------------- declare procedure cfgcreate()declare procedure cfgread()declare procedure lajtbar()declare procedure confprin(integer no, integer yp, integer xp)declare procedure changelajt(integer nr, integer y, integer x, integer oy, integer ox, integer oi)declare procedure join(integer confnum) ;-----------------------------; main source;----------------------------- begin rdunet pcbnode() wrunet pcbnode(), un_stat(), un_city(), "[:> U-U Conf-Join v.1.1 <:]", "BPC-UUCJ v.1.1", "" if (exist(ppepath() + "conf.cfg")) then cfgread() else cfgcreate() cfgread() endif if (tokcount() > 0) then let conf2join = gettoken() join(conf2join) endproc else lajtbar() endif end ;-----------------------------; cfgread;----------------------------- procedure cfgread() fopen 1, ppepath() + "conf.cfg", o_rd, s_dw fget 1, confxx fget 1, confy fget 1, confxp fget 1, confs
for i = 1 to 4fget 1, col(i)
next let r = 1
for i = 1 to 10 fget 1, conf(i) if (len(conf(i)) > 18) let conf(i) = left(conf(i),14) let rmax = r + 4 for r = r to rmax fget 1, confdesc(r) if (len(confdesc(r)) > 30) let confdesc(r) = left(confdesc(r),30) next next fclose 1 endproc ;-----------------------------; cfg creator;----------------------------- procedure cfgcreate() fcreate 1, ppepath() + "conf.cfg", o_wr, s_dr fputln 1, "56" fputln 1, "10" fputln 1, "7" fputln 1, "10"
fputln 1, "@X7F"fputln 1, "@X07"fputln 1, "@X78"fputln 1, "@X07"
while (loop < 60) do let loop = loop + 1 fputln 1, "empty" endwhile fputln 1, "--------[this line should have the number " + string(loop + 6) + " otherwise you've fuck it up!]-----" fclose 1 endproc ;-----------------------------; swedish lajtbar systems;----------------------------- procedure lajtbar() print "@POFF@" dispfile ppepath() + "conf.xc", graph let xpos = confxp let ypos = confy confprin(0,ypos,xpos) let oldxpos = xpos let oldypos = ypos let i = 1 let oldin = i for r = 1 to 5 let confx(r) = len(confdesc(r)) / 2 next changelajt(i, ypos, xpos, oldypos, oldxpos, oldin) while (choice <> chr(27)) do let choice = inkey() if (choice = "DOWN") then let ypos = ypos + 1 if (ypos > (confy + (confs - 1))) let ypos = confy let i = i + 1 if (i > confy) let i = 1
changelajt(i, ypos, xpos, oldypos, oldxpos, oldin) let oldxpos = xpos let oldypos = ypos let oldin = i endif if (choice = "UP") then let ypos = ypos - 1 if (ypos < confy) let ypos = (confy + (confs - 1)) let i = i - 1 if ( i < 1) let i = confy changelajt(i, ypos, xpos, oldypos, oldxpos, oldin) let oldxpos = xpos let oldypos = ypos let oldin = i endif
if (choice = chr(13)) then if (lower(conf(i)) <> "empty") then cls print col(2) + "UGHA-UGHA CONF-JOiN REV 1.1 BY X-CON" join(i) endproc endif endif endwhile cls kbdstuff chr(13) endproc ;-----------------------------; print conf;----------------------------- procedure confprin(integer no, integer yp, integer xp) for loop = yp to (confy + (confs - 1)) let no = no + 1 ansipos xp, loop print col(1) + conf(no) + col(4) next endproc ;-----------------------------; change lajtbar;----------------------------- procedure changelajt(integer nr,integer y,integer x,integer oy,integer ox,integer oi) let num = ((nr - 1) * 5) + 1 let enum = num for r = 1 to 5 let confx(r) = len(confdesc(enum)) / 2 let enum = enum + 1 next for r = 11 to 15 ansipos (confxx - 15), r print " " next let enum = num for r = 1 to 5 let yy = r + 10 ansipos (confxx - confx(r)), yy print col(2) + confdesc(enum)
let enum = enum + 1 next ansipos ox, oy print col(1) + conf(oi) + col(4) ansipos x, y print col(3) + conf(nr) + col(4) ansipos x + len(stripatx(conf(nr))), y endproc ;-----------------------------; join conference;----------------------------- procedure join(integer confnum) kbdstuff string(confnum) + chr(13) endproc