Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ This +WHO is originally spawned from Nefara's +WHO
- @@ off of http://www.mushcode.com:
- @@ (http://www.mushcode.com/ViewFile.aspx?Id=47),
- @@ but upgraded to use align() and custom client width()
- @@ functions rather than brute force spacing for columns.
- @@
- @@ Note: #4332 is an object which I use to simulate darkness/
- @@ hidden movements without explicitly setting players DARK.
- @@ Also, #6555 is a specific zone/area called the Dreamrealm.
- @@ You can set this as your OOC ZMR or just remove it from
- @@ the code if you don't want to use it.
- @@
- @@ I'm also adding a few of my time functions, just to make
- @@ this thing work more smoothly out of the box (otherwise
- @@ conv_time2() will break, and such.
- &do_who Global Command Object=$^(who|\+who)$:@pemit %#=%r[listbar(%B[poll()]%B,[width(%#)])]%r[align(<8(hw) [add([config(player_name_len)],4)](hw) 10(hw) [sub([width(%#)],[add(9,[add([config(player_name_len)],5)],12)])](hw),Flags,Name,Conn/Idle,Location)]%r[if(screenread(%#),,[repeat(-,[width(%#)])])][setq(l,if(isstaff(%#),lwho(),mwho()))][iter([setunion(%ql,%ql)],[setq(0,[tag(send,href="+finger [name(##)]")][name(##)][endtag(send)][if(hasflag(##,away),%b\(A\))])][setq(1,if(hasattr(##,sex),capstr(trim(get(##/sex))),N))][setq(2,switch(hasattr(##,race),1,trim(get(##/race)),-Unknown-))][setq(3,switch([or(hasflag(##,D),hasflag(loc(##),U),hasflag(##,U),gt(match([xget(#4332,hidden_list)],##),0))],0,[if(strmatch(zone(loc(##)),#6555),*ASLEEP*,name(loc(##)))],*Unfindable*))][setq(4,switch(hasflag(##,W),1,W,switch(hasflag(##,royalty),1,R,switch(hasflag(##,robot),1,B,P))))][setq(5,switch([t(parent(loc(##)))],1,IC,OOC))][setq(6,u(conv_time2,idle(##)))][setq(7,switch(orflags(%#,Wr),1,[switch([hasflag(%#,myopic)],0,\([loc(##)]\))]))][setq(8,[words([matchall(%ql,##)])])][setq(9,u(conv_time2,conn(##)))]%r[align(<8 [add([config(player_name_len)],4)] 10 [sub([width(%#)],[add(9,[add([config(player_name_len)],5)],12)])],[left(%q4,1)]-[left(%q1,1)][if(gt(%q8,1),-[left(%q8x,3)])],[left(%q0,23)],\([left(%q9,3)]/[if(strmatch(%q3,*ASLEEP*),---,[left(%q6,3)])]\),[if(or(strmatch(%q3,*Unfindable*),strmatch(%q3,*ASLEEP*)),%q3,%q3%b%q7)])])][if(screenread(%#),,%r[repeat(-,[width(%#)])][ansi(hw,[setq(n,[words([iter([setunion(%ql,%ql)],[switch(or(hasflag(##,dark),hidden(##)),0,##)])])])]There [if(gt(%qn,1),are,is)] %qn player[if(gt(%qn,1),s)] connected.)][if(screenread(%#),,%r[repeat(-,[width(%#)])])]
- @@ A few standard time functions to make idle and connected time work:
- &conv_time2 Global Command Object=[left([u(days_[gt(div(%0,86400),0)],%0)][u(hours_[gt(div(%0,3600),0)],%0)][u(minutes_[gt(div(%0,60),0)],%0)][mod(%0,60)]s[space(5)],3)]
- &days_0 Global Command Object=[]
- &days_1 Global Command Object=[div(%0,86400)]d%b
- &hours Global Command Object=[trunc(div(conn(%0),3600))]
- &hours_0 Global Command Object=[]
- &hours_1 Global Command Object=[div(mod(%0,86400),3600)]h%b
- &minutes Global Command Object=[div(sub(conn(%0),[mul([u(hours,%0)],3600)]),60)]
- &minutes_0 Global Command Object=[]
- &minutes_1 Global Command Object=[div(mod(%0,3600),60)]m%b
- @@ A few global Functions to declare in a @startup:
- &f_listbar Global Functions=[center(%0,[switch([t(%1)],1,%1,80)],[switch([screenread(%#)],0,[switch([and([t(%2)],[t(%3)])],1,[ansi(%2,-)][ansi(%3,_)],[ansi([xget(#4109,default.color_listbar)],-_)])],%b)])]
- &f_screenread Global Functions=[hasflag(%0,screenreader)]
- @function screenread=Global Functions,f_screenread,0,10
- @function listbar=Global Functions,f_listbar,0,10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement