initial release

This commit is contained in:
Draqoken
2025-07-01 23:39:29 +03:00
commit 230f1dd469
18 changed files with 824 additions and 0 deletions

39
scripts/aliases.set Normal file
View File

@@ -0,0 +1,39 @@
#var badaliases {music|StopMusic|sc|capture}
#ForAll @badaliases {#gunalias %i}
#Alias login {#gagon all; 1; %charInfo(name); #wait (0.1); #ungagon; %charInfo(password)}
#alias ActualSave {
#File 6 {settings.set} 1;
#Var SettingsFileCounter 0;
#ForAll @settings {
#Math SettingsFileCounter {@SettingsFileCounter +1};
#Write 6 @{%i} @SettingsFileCounter};
#close 6;}
#alias {onDisconnect} {
#gvar disconnected 1;
ActualSave; #say {Settings saved!};#pc 0 stop}
#alias intromusictoggle {
#if {@intromusic = "Enabled"} {#var intromusic "Disabled"; #say {intro music disabled} VoiceOnly} {#var intromusic "Enabled"; #say {intro music enabled} VoiceOnly}}
#alias mainvoldown {
#math Vol {@Vol - 5};
#if {@Vol < 0} {@Vol = 0};
#play {@sppath/general/misc/VolumeDown.wav} @vol; #say {Main Volume @Vol percent} VoiceOnly;
#if {@introplaying=1} {#PC @introhandle Volume @vol}}
#alias mainvolup {#gagline display;
#math Vol {@Vol + 5};
#if {@introplaying=1} {#PC @introhandle Volume @vol};
#if {@Vol > 100} {@Vol = 100};
#play {@sppath/general/misc/VolumeUp.wav} @vol; #say {Main Volume @Vol percent} VoiceOnly}; #if {@vol = 100} {
#say {Volume maxed!} VoiceOnly}
#alias {smute} {
#if {@Speech = "Disabled"} {
#var Speech "Enabled";
#SetSpeech incoming off; #say {speech off.} voiceonly;} {
#var Speech "Disabled";
#SetSpeech incoming on;
#say {speech on.} VoiceOnly}}
#alias makeworse {#Configure PassThruChar {~>}; #Configure SwitchSession {~:}; #passthru {•}}
#alias makebetter {#Configure PassThruChar {~•}; #Configure SwitchSession {~•}; #passthru {%<;>{}#"'}}
#alias rawinput {#if {@rawpass = "enabled"} {#var rawpass "disabled"; makeworse; #say {Raw input mode is now disabled.};#play {@sppath/general/misc/off.wav} @vol} {#var rawpass "enabled"; makebetter; #say {Raw input mode is now enabled.};#play {@sppath/general/misc/on.wav} @vol}}

115
scripts/dev.set Normal file
View File

