09-12-2020, 07:12 AM
(This post was last modified: 09-12-2020, 07:21 AM by Marksman. Edited 1 time in total.
Edit Reason: Changed defaults
)
A few people have been asking for ingame dwaine telesci calculators on discord so i thought i'd have a go at making one
How it works is you change the numbers under #INPUT COORDS to where you send your gps
you then change the values under #GPS COORDS to where the gps ended up
and then finally you do the second test under #GPS INPUTCOORDS+1,
Once you have done that you can upload the code via Paper and a scanner, Or manually enter it with the minified version provided
https://wiki.ss13.co/User:Zamujasa/DWAIN..._documents
MINI VERSION
For entering the code straight into a dwaine terminal
Both commands must be entered in order
I'd love to hear some feedback on this.
I intentionally left out any sort of teleman integration as something you can experiment with adding yourself
How it works is you change the numbers under #INPUT COORDS to where you send your gps
you then change the values under #GPS COORDS to where the gps ended up
and then finally you do the second test under #GPS INPUTCOORDS+1,
Once you have done that you can upload the code via Paper and a scanner, Or manually enter it with the minified version provided
https://wiki.ss13.co/User:Zamujasa/DWAIN..._documents
Code:
#!
# INPUT COORDS
eval 100 to x1
eval 50 to y1
# GPS COORDS
eval 52 to x1a
eval 180 to y1a
# GPS INPUTCOORDS+1
eval 59 to x2a
eval 87 to y2a
echo CALCULATING...
eval x2a x1a - to mx
eval y2a y1a - to my
eval mx x1 * to cx
eval x1a cx - to cx
eval my y1 * to cy
eval y1a cy - to cy
eval $arg0 cx - to xoutput
eval xoutput mx / to xoutput
eval $arg1 cy - to youtput
eval youtput my / to youtput
echo Adjusted Coordinates are
echo X=|echo $xoutput
echo Y=|echo $youtput
echo Made by Graham Harshman
echo PROGRAM END
For entering the code straight into a dwaine terminal
Both commands must be entered in order
Code:
echo #!|n#INPUT COORDS|neval 100 to x1|neval 50 to y1|n#GPS COORDS|neval 179 to x1a|neval 80 to y1a|n#GPSINPUTCOORDS+1|neval 183 to x2a|neval 82 to y2a|necho CALCULATING...|neval x2a x1a - to mx|neval y2a y1a - to my|neval mx x1 * to cx|neval x1a cx - to cx|neval my y1 * to cy ^ calc
Code:
echo eval y1a cy - to cy|eval $arg0 cx - to xoutput|neval xoutput mx / to xoutput|neval $arg1 cy - to youtput|neval youtput my / to youtput|necho Adjusted Coordinates are|necho X=|echo $xoutput|necho Y=|echo $youtput|necho Made by Graham Harshman|necho PROGRAM END ^ calc
I'd love to hear some feedback on this.
I intentionally left out any sort of teleman integration as something you can experiment with adding yourself