Particle's Custom RPG

General => Common Topic Symposium => Topic started by: KoRo on March 13, 2014 11:35 pm CDT

Title: Caboose Mining v1.04
Post 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:


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:


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.
Title: Re: Caboose Mining v1.0
Post by: Vivaxx on March 14, 2014 12:49 pm CDT
Thanks for sharing it Koro. Even though its about 12 years late I still appreciate your work haha.
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 14, 2014 01:17 pm CDT
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.
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 15, 2014 02:28 pm CDT
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
Title: Re: Caboose Mining v1.0
Post by: Master on March 19, 2014 05:14 am CDT
Thank you for sharing caboose!

what a useful script.

Deus mining sux :(
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 19, 2014 12:31 pm CDT
So then get on the server and start using it! ;)
Title: Re: Caboose Mining v1.0
Post by: Master on March 20, 2014 04:14 am CDT
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!!
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 20, 2014 08:04 pm CDT
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.
Title: Re: Caboose Mining v1.0
Post by: Master on March 21, 2014 05:04 am CDT
hmmm.. i already did like that..
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 21, 2014 05:47 pm CDT
Would you mind copy/pasting your autoexec.cs contents on here?
Title: Re: Caboose Mining v1.0
Post by: Master on March 21, 2014 10:26 pm CDT
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
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 21, 2014 11:02 pm CDT
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.
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 21, 2014 11:25 pm CDT
Interesting. Seems like that fix didn't change anything. I just included a short

Code: [Select]
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?
Title: Re: Caboose Mining v1.0
Post by: Bovidi on March 21, 2014 11:35 pm CDT
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
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 22, 2014 02:14 am CDT
Is it function EnterLobbyMode() ?

Code: [Select]
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);
   }
}
Title: Re: Caboose Mining v1.0
Post by: KoRo on March 22, 2014 02:31 am CDT
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().

Title: Re: Caboose Mining v1.0
Post by: KoRo on March 22, 2014 04:32 am CDT
***UPDATE***

Added some functionality. More menu options. Cleaner drop notifications. Functionality for Hammer Pick. Mining Stats announcements. Mining stats breakdown. etc
Title: Re: Caboose Mining v1.03
Post by: Master on March 22, 2014 08:32 am CDT
Nice update!!! it works perfectly!!! thx!
Title: Re: Caboose Mining v1.03
Post by: KoRo on March 22, 2014 11:42 am CDT
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
Title: Re: Caboose Mining v1.03
Post by: Master on March 22, 2014 08:20 pm CDT
I did it, and it works fine for me hehe
Title: Re: Caboose Mining v1.03
Post by: KoRo on March 23, 2014 01:22 am CDT
well, we'll see if it works fine once you get $1 Billion coins :P thanks
Title: Re: Caboose Mining v1.04
Post by: KoRo on May 6, 2014 11:15 pm CDT
**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.
Title: Re: Caboose Mining v1.04
Post by: Bovidi on May 13, 2014 03:45 pm CDT
I am curious at the ways to thwart a blacklist :p
Title: Re: Caboose Mining v1.04
Post by: Master on July 1, 2014 05:22 am CDT
ohhh koro can you add the manual reset networth and gem total?
Title: Re: Caboose Mining v1.04
Post by: KoRo on July 4, 2014 02:30 am CDT
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.