@@ -0,0 +1,115 @@
#alias filehandler {
#if {%pos(/,%1)=1} {
#var devpath %homefolder;
} {
#var devpath @scpath
};
#if {%1="" or %2="" or %IfWord(%2,create|delete|edit|load|unload|reload,"|")=0} {
#say {
Syntax:
filehandler <path> <action>.
If the path is proceeded by a slash it will be automaticly switched to the user data of vip mud for this particular action.
the available actions are:
Create: create an empty file (note, works only in the vip mud data location);
Delete: delete a file (Note, works only in the vip mud data location.);
edit: edit a file.
load or unload: load or unload a file respectively;
Reload: Reloads a file.
The aliases have been provided for one's convenience and they include:
devo: Open a file;
Devr: reload a file;
Devc: create a file;
Devd: Delete a file;
Devl and devu: Load and unload a file respectively;
github1: Load files from your remote repositery if you use any;
github 0: to switch back to your local copy;
github h: To display help for github;
Github r: to reload everything in case everything breaks.
Enjoy!};
#abort;
};
#if {%2="load"} {
#load {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="unload"} {
#unload {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="edit"} {
#edit {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="reload"} {
#unload {@devpath/%1.set};
#load @devpath/%1.set;
devannounce %1 %2
};
#if {%2="delete" or %2="create"} {
#if {%pos(%homefolder,@devpath)=0} {
#say {this function can work only with the home folder of vip mud: %homefolder, and you used @devpath}
} {
#if {%2="create"} {
#file 9 {%replace(%1,/,).set};
#write 9 { } 1;
#close 9;
devannounce %1 %2;
};
#if {%2="delete"} {
devannounce %1 %2;
#var devfilename %1;
#alarm 0.20 {
#say {Are you sure that you would like to delete @devpath/@devfilename.set?} VoiceOnly
};
#pick {P:Are you sure|yes:#DelFile %1.set|*No:#abort all};
};
};
};
#unvar devpath
}
#alias devannounce {
#if {%pos(/,%1)=1} {
#say {Initiated %2 at @devpath/%replace(%1,/,).set}
} {
#say {Initiated %2 at @devpath/%1.set}
};
#play {@sppath/general/misc/loadingfile.wav} @vol;
}
#alias devo {filehandler %1 edit}
#alias devr {filehandler %1 reload}
#alias devd {filehandler %1 delete}
#alias devl {filehandler %1 load}
#alias devu {filehandler %1 unload}
#alias devc {filehandler %1 create}
#alias dev {filehandler help}
#alias github {
#if {%1=1} {#if {%defined(githubpath)=0} {#say {Couldn't find path to your github repo, please define the githubpath variable first}} {
#if {@scpath = @githubpath} {#say {You are switched to github already}} {
#say {switching to github};
#unload {@scpath/main.set};#ForAll @loadtask {#unload {@scpath/%i.set}};
#var oldscpath @scpath; #var scpath @githubpath;
#load {@scpath/main.set};
#say {Loaded script files from @scpath}}}};
#if {%1=0} {#if {%defined(oldscpath)=0} {#say {No Old Script Path Found, probably because you have not loaded yet}} {
#unload {@scpath/main.set};#ForAll @loadtask {#unload @scpath/%i.set};
#var scpath @oldscpath; #unvar oldscpath;
#load {@scpath/main.set};
#say {Loaded script files from @scpath}}};
#if {%1="h"} {#say {
Define the variable githubpath somewhere, preferebly in cosmic rage.set. Githubpath should be a list containing path to your github repo scripts folder.
Then type github 1 to switch to github, and github 0 to return to your local copy.
If things break, type github r and it will reload your session.
Have fun!}};
#if {%1="r"} {#reload}}
#var githubpath {D:\my files\repos\VIPMudCosmicRageScripts\scripts}

57
scripts/gagcreator.set Normal file
View File

