What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Gold tracker to .txt file

Totemgold

Member
Joined
Sep 1, 2015
Messages
76
Reaction score
0
Hi, I would like to know if something like this would be possible:
A HB3 plugin who keeps track of the gold the account has. All it has to do is take the amount of gold it is seeing in game and print it in a text file. It would need to update every minute or so. From the .txt file I can then work and send the data to my database and update my gold real time.
 
Hi, I would like to know if something like this would be possible:
A HB3 plugin who keeps track of the gold the account has. All it has to do is take the amount of gold it is seeing in game and print it in a text file. It would need to update every minute or so. From the .txt file I can then work and send the data to my database and update my gold real time.
Theoretically, this should work.

1. Change
Code:
const int timeBetweenChecksInSeconds = 60;
to the desired number. 60 means 60 seconds.

2. Change
Code:
private static string writeLocation = System.IO.Path.Combine(Settings.CharacterSettingsDirectory, "GoldCount.txt");
to the desired location. Right now it will send the text to "Honorbuddy\Settings\{ServerName}\{CharacterName}\GoldCount.txt"

3. Change
Code:
writer.WriteLine(string.Format($"G:{wm.Gold} S:{wm.Silver} C:{wm.Copper}\t{DateTime.Now.ToString()}"));
to the desired format you want it in. Right now it's "G:123 S:12 C:55{TAB}{CurrentDateTime}. I'd be happy to show you how to change it if you wanted to.
 

Attachments

Theoretically, this should work.

1. Change
Code:
const int timeBetweenChecksInSeconds = 60;
to the desired number. 60 means 60 seconds.

2. Change
Code:
private static string writeLocation = System.IO.Path.Combine(Settings.CharacterSettingsDirectory, "GoldCount.txt");
to the desired location. Right now it will send the text to "Honorbuddy\Settings\{ServerName}\{CharacterName}\GoldCount.txt"

3. Change
Code:
writer.WriteLine(string.Format($"G:{wm.Gold} S:{wm.Silver} C:{wm.Copper}\t{DateTime.Now.ToString()}"));
to the desired format you want it in. Right now it's "G:123 S:12 C:55{TAB}{CurrentDateTime}. I'd be happy to show you how to change it if you wanted to.
Do I only need to put the plugin.cs in my plugin folder?
 
Back
Top