GuildToolS v 3.1 (formally GuildBank) Manual.

Table of Content

1. About GuildToolS
2. Installation
3. Using GuildToolS (AddOn)
   -BankScan
   -IncomingMail
   -OutgoingMail
   -GuildRosterScan
4. Using parser (GTS.exe)
5. Uploading to GBM
6. FAQ
7. List of /commands
8. Reading and using the code



1. About GuildToolS

GuildTools is a combination of tools for guild use.
Contains several parts:
GTS_Core - this is the main part of the addon that contains all the standard functions for GTS package.
GTS_BankScan (BS) - allows to scan characters possessions (including personal possessions and content of the bank) and parse it for the web site. Consists of 2 parts: WoW addon part and executable application for data parsing.
GTS_IncomingMail (IM) - Keeps track of every received item in local database, also gives capability to parse that data for web site. Consists of 2 parts: WoW addon part and executable application for data parsing.
GTS_OutgoingMail (OM) - Keeps track of every sent item in local database, also gives capability to parse that data for web site. Consists of 2 parts: WoW addon part and executable application for data parsing.
GTS_GuildRosterScan (GRS) – Scans the guild roster including character name, class, level, rank, professions*, main-alt relations*.
* - only if GTS specific guild note is filled out by player.
As of version 3.0 GTS is fully compatible with GuildBankManager (GBM) by Marshall "Silverwings" Radziwilko. A PHP application to manage guild bank items online, GBM Enables the user to Show Guild items in bank, Incoming Mail, Outgoing Mail and more... To see how to upload data directly to GBM see part 5.


2. Installation

************ Important *************
If you used older version of this AddOn (GuildBank or GTS under 3.0) you will have to remove it and then install GuildToolS 3.0+.
GTS is compiled for windows environment only. It is not guaranteed to work on MacOS or Linux, however the code is written in standard C and should be compilable on other operating systems. You will also need to download appropriate version of mysql.dll for your OS.

To remove GuildBank(GuildTools version under 3.0) do the following:
Remove GuildBank(GuildTools) folder from WoW/Interface/AddOns/ folder.
Run WoW.
Exit WoW.

To install GuildToolS 3.0+:
Unzip the content of the archive into WOW/ folder, where WOW is the location of your WoW (by default: c:/Program Files/World of Warcraft).

There is an optional component available, called ImagePack. This part contains all the WoW icons you might need in .jpg files. Images needed for html files.


3. Using GuildToolS

GuildToolS (GTS) is the combination of smaller addons each of which does something specific.
GTS_Core is the master addon and is required by all smaller parts, it also contains standard functions and GUI.
After installing GTS make sure the GTS_Core addon is enabled.
Typing '/gts info' in-game will display the available / commands for GTS.
As of version 3.1 GTS now has a GUI you can use in-game. To bring up the GUI just type /gts.



All of the subAddOns are disabled by default starting from 3.1. In order to enable subAddOn you can either run appropriate /command (/gts bson for Bank Scan, /gts imon for Incoming Mail, /gts omon for Outgoing Mail, and /gts grson for Guild Roster Scan) or enable it through the GUI by clicking on “Load now” button for appropriate subAddOn.



“Load now” button is only available when subAddOn is not loaded (which is indicated in the top-left corner), once subAddOn is loaded button will be disabled.



There is also a checkmark “load on log-in” for every subAddOn, if it is checked that subAddOn will be loaded by default for this character.
When subAddOn is loaded you can see the version of it to the left from "Load now" button, ultimately it should be the same as GTS_Core version.

Currently there are 4 subAddOns built into GTS:

Bank Scan:

This part of AddOn will scan the possessions of the character (including bags and bank) and parse it into html or text file.
GUI is located in the top portion of “Bank management” tab.



There are two custom options available for this subAddOn:
Scan on bank open (disabled by default) - will scan the content of the bank char every time the bank is opened.
Use sort (enabled by default) - Items in the html file will appear sorted by type and quality rather then in order they appear in the bags.