@@ -0,0 +1,57 @@
#alias addnewgag {#play {@sppath/general/misc/confman.wav} @vol;
#alarm 0.100 {#say {This prompt allows one to add a string that they would like to be gagged either completely or just from the speach queue. In order to do this, please use the options below} VoiceOnly};
#pick {P:Creating a new gag|
What line are we gagging today? @newgag:setgagline|
What kind of the gagging method would you like? @gagmethod:setgagmethod|
What file is this going to be stored in? @gagfile:setgagfile|
I'm done and want to finish:pushnewgag|
I didn't mean to use this, please abort:#abort}}
#alias setgagline {
#alarm 0.100 {#say {please enter the line that you would like to be gagged, if parts of it are not static, E.G random numbers or words, replace this bit by an asterisc, *} VoiceOnly};
#prompt newgag {Enter the line here.};
addnewgag}
#alias setgagmethod {
#alarm 0.100 {#say {please choose one of the methods below:} VoiceOnly};
#pick {P:Method?|
Omit the line from my speech queue but leave it in the output window:#var gagmethod voice|
Omit the line both from the output window and from my speech queue:#var gagmethod all};
addnewgag}
#alias setgagfile {
#alarm 0.100 {#say {Due to VIPMud limitations, a file cannot exceed 32000 characters in length, this is why it is recommended to sort your gags into categories, so please choose from one of the files below:} VoiceOnly};
#pick {P:What file are we using today?|
Activity related gags:#var gagfile ActivityGags|
Ship Related Gags:#var gagfile ShipGags|
Miscellaneous gags:#var gagfile MiscGags|
Vehicle Related gags:#var gagfile VehicleGags};
addnewgag}
#alias pushnewgag {#if {%defined(gagfile)=0 or %defined(gagmethod)=0 or %defined(newgag)=0} {#alarm 1 {#say {you have not filled out all the required fields with rellivant information}; #play {@sppath/general/misc/boop.wav} @vol;#abort}} {
#file 3 {%CharInfo(MudName)/gags/@gagfile.set};
#forall {@newgag} {
#write 3 {~#trigger {%i} {~#gagline @gagmethod}}};
#close 3;
#unload {gags/@gagfile.set};
#load {gags/@gagfile.set};
#unvar gagmethod;#unvar newgag;#unvar gagfile;#alarm 1 {#say {Complete!}; #play {@sppath/general/misc/loadingfile.wav} @vol}}}
#alias miscgagtoggle {
#if {@MiscGags="disabled"} {#var MiscGags "enabled";#load {@scpath/gags/MiscGags.set}} {#var MiscGags "disabled";#unload {@scpath/gags/gags.set}}}
#alias vehiclegagtoggle {
#if {@VehicleGags="disabled"} {#var VehicleGags "enabled"; #unload {@scpath/gags/VehicleGags.set}} {#var VehicleGags "disabled";#load {@scpath/gags/VehicleGags.set}}}
#alias activitygagtoggle {
#if {@ActivityGags="disabled"} {#var ActivityGags "enabled";#load {@scpath/gags/ActivityGags.set}} {#var ActivityGags "disabled";#unload {@scpath/gags/ActivityGags.set}}}
#alias shipgagtoggle {
#if {@ShipGags="disabled"} {#var ShipGags "enabled";#load {@scpath/gags/ShipGags.set}} {#var ShipGags "disabled";#unload {@scpath/gags/ShipGags.set}}}
#alias gagconfig {#play {@sppath/general/misc/confman.wav} @vol;
#pick {P:Please select an option below|
Activity-related gags (@ActivityGags):activitygagtoggle|
Ship-related gags (@ShipGags):shipgagtoggle|
Vehicle-related gags (@VehicleGags):vehiclegagtoggle|
Misc Gags (@MiscGags):miscgagtoggle|
Open Activity gags file for editing:#edit {%CharInfo(MudName)/gags/ActivityGags.set}|
Open Vehicle gags file for editing:#edit {%CharInfo(MudName)/gags/VehicleGags.set}|
Open misc gags file for editing:#edit {%CharInfo(MudName)/gags/MiscGags.set}|
Open ship-related gags file for editing:#edit {%CharInfo(MudName)/gags/ShipGags.set}}}
#key {alt-f2} {gagconfig}

View File

View File

View File

View File

82
scripts/keys.set Normal file
View File

