Author Topic: Caboose Mining v1.04  (Read 10987 times)

0 Members and 1 Guest are viewing this topic.

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Caboose Mining v1.04
« 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.
« Last Edit: May 6, 2014 11:14 pm CDT by KoRo »

Vivaxx

  • Gnoll Fighter
  • **
  • Posts: 89
  • Reputation: +2/-2
Re: Caboose Mining v1.0
« Reply #1 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.
Jonah, PCRPG player since 2002.

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #2 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.

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #3 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

Master

  • Orc Thrasher
  • ***
  • Posts: 153
  • Reputation: +6/-2
  • Steam / Xfire : ads8023
Re: Caboose Mining v1.0
« Reply #4 on: March 19, 2014 05:14 am CDT »
Thank you for sharing caboose!

what a useful script.

Deus mining sux :(

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #5 on: March 19, 2014 12:31 pm CDT »
So then get on the server and start using it! ;)

Master

  • Orc Thrasher
  • ***
  • Posts: 153
  • Reputation: +6/-2
  • Steam / Xfire : ads8023
Re: Caboose Mining v1.0
« Reply #6 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!!
« Last Edit: March 20, 2014 04:42 am CDT by Master »

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #7 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.

Master

  • Orc Thrasher
  • ***
  • Posts: 153
  • Reputation: +6/-2
  • Steam / Xfire : ads8023
Re: Caboose Mining v1.0
« Reply #8 on: March 21, 2014 05:04 am CDT »
hmmm.. i already did like that..

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #9 on: March 21, 2014 05:47 pm CDT »
Would you mind copy/pasting your autoexec.cs contents on here?

Master

  • Orc Thrasher
  • ***
  • Posts: 153
  • Reputation: +6/-2
  • Steam / Xfire : ads8023
Re: Caboose Mining v1.0
« Reply #10 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

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #11 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.
« Last Edit: March 22, 2014 03:56 am CDT by KoRo »

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #12 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?

Bovidi

  • Undead Hero
  • ****
  • Posts: 216
  • Reputation: +1/-0
    • http://www.geocities.com/mygamepage101/orc
Re: Caboose Mining v1.0
« Reply #13 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

KoRo

  • Fat, Emo Robot
  • Centurian Lord
  • ********
  • Posts: 3,437
  • Reputation: +14/-6
Re: Caboose Mining v1.0
« Reply #14 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);
   }
}