Below the custom options you can see status messages:
- Last scan date.
- Bank frame status (bank can be scanned only if bank frame is opened).
- Number of distinct items scanned on last scan together with number of items prices for which were available to the addon through LootLink at the time. Note that if vendor price for the item is 0 (like for enchanting materials) it will be considered as unknown.
- Addon used to get the prices for the items. (At this point only LootLink can be used, but I am working on incorporating Auctioneer as well).

On the right-hand side you can see 4 buttons:
Load now - to load BankScan (if not yet loaded).
Scan now - to scan the content of the bank (only available if bank frame is open).
Update - Will update the prices for already scanned items from the LootLink database.
Clear - will clear all the data stored for this character.

To scan items in possession of guild bank character follow the following steps:

- Run WoW and activate GuildToolS (GTS_Core and GTS_BankScan are needed, to activate GTS_BankScan either run /gts bson from the console or activate it through GUI).
- Log in as the character, whose possessions need to be scanned.
- Open the bank dialog window.
- Type '/gts bscan' to scan inventory or click “Scan now” button in the GUI.
- If BankScan succeeds you will get the message that it did, otherwise you will get error message, in that case try to eliminate cause of the error in messages description.
- Close WoW via exit button.

Your data should be saved in SV.lua file. Refer to part 4 on how to parse it into html or text file.

Incoming Mail:

This part of AddOn will record all the received items through inbox for later parsing it into html or text file.
GUI is located in the top portion of “Bank management” tab.



In the bottom you can see status messages:
- Dates the first and the last mail was logged using IncomingMail.
- Number of distinct items logged together with number of items prices for which were available to the addon through LootLink. Note that if vendor price for the item is 0 (like for enchanting materials) it will be considered as unknown.
- Addon used to get the prices for the items. (At this point only LootLink can be used, but I am working on incorporating Auctioneer as well).

On the right-hand side you can see 3 buttons:
Load now - to load IncomingMail (if not yet loaded).
Update - Will update the prices for already logged items from the LootLink database.
Clear - will clear all the data stored for this character.

IM automatically saves all the incoming items in SV.lua as long as it is active. To activate IM do the following:

- Run WoW and activate GuildToolS (GTS_Core and GTS_IncomingMail are needed, to activate GTS_IncomingMail either run /gts imon from the console or activate it through GUI).
- To have the logs saved close WoW via exit button.

IM does NOT grab your mail for you from the mailbox automatically. There were some issues with that implementation. You can use other mods to grab the mail for you. IM is tested to work with CT_MailMod 1.43 (most likely will not work with earlier versions).
Your data should be saved in SV.lua file. Refer to part 4 on how to parse it into html or text file.

Outgoing Mail:

This part of AddOn will record all the sent items through outbox for later parsing it into html or text file.
GUI is located in the bottom portion of “Bank management” tab.



In the bottom you can see status messages:
- Dates the first and the last mail was logged using OutgoingMail.
- Number of distinct items logged together with number of items prices for which were available to the addon through LootLink. Note that if vendor price for the item is 0 (like for enchanting materials) it will be considered as unknown.
- Addon used to get the prices for the items. (At this point only LootLink can be used, but I am working on incorporating Auctioneer as well).

On the right-hand side you can see 3 buttons:
Load now - to load OutgoingMail (if not yet loaded).
Update - Will update the prices for already logged items from the LootLink database.
Clear - will clear all the data stored for this character.

OM automatically saves all the incoming items in SV.lua as long as it is active. To activate OM do the following:

- Run WoW and activate GuildToolS (GTS_Core and GTS_OutgoingMail are needed, to activate GTS_OutgoingMail either run /gts omon from the console or activate it through GUI).
- To have the logs saved close WoW via exit button.

OM should log all the outgoing items regardless if you send it through standard dialog or through mods. OM is tested to work with CT_MailMod 1.43.

Your data should be saved in SV.lua file. Refer to part 4 on how to parse it into html or text file.

Guild Roster Scan:

This part of AddOn scans the guild roster including character name, class, level, rank, professions*, main-alt relations* for later parsing it into html or text file.
* - only if GTS specific guild note is filled out by player.
GUI is located in the top portion of “Guild management” tab.



There is one custom option available for this subAddOn:
Scan on guild roster update (disabled by default) - will scan the guild roster every time update to the roster is detected. It is HIGHLY URECOMENDED to use this option, because in the large guilds this will drain alot of resources to do a scan every time roster is updated.

Below the custom options you can see status messages:
- Last scan date.
- Number of members in guild, together with the number of members that filled out Guild note according to GTS standards (see below).
On the right-hand side you can see 3 buttons:
Load now - to load GuildRosterScan (if not yet loaded).
Scan now - to scan the guild roster (only available if you are member of guild).
Clear - will clear all the data stored for this character.
Update is not available for this subAddOn since it will essentially be a scan.

To scan guild roster follow these steps:

- Run WoW and activate GuildToolS (GTS_Core and GTS_GuildRosterScaner are needed, to activate GTS_GuildRosterScan either run /gts grson from the console or activate it through GUI).
- Log in as the character, whose guild roster needs to be scanned.
- Open the guild roster dialog window.
- Make sure entire guild roster is loaded (ie you can see all guild members).
- Type '/gts grscan' to scan guild members or press “Scan now” button in GUI.
- If GRS succeeds you will get the message that it did, otherwise you will get error message, in that case try to eliminate cause of the error in messages description.
- Close WoW via exit button.

In order for GRS to pick up guild members professions and main-alt relations guild note should be filled for every guild member in the following manner:
“GTS-A:Name;Prof1:100;Prof2:200;note”
Every note should begin with “GTS-“ case sensitive. This allows GRS to distinguish between note intended for it and random note.
GTS- is followed by 4 sections ; separated. Since the guild note is restricted to 32 characters this has to be a bit cryptic.
First section “A:Name;” represents the main-alt relation. If the character is main it should look like: “Main:;”, if the character is the alt of char named Name, it should look like “A:Name;”. “A” meaning that char is an alt and “Name” showing who’s alt it is. Note that name is case-sensitive.
Second section “Prof1:100;” represents the first profession of the char. Professions had to be shortened to fit in 32 character limit. Here’s the full list of professions and their shortened representation:
A  - Alchemy 
Q  - Armorsmith
BA - Axesmith
B  - Blacksmith
LD - Dragonscale Leatherworking
LE - Elemental Leatherworking
C  - Enchanting
E  - Engineering
EN - Gnome Engineering
EO - Goblin Engineering
H  - Herbalism 
L  - Leatherworking
BM - Macesmith 
M  - Mining
N  – None
S  - Skinning
BS - Swordsmith
T  - Tailoring
LT - Tribal Leatherworking
So, for example Goblin engineering with 300 skill will look like “EO:300;” and enchanter with skill 11 will look like “C:11;”.
Third portion is the second profession of the character. See second portion on how to fill it out.
Forth and last portion is a personal note of player. You can put pretty much whatever you want in there as long as you have space.
Examples of the guild note:
Say you have a main whose name is Blah and who is 300 in Armorsmith and 300 in Mining. The guild note for this char should look like:
“GTS-Main:;Q:300;M:300;”
Say, you also have an alt named Doh, who is 210 in Skinning and does not have other profession. Then the note for this char should look like:
“GTS-A:Blah;S:210;N:0;Blah’s bank”
There you have the personal note saying it is your bank char. This note only visible inside the game and will not be visible in html or text file.
Note that guild note should be without “ characters around it.
Also it is VERY important that the note is filled in properly, if it is not GRS might give an error during execution.

If the guild note is not filled as described above, the profession will be filled as “n/a” and every character will be considered a main.

Your data should be saved in SV.lua file. Refer to part 4 on how to parse it into html or text file.


4. Using Parser

All the parsers were combined into one executable in 3.0.

First off you will need to copy data file to the location where Parser can pick it up:
- Copy GTS_Core.lua file from WoW/WTF/Account/[your account name]/SavedVariables/GTS_Core.lua to WoW/Interface/AddOn/GTS_Core/SV/. Very important not to copy it to WoW/Interface/AddOn/GTS_Core/ because this will screw up the addon.