@@ -0,0 +1,82 @@
;unneeded keys
#var badkeys {numpad2|numpad4|numpad5|numpad8|numpad9|numpad/|numpad*|control-a|shift-pageup|shift-pagedown|control-pageup|control-pagedown}
#ForAll @badkeys {#gunkey %i}
;buffer keys
#key {Alt-shift-right} {~buffer~ add}
#key {alt-shift-left} {~buffer~ delete}
#key {alt-left} {~@buffer~ backward}
#key {alt-right} {~@buffer~ forward}
#key {alt-pageup} {~@buffer~ scrollup}
#key {alt-pagedown} {~@buffer~ scrolldown}
#key {alt-up} {~@buffer~ up}
#key {alt-down} {~@buffer~ down}
#key {alt-1} {~@buffer~ 1}
#key {alt-2} {~@buffer~ 2}
#key {alt-3} {~@buffer~ 3}
#key {alt-4} {~@buffer~ 4}
#key {alt-5} {~@buffer~ 5}
#key {alt-6} {~@buffer~ 6}
#key {alt-7} {~@buffer~ 7}
#key {alt-8} {~@buffer~ 8}
#key {alt-9} {~@buffer~ 9}
#key {alt-0} {~@buffer~ 10}
#key {alt-home} {~@buffer~ top}
#key {alt-end} {~@buffer~ bottom}
#key {alt-delete} {~@buffer~ clear}
#Key ALT-SHIFT-DELETE {~@buffer~ clearall}
#key {control-shift-enter} {~@sp-settings buffer sounds}
;soundpack volume and behavior
#key {f5} {~@sp-settings General volume}
#key {f6} {~@sp-settings ambiance volume}
#key {f7} {~@sp-settings in and out of character communications volume}
#key {f8} {~@sp-settings planetary music volume}
#key {control-f5} {~@sp-settings clocks volume}
#key {control-f6} {~@sp-settings Combat music volume}
#key {control-f7} {~@sp-settings IC social volume}
#key {control-f8} {~@sp-settings OOC social volume}
#key {alt-f5} {~@sp-settings Ground Combat volume}
#key {alt-f6} {~@sp-settings harvesting activity volume}
#key {alt-f7} {~@sp-settings Salvage activity volume}
#key {alt-f8} {~@sp-settings volume for games such as Pilot's Parody}
#key {shift-f5} {~@sp-settings starship combat volume}
#key {shift-f6} {~@sp-settings ship volume}
#key {shift-f7} {~@sp-settings ship movement volume}
#key {shift-f8} {~@sp-settings vehicle volume}
#key {f9} {~@sp-settings IC social sounds}
#key {f10} {~@sp-settings OOC social sounds}
#key {alt-f9} {~@sp-settings panning of sounds}
#key {alt-f10} {~@sp-settings pitch-shifting sounds}
#key {alt-f11} {~@sp-settings ambiance}
#key {control-f9} {~@sp-settings planetary music}
#key {control-f10} {~@sp-settings space combat music}
#key {control-f11} {~@sp-settings weather sounds}
#key {alt-f12} {~@sp-restart}
#key {Shift-alt-f9} {~@sp-settings Interrupt OOC Social sounds when the next one plays}
#key {f2} {~@sp-settings}
#key {control-s} {ActualSave;#say {Client-side Soundpack Settings have been saved successfully!} VoiceOnly}
#key {alt-n} {addnewgag}
#key {alt-shift-h} {localsphelp}
#key {Shift-f1} {~@sp-toggle}
#key {control-f2} {mainvoldown}
#key {Control-f3} {mainvolup}
#key {alt-f3} {intromusictoggle}
#key {control-shift-r} {#pc 0 stop;#reload; ~@sp-restart}
#key f11 {#pc 0 stop; #say {All currently playing sounds have been stopped.}}
#key {control-f1} {smute}
#key {alt-\} {rawinput}
#key {control-`} {#if {@commandsinoutput="enabled"} {#var commandsinoutput "disabled";#Configure DisplayCommandsInOutput False;#say {commands will no longer be displayed in the output window.}} {#var commandsinoutput "enabled";#Configure DisplayCommandsInOutput true;#say {Commands will now be displayed in the output window.}}}
#key {alt-control-v} {checkforupdates}
#key {alt-v} {%clipboard}
#key {shift-f4} {
#if {@devmode = "disabled"} {
#var devmode "enabled";
#load {@scpath/dev.set};
#say {Developer mode is now active}
} {
#var devmode "disabled";
#unload {@scpath/dev.set};
#say {Developer mode is no longer active}
}
}
#key {alt-shift-enter} {~@buffer link}

27
scripts/main.set Normal file
View File

