Particle's Custom RPG
General => Common Topic Symposium => Topic started by: KoRo on March 13, 2014 11:35 pm CDT
-
***UPDATED TO v1.04 (May 6th, 2014)***
After months and months of slowly building it up function by function, I have polished and finished an acceptable version of my own mining script. It's not ultra efficient, but damn is it powerful if I do say so myself. Features include:
- Auto-correct position if you don't strike the spike after a certain amount of time (i.e. in case you go off the spike)
- Auto-store Thorr's Hammer if someone you don't like joins the game
- Auto-retrieve Thorr's Hammer if the person/people you don't like leaves/leave the game
- Auto-store gems
- Record time spent mining
- Record value of gems put in storage
- Calculate and display total gem value mined
- Calculate and display your net worth (based on gems stored, coins on you, and coins in bank)
- Calculate and display your mining rate between gem storage sessions
- Calculate and display your overall average mining rate
- Menu modifications to DeusChatbind.cs to see and/or announce your mining stats and current auto-store option
- Ability to toggle auto-store Thorrs Hammer on/off from the menu
Because I'm not a super-ultra genius, it does require a few other scripts or script packs which, AFAIK, most of us have already. These include:
- Deus RPG Pack for DeusRPG::FetchData() and proper mining menu integration
- Presto for Event::attach();, Schedule();, and Match::string();
- You might be able to use these as long as you just have event.cs, schedule.cs, and match.cs, which may or may not come with other packs. Not sure about this one.
- Cowboy HUD (or an equivalent script) to retain access to storage while at spike
- convertTimeFormat.cs to properly format the timer output. Another function I wrote and will include with Caboose Mining.
I figured that if I'm writing scripts for a 16 year old game, there's really no reason for me to keep it to myself. Plus, I'm always open to feedback from those of you who are qualified. So without further ado, here are the two scripts (attached to this post). Enjoy at your leisure.
-
Thanks for sharing it Koro. Even though its about 12 years late I still appreciate your work haha.
-
I also have a version that includes a whitelist, rather than a blacklist, that will only use Thorr's Hammer if no one else is on (except the people on your whitelist). Just throwing that out there.
-
I also have another version that will convert the time from within the script (using a different timekeeping method inspired by rJ) so you don't have to download convertTimeFormat.cs
-
Thank you for sharing caboose!
what a useful script.
Deus mining sux :(
-
So then get on the server and start using it! ;)
-
i have a problem.
i put it in to configs folder and modified the autoexec.cs to add the line exec("CabooseMining.cs");
and i joined the game and turned on the Deus Mining menu. but i couldnt find the "Start CabooseMining"
whats wrong??
Caboose mining menu only showed when i paste 'exec("CabooseMining.cs");' into the console, but this way is too pretty inconvenient :/
its great mining script for thorrs hammer cuz it has proper delay to backward (thorrs hammer's swing is too slow)
thx for sharing!!
-
Hmm, I didn't consider this, but depending on where you placed the line exec("CabooseMining.cs");, it could be getting overwritten by DeusInstall.cs. Make sure exec("CabooseMining.cs"); is placed at the very end of your autoexec.cs file and see if that fixes it.
-
hmmm.. i already did like that..
-
Would you mind copy/pasting your autoexec.cs contents on here?
-
exec("presto\\Install.cs");
Include("DeusRPGPack\\DeusInstall.cs");
exec("youbashed.cs");
exec("sneekanim.cs");
exec("afkmodule.cs");
exec("TScript_Config.cs");
exec("autotags.cs");
exec("cdfunk.cs");
exec(autoparty);
exec("cdchat.cs");
exec("z0dd_chat.cs");
exec("autoinvite.cs");
exec("z0dd_ski.cs");
exec("autostore.cs");
exec("cdwhistler\\cdfunk.cs");
exec("cdwhistler\\cdafk.cs");
include("presto\\Match.cs");
include("presto\\Event.cs");
exec("CabooseMining.cs");
thx
-
Alright Master, here's v1.01. I included a function to delay the menu updater by 10 seconds to (hopefully) give Deus enough time to do its thing. Give this a whirl and see if it works. Note that I changed the file name to reflect the updated version. Be sure you change the filename in your autoexec.cs so that it doesn't accidentally execute the old version.
-
Interesting. Seems like that fix didn't change anything. I just included a short
schedule("onetime::menu::update();", 10); //Obvs, will execute 10 seconds after CabooseMinings.cs executes. Hopefully that will give Deus enough time to do its thing.
function onetime::menu::update() {
if(getSimTime() < 60) { //Insurance against double-executing and screwing things up. If the game is open for more than a minute, this will never execute
cabmining::menu::update(%autostore::status);
}
}
Anyone have any ideas as to why it's not overwriting DeusChatbind.cs unless it's executed in the console?
-
If I am right, autoexec is started before the scheduler is started...either that or it was the scheduler is reset within a short time...you could just intercept one of the on game load functions (can't remember off hand). Like onlobbyload or something like that
-
Is it function EnterLobbyMode() ?
function EnterLobbyMode()
{
schedule("ELM();", 0);
}
function ELM()
{
if($playingDemo)
{
setCursor(MainWindow, "Cur_Arrow.bmp");
disconnect();
startMainMenuScreen();
GuiLoadContentCtrl(MainWindow, "gui\\Recordings.gui");
}
else
{
$InLobbyMode = true;
GuiLoadContentCtrl(MainWindow, "gui\\Lobby.gui");
CursorOn(MainWindow);
}
}
-
I think I found the reason why. Upon executing "CabooseMining101.cs" for the very first time, the function cabmining::menu::update() is not defined, and my script is attempting to call that function before it's defined. I kept getting an "cabmining::menu::update: unknown function" error in the console upon starting Tribes. Switching the order of events so that it's called AFTER it's defined seems to have fixed it. Silly me. Rookie move (but for some reason I thought Tribes C didn't work quite like that.)
Here's version 1.02: It's basically v1.00 but with the order of events changed. Removed the schedule, and I didn't overwrite EnterLobbyMode().
-
***UPDATE***
Added some functionality. More menu options. Cleaner drop notifications. Functionality for Hammer Pick. Mining Stats announcements. Mining stats breakdown. etc
-
Nice update!!! it works perfectly!!! thx!
-
Hey master, there was one teeny tiny little issue I forgot to change in 1.03. I updated the file, but kept the version number the same, so if you would, can you re-download CabooseMining103.cs and try it?
I forgot to change the Stats Recall code to show your next mining goal (it used to just say "A this rate, I will get 1 Billion coins in XX hours"). After you reach 1 billion, it should say "A this rate, I will get 2 Billion coins in XX hours". Thx
-
I did it, and it works fine for me hehe
-
well, we'll see if it works fine once you get $1 Billion coins :P thanks
-
**UPDATE**
Semi-big update here. I changed the original blacklist to be a whitelist due to some reported issues with how the game reads player names, thus allowing blacklisted players to bypass the blacklist through clever manipulation.
Now you will have to manually add the players who you TRUST. So if anyone joins the server who is not on your whitelist, it will auto-store your Thorr's Hammer.
-
I am curious at the ways to thwart a blacklist :p
-
ohhh koro can you add the manual reset networth and gem total?
-
That option is already in there I think. It's been a few months. Let me revisit the script and I'll let you know.