There are 4 batch files included in the apps folder. Each of them will generate html file for one of the parts:
BankParser.bat   – for GTS_BankScan
IMainParser.bat  – for GTS_IncomingMail
OMailParser.bat  – for GTS_OutgoingMail
RosterParser.bat – for GTS_GuildRosterScan
Running those will produce a ready to use html file in GTS_Core/html/ folder. Bank.html, inbox.html, outbox.html and roster.html representatively.

It is possible to customize the output of parser by running it with several flags. This is intended for advanced users with at least some knowledge of dos shell and html.

Advanced mode of GTS.exe:
Access to advanced mode of parser is available through command line interface. Basically GTS.exe is a combination of 6 parsers and 1 uploader (for GBM only) combined into one executable. To access one or another parser you will need to run GTS.exe with proper flag. Running GTS.exe with ‘-help’ flag will bring out all the available flags:
Available commands:
-upload     - Uploads all the data to the GBM server.
              See '-upload -help' for details.
-textupload - Generates flat files for upload to GBM server.
              See '-textupload -help' for details.
-bank       - Generates html file with the content of the bank.
              See '-bank -help' for details.
-textbank   - Generates text file with the content of the bank with user
               specified format.
              See '-textbank' for details.
-imail      - Generates html file with the list of received items.
              See '-imail -help' for details.
-textimail  - Generates text file with the list of received items with user
               specified format.
              See '-textimail' for details.
-omail      - Generates html file with the list of sent items.
              See '-imail -help' for details.
-textomail  - Generates text file with the list of sent items with user
               specified format.
              See '-textimail' for details.
-roster     - Generates html file with the list of guild members.
              See '-roster -help' for details.
-textroster - Generates text file with the list of guild members with user
               specified format.
              See '-textroster' for details.
For more details on ‘–upload’ and '-textupload' see part 5.
For each of the 4 sub-addons (BS, IM, OM, GRS) there are 2 types of parsers: html(bank, imail, omail, roster rep.) and text(textbank, textimail, textomail, textroster rep.). Html parsers will produce an html output file with all the data organized in neat tables. There are several modifiable variables, to see a full list you can run parser with ‘–help’ flag (eg ‘GTS.exe –bank –help’). Text mode on the other hand will produce the user formatted text strings per each entry in the database. This is most convenient for making sql statements for direct DB upload. On more information as for how to format your string run textparser without any flags (eg ‘GTS.exe –textbank’).
To produce the same output every time it is very useful to create a batch file with all your settings, you can also modify already existing .bat files.


5. Uploading to GBM

