Goonstation Forums
Dwaine message scripting - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: General Discussion (https://forum.ss13.co/forumdisplay.php?fid=7)
+--- Thread: Dwaine message scripting (/showthread.php?tid=15124)



Dwaine message scripting - Drewmajor11 - 09-24-2020

Ok I've found out a bit here, but what I was trying to do just to figure this out in the first place was make a script to send messages to pdas. I got this but I couldn't run it thru a frequency echo #!|ncd /mnt/radio/1149|ncommand=text_message|nsender_name=test|nmessage=test|nsender=020333f1|n_freq=1149 ^./radio


RE: Dwaine message scripting - Boxta - 09-24-2020

So, to send packets thru scripting is rather hard, because of the fact that you cant make the packet within the script because of scripts and packets using the same terminating simbol (^), so, to get around this, the way i use is make the packet before hand and save it to somewhere usually /home, then, instead of making it within the scrip, just CP /home/packetname /mnt/radio/1149, which will send the packet to the radio sending it out, while still saving the script for reuse. In this case, your script would look like
echo command=text_message|nmessage=test|nsender_name=test ^/home/PdaTest
echo #!|ncp /home/PdaTest /mnt/radio/1149 ^ /home/ScriptTest


RE: Dwaine message scripting - Drewmajor11 - 09-24-2020

Thanks mate.

I think I'm understanding it right, so
echo command=text_message|nmessage=test|nsender_name=test ^/home/PdaTest Would create the packet. Then you use the second one to send it to the radio to send out the packet. Right?


RE: Dwaine message scripting - Boxta - 09-24-2020

(09-24-2020, 05:04 PM)Drewmajor11 Wrote: Thanks mate.

I think I'm understanding it right, so
echo command=text_message|nmessage=test|nsender_name=test ^/home/PdaTest Would create the packet. Then you use the second one to send it to the radio to send out the packet. Right?

Yeah. the first one creates the packet, the second one creates the script which sends out the packet