@@ -0,0 +1,27 @@
;core variables
#var clientversion 1
#var loadtask {soundpack|keys|aliases|updator|misc|gagcreator|pathupdator}
#var settings {rawpass|miscgags|shipgags|vehiclegags|activitygags|intromusic|vol|commandsinoutput|devmode}
#var speech "disabled"
;Initialising the script files
#ForAll @loadtask {#load {@scpath/%i.set}}
;Reading and writing Settings.
#File 6 {settings.set} 1
#var num 1
#ForAll @settings {
#read 6 {%i} @num;
#math num {@num + 1}};
#close 6
#trigger {Welcome to: cosmic rage!} {
#if {@intromusic = "enabled"} {
#if {@IntroPlaying = 1} {#pc @introhandle stop;#var IntroPlaying 0};
#playloop {@sppath/music/IntroMusic/DefaultIntro.wav} @vol; #var introhandle %playhandle; #var IntroPlaying 1}} {} AnyCase
#TRIGGER {synaptic signal verified. Sleep mode disengaged. Welcome back to Cosmic Rage!} {#if {@IntroPlaying = 1} {#pc @introhandle stop; #var IntroPlaying 0}; ~@sp-register vip;~@sp-version}
#trigger {Your synaptic signal wavers for a moment, then returns with a snap!} {#if {@IntroPlaying = 1} {#pc @introhandle stop; #var IntroPlaying 0}; ~@sp-register vip;~@sp-version}
#if {@rawpass = "enabled"} {makebetter}
#if {@activitygags = "enabled"} {#load {gags/activitygags.set}}
#if {@vehiclegags = "enabled"} {#load {gags/vehiclegags.set}}
#if {@shipgags = "enabled"} {#load {gags/shipgags.set}}
#if {@miscgags = "enabled"} {#load {gags/miscgags.set}}
#if {@devmode="enabled"} {#load {@scpath/dev.set}}

21
scripts/misc.set Normal file
View File

@@ -0,0 +1,21 @@
#trigger {extracted link: &link} {
#gagline all;
#clipboard @link;
#say {Extracted and coppied @link}
}
#alias localsphelp {#say {
Greetings, Fellow Wanderer!
My name is The Cosmic Rage Immersion Scripts V @clientversion Sounds V @SoundsVersion.
I'm Installed at: @scpath.
My sounds are located at: @sppath.
If you want to update me, go to %replace(@scpath,@rightofpath,) and run Updator.bat.
Please keep me updated for the best experience! (Pleading Smiley).
Changelog:
14: you can now press control alt v to check updates.
You can now press alt-v to paste the contents of your clipboard directly, bypassing all aliases and vip mud filters, useful in multy lined editors.
15: You can now read your changelog by pressing alt shift h or typing localsphelp.
16. Hopefully fixed a bug with keys partially not loading.
17. Removed several unnecessary globally defined keys and aliases as they often cause more trubble than good. The volume of vip mud's sound handler will be always equal to 100 from now onwards.
18. Completely rewrote the script for soundpack developers, making it more convenient to use and its functions smarter.
You can now press alt shift enter to copy a link from your current buffer message if it has a link in its contents.
End Of Changelog.}}

44
scripts/pathupdator.set Normal file
View File

@@ -0,0 +1,44 @@
#alias loadpathchangeprompt {
#alarm 0.05 {#say {This function allows the user to alter the currently defined paths for the soundpack to load and should be used in cases when you moved your scripts and sounds folders to a different location/locations. With this in mind, would you like to continue?} VoiceOnly};
#pick {P:Are you sure?|
yes:pathconfig|
no:#abort}}
#alias pathconfig {
#alarm 0.100 {#say {Choose a path to edit, and once satisfied, press 'apply' to continue} VoiceOnly};
#pick {P:Soundpack path Configuration:|
Choose the disk where your scripts are stored, currently, (@scriptdisk):diskforscripts|
Choose the disk where your sounds are stored, currently (@sounddisk):diskforsounds|
Path for scripts (@tempscpath), press enter to edit:pathforscripts|
Path for sounds (@tempsppath), press enter to edit:pathforsounds|
Apply:finishpathchange}}
#alias diskforscripts {
#alarm 0.50 {#say {please enter the volume of the disk where your scripts are stored, it should be capitalized at all times, examples include, C, D, H, G...} VoiceOnly};
#prompt scriptdisk {Disk?};
pathconfig}
#alias diskforsounds {
#alarm 0.50 {#say {please enter the volume of the disk where your sounds are stored, it should be capitalized at all times, examples include, C, D, H, G...} VoiceOnly};
#prompt sounddisk {Disk?};
pathconfig}
#alias pathforscripts {
#alarm 0.50 {#say {Please enter a path, without disk lable, to the directory with the .set files located in} VoiceOnly};
#prompt tempscpath {Path to scripts};
pathconfig}
#alias pathforsounds {
#alarm 0.50 {#say {Please enter a path, without disk lables, to the directory with the sound folders located in} VoiceOnly};
#prompt tempsppath {Path to sounds};
pathconfig}
#alias finishpathchange {
#delfile {%CharInfo(MudName)/loader.set};
#file 1 {%CharInfo(MudName)/loader.set};
#write 1 {#var scpath {@scriptdisk:\@tempscpath}};
#write 1 {#var sppath @sounddisk:{@tempsppath}};
#close 1;
#alarm 0.50 {#say {Press enter to reload} VoiceOnly};
#pick {P:We're about to reload!|
Continue:#reload}}
#key {shift-f2} {loadpathchangeprompt}

