>
Currently Browsing: Scripts

Script: Repair Broken Door

First create a door. It can be locked or unlocked. Next create a Message. Example text: An examination of the door's security components reveals that several parts and connections were damaged when raiders tried to break in. It should be repairable with the right parts, or perhaps the system can be bypassed. [Repair of 40 or greater required, plus 2 pieces of Scrap Electronics and a Sensor Module are required to repair the door.] [Science of 50 or greater required to bypass the security system.] There will be three options: Then create a the fixed door messages: You fixed the Safe House...
read more

Script: Auto Close Door

ScriptNname AutoClosingDoor01 float doorTimer short closeDoor Begin GameMode if closeDoor == 1 if doorTimer > 0 set doorTimer to doorTimer - getSecondsPassed elseif GetOpenState == 1 ; if the door is still open SetOpenState 0 ; close the door set closeDoor to 0 endif endif End Begin OnActivate if GetOpenState == 3 ; if the door is closed set doorTimer to 5 set closeDoor to 1 endif Activate End
read more

CYGWIN: Chmod will not change group permissions.

I found that, under cygwin, chmod will not change groups permissions on a file that is stored on NTFS. The group owner needs to be change to User first. $ chown :Users filename Then chmod works as expected. $ chmod 700 filename
read more

BASH: Building an Arsenal‎ – Part 1

BASH: Building an Arsenal‎ – Part 1
If you spend much time at all coding or scripting you realize that you often do some of the same things over and over. That’s where functions and libraries come in. Having a library of commonly used functions handy helps speedup the coding process quite a bit. Usually I prefer to use the best tool for the job. That means using Perl, PHP, C, C++, BASH, or any other language suited for the task. However, lately I’ve been using BASH more than usual. Primarily because it’s pretty much guaranteed to be on just about ever, non Windows, system that I touch. Unfortunately, while I have an...
read more

One-liner to Fix Folder Name Issue

Had a whole bunch of folders named “Video” that should have been “Videos.” Ran this one-liner to fix them up… find . -name Video -exec bash -c 'mv "$1" "$1"s' _ {} \;
read more

« Previous Entries