First you will need to have GBM of version 5.0+ installed and running. You will also need to set up a remote MySQL user. See GBM manuals for details.
Note that GBMuploader updates all the data from SV.lua file and overwrite any and all the data in the DB, so use it cautiously. If you do not want some of the data uploaded make sure to clear it through the addon first.
To perform the upload you will first need to copy data file to the location where uploder can pick it up:
- Copy GTS_Core.lua file from WoW/WTF/Account/[your account name]/SavedVariables/GTS_Core.lua to WoW/Interface/AddOn/GTS_Core/SV/. Very important not to copy it to WoW/Interface/AddOn/GTS_Core/ because this will screw up the addon.
After that you can run the uploader from the GTS_Core/apps/ folder. GBMuploader is part of GTS.exe program (see part 4 for details).
To get to the uploader part of GTS.exe you will need to run it with ‘-upload’ flag.
Running “GTS.exe –upload” will initiate upload on default settings (server=localhost, user=, password=blank, port=. If you want to change some or all of those settings this can be accomplished with additional flags (eg ‘–user ASD’ will change username to ASD) for full list of parameters see the help built-in in GTS.exe (run ‘GTS.exe –upload –help’).
It is very convenient to create batch file that will hold all of the log-in information, but it is unsecure, because batch files are not encrypted in any way, so it is up to you if you want to enter information every time or willing to risk.
GTS.exe outputs all the status information on standard output (screen if you will) it is very convenient to redirect all that information into the file, which can be accessed later on. To do that you will need to add one more parameter to the GTS.exe in the end (important: it has to be the last one) ‘>filename’ where filename is the name of file where you want log to be saved. Eg: ‘GTS.exe –upload –user me –host 192.168.0.1 >./log.txt’ will connect to GBM on server with IP 192.168.0.1 and log in as user ‘me’ and will log all the transactions in file log.txt, which will be created in current folder. Note that if you redirect output nothing will be printed on the screen and it might look like program has froze up, so before killing the process make sure the program actually froze up by checking the output file (log.txt in the case above) because terminationg program in the middle of upload can corrupt GBM’s database.
If you do not have the remote MySQL access you can use '-textupload' wich will creat a "flat-file" with sql statements that can be manually applied to the GBM database. This "flat-file" has some limitations since it does not have 2-way communication '-upload' does, thus it is not recomended to use "flat-file" unless you have no other choice.


6. FAQ

Q:
I cannot see the tooltips on the page. What did I do wrong?
A:
If you copied the text from the generated html file make sure you copied it all. Most likely you are missing java script at the top of the html file.

Q:
I just look at the generated html file and still can't see the tooltip, other people say they can see it.
A:
There is a setting in browser that disables Active content. Tooltip is actually active content, so if it is disabled you will not be able to see the tooltip.

Q:
I ran the script, but when I try to run GTS.exe it says that data was not found in SavedVariables.
A:
Make sure you follow all the steps:
- Run WoW and run /gts bscan with bank window opened. You should get message like: "Scan was successful ... run .exe" (or follow steps in part 3 for other parts of addon).
- Exit WoW, or at least log out from current character.
- Copy GTS_Core.lua from WoW/WTF/[AcountName]/SavedVariables/ to the addon folder (WoW/Interface/AddOns/GTS_Core/SV/)
- Run GTS.exe.

Q:
I have a batch file for textbank parser, but it does not work, if I place it in command line it works fine though, here it is:
GBM.exe –textbank INSERT INTO items (`name`) VALUES ( %n );
A:
% is a special character in batch files and you need to escape it, so write %% instead of %. In your example it should look like:
GBM.exe –textbank INSERT INTO items (`name`) VALUES ( %%n );


7. List of /commands

GuildTools: 
/gts debug    - toggles debug mode on/off (off by default). 
/gts info     - shows a help message.
/gts clear    - clears all variables (all data from all parts and all characters will be cleared!).

BankScan: 
/gts bson     - turns the BankScan addon on (unless it is already on).
/gts bssort   - toggles sorting option on/off.
/gts bscan    - performs the scan of possesions of this char for parsing into SV.lua.
/gts bsinfo   - shows a help message.
/gts bsclear  - clears all the BS data for current character.

IncomingMail:
/gts imon     - turns the IncomingMail addon on (unless it is already on).
/gts imreeval - updates vendor prices for stored item (LootLink is required).
/gts iminfo   - shows this screen.
/gts imclear  - clears database for this character.

OutgoingMail:
/gts omon     - turns the OutgoingMail addon on (unless it is already on).
/gts omreeval - updates vendor prices for stored item (LootLink is required).
/gts ominfo   - shows this screen.
/gts omclear  - clears database for this character.

GuildRosterScan:
/gts grson    - turns the GuildRosterScan addon on (unless it is already on).
/gts grscan   - scnas the guild roster (make sure guild roster is loaded).
/gts iminfo   - shows this screen.
/gts imclear  - clears database for this character (Saved with /gm imsave stays intact).

8. Reading and using the code.

GuildToolS is a freeware program and distributed as such. The source code for the executive is included in GTS_Core/apps/src/, there is also a project file for Dev-C++ (gcc for windows) included. Program is using freeware MySQL library for communication with GBM.
You are free to use this software, however if you want to distribute or modify it please contact me beforehand either through forums, game or via e-mail.