Viewing paste cardrender2
made on Thu, 14 Nov 2013 01:57:36 -0500
Sane-itized version, click to copy:
&CARd.RENDER2 = [null([setq(m,16)][setq(n,14)][setq(o,[u(CARD.BY.NUMBER,%0)])][setq(p,[u(CARD.PICTURE,%qo)])][setq(w,[u(#388/PIC.W,%qp)])][setq(h,[u(#388/PIC.H,%qp)])][iter(fblist(#7781),fbdestroy(#7781/##))][if(fbexists(#7781/CARD_PIC_RAW),fbdestroy(#7781/CARD_PIC_RAW))][fbcreate(#7781/CARD_PIC_RAW,%qw,%qh)][if(fbexists(#7781/CARD_PIC_REDUCED),fbdestroy(#7781/CARD_PIC_REDUCED))][fbwrite(#7781/CARD_PIC_RAW,0,0,SHOWPICTURE(%qp))][fbcreate(#7781/CARD_PIC_REDUCED,%qm,%qn)][iter(lnum(0,%qm),[iter(lnum(0,%qn),{[setq(j,[val(mul(fdiv([itext(1)],%qm),%qw))])][setq(k,[val(mul(fdiv([itext(0)],%qn),%qh))])][setq(v,[fbstats(#7781/CARD_PIC_RAW,%qj,%qk)])][setq(b,[extract(%qv,3,1,%b)])][setq(f,[extract(%qv,2,1,%b)])][setq(c,[extract(%qv,1,1,%b)])][fbwrite(#7781/CARD_PIC_REDUCED,[itext(1)],[itext(0)],[color(%qf,%qb,[c(%qc)])])]},,%b)],,%b)][fbdestroy(#7781/CARD_PIC_RAW)][if(fbexists(CARD),fbdestroy(CARD))][fbcreate(CARD,17,17)][FBCOPYTO(#7781/CARD_PIC_REDUCED,CARD,0,0,%qm,%qn,0,0,,255)][fbwrite(CARD,0,0,SHOWPICTURE(DNDCARD2),,0)][fbwrite(CARD,1,0,[color(208,94,[u(card.name.format,%0)])],%b)][fbwrite(CARD,0,13,[u(CARD.STATS,%qo)])][fbdestroy(#7781/CARD_PIC_REDUCED)])]

Enter a target attribute, object reference and the mushcode.


 
[null(
 [setq(m,16)]
  [setq(n,14)]
  [setq(o,[u(CARD.BY.NUMBER,%0)])]
  [setq(p,[u(CARD.PICTURE,%qo)])]
  [setq(w,[u(#388/PIC.W,%qp)])]
  [setq(h,[u(#388/PIC.H,%qp)])]
  [iter(fblist(#7781),fbdestroy(#7781/##))]
  [if(fbexists(#7781/CARD_PIC_RAW),fbdestroy(#7781/CARD_PIC_RAW))]
  [fbcreate(#7781/CARD_PIC_RAW,%qw,%qh)]
  [if(fbexists(#7781/CARD_PIC_REDUCED),fbdestroy(#7781/CARD_PIC_REDUCED))]
  [fbwrite(#7781/CARD_PIC_RAW,0,0,SHOWPICTURE(%qp))]
  [fbcreate(#7781/CARD_PIC_REDUCED,%qm,%qn)]
  [iter(lnum(0,%qm),[iter(lnum(0,%qn),
  {
   [setq(j,[val(mul(fdiv([itext(1)],
    %qm),%qw))])]
    [setq(k,[val(mul(fdiv([itext(0)],
    %qn),%qh))])]
    [setq(v,[fbstats(#7781/CARD_PIC_RAW,%qj,%qk)])]
    [setq(b,[extract(%qv,3,1,%b)])]
    [setq(f,[extract(%qv,2,1,%b)])]
    [setq(c,[extract(%qv,1,1,%b)])]
    [fbwrite(#7781/CARD_PIC_REDUCED,[itext(1)],[itext(0)],[color(%qf,%qb,[c(%qc)])])]
  },,%b)],,%b)]
  [fbdestroy(#7781/CARD_PIC_RAW)]
  [if(fbexists(CARD),fbdestroy(CARD))]
  [fbcreate(CARD,17,17)]
  [FBCOPYTO(#7781/CARD_PIC_REDUCED,CARD,0,0,%qm,%qn,0,0,,255)]
  [fbwrite(CARD,0,0,SHOWPICTURE(DNDCARD2),,0)]
  [fbwrite(CARD,1,0,[color(208,94,[u(card.name.format,%0)])],
  %b)]
  [fbwrite(CARD,0,13,[u(CARD.STATS,%qo)])]
  [fbdestroy(#7781/CARD_PIC_REDUCED)])]

save as: imprettify (attempt to format for readibility):
Found this useful? Try MUSHcode Repeater
written by orcs.biz