Communicator Parent

From HSpace

Jump to: navigation, search

Posted on the HSpace Forums by Osiris

@create PARENT: Communicator
@link PARENT: Communicator = #949
@lock/Basic PARENT: Communicator=#1134
@lset PARENT: Communicator/Basic=no_inherit
@lock/Use PARENT: Communicator=#1
@lset PARENT: Communicator/Use=no_inherit
@set PARENT: Communicator = WIZARD
@set PARENT: Communicator = HSPACE_COMM
&ACTIVE PARENT: Communicator=0
@ADROP PARENT: Communicator=th [set(%!,ACTIVE:0)][set(%!,NO_COMMAND)]
@set PARENT: Communicator/ADROP=no_command prefixmatch
@ASUCCESS PARENT: Communicator=th [set(%!,!NO_COMMAND)]
@set PARENT: Communicator/ASUCCESS=no_command prefixmatch
&CMD_ACTIVATE PARENT: Communicator=$COMM ON:[if(hasattr(%!,ACTIVE),[if(v(ACTIVATE),[pemit(%#,Your communicator is already active.)],[pemit(%#,You turn on your communicator.)][oemit(%#,[name(%#)] turns on a communicator.)][set(%!,ACTIVE:1)])],[iter(COMM_BROADCAST COMM_FRQS COMM_HANDLER UID X Y Z,[set(%!,##:[get(parent(%!)/##)])])][pemit(%#,You turn on your communicator.)][oemit(%#,[name(%#)] turns on a communicator.)][set(%!,ACTIVE:1)])]
&CMD_COM PARENT: Communicator=$com *:@remit [loc(%#)]=[name(%#)] transmits, "%0" ; @pemit %#=[if(v(ACTIVE),[setq(0,get(%#/hspace_location))][if(match(hs_comm_msg(hs_get_attr(%q0,uid),hs_get_attr(%q0,uid),hs_get_attr(%q0,x),hs_get_attr(%q0,y),hs_get_attr(%q0,z),7,v(COMM_BROADCAST),%0),Failed),You message could not be sent.,You sent your message to channel [v(comm_broadcast)].)],Your communicator is offline.)]
&CMD_DEACTIVATE PARENT: Communicator=$COMM OFF:[if(get(%!/ACTIVE),[pemit(%#,You turn off your communicator.)][oemit(%#,[name(%#)] turns off a communicator.)][set(%!,ACTIVE:0)],[pemit(%#,Your communicator is already off.)])]
&CMD_EARBUD PARENT: Communicator=$COMM EARBUD:[if(v(EARBUD),[set(%!,EARBUD:0)][remit(loc(loc(me)),[name(%#)] turns on %p communicator's speaker.)],[set(%!,EARBUD:1)][remit(loc(loc(me)),[name(%#)] inserts %p communicator's earbud and turns off its speaker.)])]
&CMD_FRQ PARENT: Communicator=$COMM FRQ *:[if([or([or([lt(%0,150)],[gt(%0,150.55)])],[gt(strlen(%0),6)])],[pemit(%#,[ansi(yh,-)] Communicator frequencies are limited to 150.00 to 150.55 Mhz only.)],[pemit(%#,[ansi(yh,-)] You change your communicator frequency to [ansi(yh,%0)] Mhz.)][oemit(%#,[name(%#)] changes the frequency of %p communicator.)][set(%!,COMM_BROADCAST:%0)][set(%!,COMM_FRQS:%0)])]
&CMD_HELP PARENT: Communicator=$COMM HELP:[pemit(%#,[repeat([ansi(yh,-)],80)]%r[center([ansi(g,Communicator Commands)],80)]%r[repeat([ansi(yh,-)],80)]%r%r%t[ansi(gh,COMM <ON%/OFF>)]%t%tTurns on%/off communicator.%r%t[ansi(gh,COMM EARBUD)]%t%tTurns on/off earbud or external speaker.%r%t[ansi(gh,COMM FRQ <#>)]%t%tSets channel to 150.00 thru 150.55 Mhz.%r%t[ansi(gh,COM <MSG>)]%t%tTransmits <MSG>%r%r%t[ansi(gh,COMM HELP)]%t%tDisplays this screen.%r%r[repeat([ansi(yh,-)],80)])]
&COMM_BROADCAST PARENT: Communicator=150.55
&COMM_FRQS PARENT: Communicator=150.55
&COMM_HANDLER PARENT: Communicator=[switch([v(ACTIVE)][v(EARBUD)][member(loc(me),loc(%2))],110,[pemit(loc(me),[ansi(yh,<)][ansi(wh,Communicator)][ansi(yh,>)] %0)],100,[remit(loc(loc(me)),[ansi(yh,[name(%l)]'s Communicator)]: %0)],)]
@DESCRIBE PARENT: Communicator=%r%tA small rectangular box approximately five inches tall, three inches wide, and an inch deep.  This device is used for short range communication from person-to-person, ship-to-person, or person-to-ship.%r%r%t[if(member(%#,loc(%!)),The device is currently [if(v(ACTIVE),[ansi(yh,ON)],[ansi(g,OFF)])]%r%tTransmitting Frequency is: [ansi(gh,v(COMM_FRQS) Mhz)])]%r%r%tType: [ansi(yh,COMM HELP)] for more information.
@set PARENT: Communicator/DESCRIBE=no_command visual prefixmatch public nearby
&EARBUD PARENT: Communicator=1
&UID PARENT: Communicator=631
&X PARENT: Communicator=[hs_get_attr(get(%l/HSPACE_LOCATION),x)]
&Y PARENT: Communicator=[hs_get_attr(get(%l/HSPACE_LOCATION),y)]
&Z PARENT: Communicator=[hs_get_attr(get(%l/HSPACE_LOCATION),z)]
Views
Personal tools