Viewing paste TVL
made on Fri, 01 Nov 2013 13:28:43 -0400
Sane-itized version, click to copy:
&TALLY.VOTES.LEADER #3629=[set(me,VOTE_LIST:)][setq(p,0)][iter(u(playing),[if(u(is.playing,##),[setq(p,[add(%qp,1)])][set(me,VOTES_LEADER_%qp:0)][set(me,VOTE_LIST:VOTES_LEADER_%qp [u(VOTE_LIST)])])],%b,)][setq(t,0)][iter(u(playing),[if(u(is.playing,##),[setq(t,[add(%qt,1)])][set(me,VOTES_LEADER_%qt:[add(u(VOTES_LEADER_%qt),1)])])],%b,)][setq(v,0)][setq(b,)][setq(n,-1)][iter([u(VOTE_LIST)],[if(gt(u(##),0),[u(PARTY.MEMBER.NAME,#@)] received [u(##)] votes.%r)][if(gt(u(##),%qv),[setq(b,##)][setq(v,[u(##)])][setq(n,#@)])],%b,)][oemit(me,The party has nominated [u(PARTY.MEMBER.NAME,%qn)] as the leader.)][set(me,LEADER:[u(PARTY.MEMBER.PLAYER,%qn)])]

Enter a target attribute, object reference and the mushcode.


[set(me,VOTE_LIST:)]
[setq(p,0)]
[iter(u(playing),[if(u(is.playing,##),
 [setq(p,[add(%qp,1)])]
 [set(me,VOTES_LEADER_%qp:0)]
 [set(me,VOTE_LIST:VOTES_LEADER_%qp [u(VOTE_LIST)])]
)],%b,)]
[setq(t,0)]
[iter(u(playing),
 [if(u(is.playing,##),[setq(t,[add(%qt,1)])]
  [set(me,VOTES_LEADER_%qt:[add(u(VOTES_LEADER_%qt),1)])]
 )],%b,)]
[setq(v,0)]
[setq(b,)]
[setq(n,-1)]
[iter([u(VOTE_LIST)],
 [if(gt(u(##),0),
  [u(PARTY.MEMBER.NAME,#@)] received [u(##)] votes.%r
 )]
 [if(gt(u(##),%qv),
  [setq(b,##)][setq(v,[u(##)])][setq(n,#@)]
 )],%b,)]
[oemit(me,The party has nominated [u(PARTY.MEMBER.NAME,%qn)] as the leader.)]
[set(me,LEADER:[u(PARTY.MEMBER.PLAYER,%qn)])]

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