BIN
scripts/settings.set Normal file

Binary file not shown.

15
scripts/soundpack.set Normal file
View File

@@ -0,0 +1,15 @@
#trigger {$sphook &{action}:&{soundpath}:&{volume}:&{pitch}:&{pan}:&{id}} {
#if {@action = "loop"} {#playloop {@sppath/@soundpath.wav} @volume; #var @id %playhandle};
#if {@action = "playrec"} {#play {@sppath/@soundpath.wav} @volume; #var @id %playhandle};
#if {@action = "play"} {#play {@sppath/@soundpath.wav} @volume};
#if {@pan <> "na"} {#math pan {@pan * 50}; #pc %playhandle pan @pan};
#if {@pitch <> "na"} {#pc %playhandle frequency @pitch} {#pc %playhandle frequency 44100};
#if {@action = "stop"} {#if {%defined(@id) = 1} {#pc %var(@id) stop}};
#if {@action = "adjustsound"} {#if {%defined(@id) = 1} {
#if {@volume <> "na"} {#pc %var(@id) volume @volume};
#if {@pan <> "na"} {#pc %var(@id) pan @pan};
#if {@pitch <> "na"} {#pc %var(@id) frequency @pitch}
}};
#gagline all;
#if {%playhandle=0} {#SetSpeech system stop;#say {Failed to play @soundpath.}}}
#trig {$buffer *} {#gagline all; #say %1 voiceonly}

19
scripts/updator.set Normal file
View File

@@ -0,0 +1,19 @@
#var rightofpath {%replace(@scpath,\,|)}
#var rightofpath %ReverseList(@rightofpath)
#var rightofpath %pop(rightofpath)
#load {@sppath/version.set};#unload {@sppath/version.set}
#trigger {$soundpack &client last version: &remoteversion} {
#gagline all;
#if {%IfWord(@client,vip,"|")} {#var remoteclientversion @remoteversion;#alarm 2 {checkclientversion}} {#var remotesoundsversion @remoteversion;#alarm 4 {checksoundsversion}}}
#alias checksoundsversion {
#math soundscondition {@remotesoundsversion - @SoundsVersion};
#if {@soundscondition>0} {#say {attention! Sound Updates found! Current version: @SoundsVersion. New Version: @remotesoundsversion};#play {@sppath/general/misc/spsave.wav} @vol};
#if {@soundscondition>0 or @clientcondition>0} {#say {Hint: To update the soundpack, navigate to %replace(@scpath,@rightofpath,) folder, run the file named updator.bat, and wait until the installation process completes. This will download and apply all available updates automatically.}}}
#alias checkclientversion {
#math clientcondition {@remoteclientversion - @clientversion};
#if {@clientcondition>0} {#say {attention! soundpack script Updates found! Current version: @clientversion. New Version: @remoteclientversion}; #play {@sppath/general/misc/spannouncement.wav} @vol}}
#alias checkforupdates {#if {@updatechecking=1} {#say {I'm Checking for updates already, Please hold on} VoiceOnly;#play {@sppath/general/misc/boop.wav} @vol} {
#say {Checking for updates, this will take a few seconds.} VoiceOnly;
#var updatechecking 1;
~@sp-version;
#alarm 5 {#if {@soundscondition<1 and @clientcondition<1} {#say {No updates found!};#play {@sppath/general/misc/logoutold.wav} @vol; #unvar updatechecking} {#unvar updatechecking}}}}