@create Poll Device=10 &PPOLL Poll Device=$+poll *:@switch hasflag(%#,wizard)={@poll %0; &plist me=[%n|%0] [v(plist)]; @switch gt(words(v(plist)),10)=1,{&plist me=[ldelete(v(plist),words(v(plist))]}; @wall/emit %n sets us up a brand new poll!},{@switch gte(money(%#),v(pollcost))=1,{@force %#=give/quiet %#=-[v(pollcost)]; @poll %0; &plist me=[%n|%0] [v(plist)]; @switch gt(words(v(plist)),10)=1,{&plist me=[ldelete(v(plist),words(v(plist))]}; @wall/emit Pffftt! %n just wasted [v(pollcost)] credits to change the poll!},{@pemit %#=Be sure to have enough money before trying this again, %n.}} &POLLCOST Poll Device=300 @Comment Poll Device=The +poll command assumes that no one has been MANUALLY adding stuff to the internal list. &POLL_FN Poll Device=[setq(0,[ansi(c,elements(%0,1,|))])]%q0[repeat(%b,sub(14,strlen(%q0)))][ansi(hy,capstr(elements(%0,2,|)))] &POLL_LIST Poll Device=$+listpoll:@pemit %#=%r[center(ansi(gh,*~ The Last Ten Polls ~*),80)]%r[repeat(ansi(c,-=),40)]%r[iter(v(plist),[u(poll_fn,##)]%r)]%r[repeat(ansi(c,-=),40)] &AUTHOR Poll Device=Yohshee &VERSION Poll Device=1.0 @Desc Poll Device=Now, this thing really looks cool. Embedded right into the top of it is a small keyboard, as well as a color LCD screen. Upon this screen float the following words:%r%t%tPolling Device%r%t%tCopyright (c) 1999 Yohshee Systems, Inc.%r%rYour options are:%r%t+poll - Set the poll for a cost of [v(pollcost)] credits. (Of course, free for the wizards.)%r%t+listpoll - See who all set the last ten polls and what they were.%r%rNifty. @set Poll Device=INHERIT @set Poll Device=SAFE