Quantcast
Download
(63 Kb)
Download
Updated: 02/28/21 08:18 PM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Updated:02/28/21 08:18 PM
Created:02/28/21 08:18 PM
Monthly downloads:106
Total downloads:156
Favorites:1
MD5:
Categories:Group, Guild & Friends, TradeSkill Mods
6.3.5
FCO Guild Lottery/Raffle & dice throws
Version: 0.1
by: Baertram [More]
FCO Guild Lottery/Raffle & dice throws
This addon can be used as a dice throw addon and a guild sales lottery/raffle addon, based on the sales ranking of the guild's sales history data of the last x days (default 7, min 1, max 100).
You are also able to throw a random guild member # dice for a simple raffle.

It got 3 different types to roll dices:
  1. Normal dice throws (1 to 999 dice sides), and history
  2. Guild 1-5's member # dice throws (e.g. for a random guild member gift/present/whatever), and history
  3. Guild 1-5's sales-lottery dice throws (creat a ranking of the members having sold something and get the rolle seller's name), and history

Dependencies needed
You need the following libraries installed into your live/AddOns folder, each with their currently newest version available, in order to make this addon work:
LibAddonMenu
LibCustomMenu
LibHistoire - GuildHistory
LibDebugLogger (I can also recommand DebugLogViewer as an addition)


Chat commands vs. UI
The command /fcogl opens/closes the UI.
The command /fcogls opens the settings menu.

Please open the settings menu to read about the possible chat commands (slash commands).
e.g.
/dice <number>
/diceg1 to /diceg5
/glsnew, /gls and /glsstop

Slash commands used as you got the UI open will update the UI as well.
Chat commands are also able to open the UI, e.g. after a dice was rolled, if you enable this in the settings.

Settings menu
Use the chat command /fcogls or the UI's "Open settings" button (see below), or just press ESC -> select AddOn settings and then "FCO Guild Lottery".
Be sure to read the descriptions and tooltips.

Explanation of the UI
Please check the images section of this addon for the relating images, containing the red marker bubbles with the numbers I refer to here in this texts!

Image 1) - General UI, and normal dice roll

1: Roll the dice / Throw the dice
2: Choose the number of dice sides. Will be automatically changed to the number of guild members if you change to a guild via 5 (guild selection box), or guild members having sold something if you enable a guild sales lottery
3: Start a new guild sales lottery. A popup will ask if you really want to start a new one if currently a guild sales lottery is already active
4: Stop guild sals lottery. Only visible if guild sales lottery is active ( see image 3) )
5: Guild dropdown. Select the guild (red entries do not have a guild trader active and cannot be used for a guild sales lottery).
If you change the box and a guild sales lottery is active it will ask if you want to reset it. If you choose yes it will switch to the other guild and start a new lottery for it. If no lottery was selected it will stop the currently active guild sales lottery and just enable normal dice throws.
The entry -> No guild <- will select no guild so you are able to throw random dices with up to 999 sides (chosen at the editbox 2).
6: The search field for the list 7
7: List of guild sales lottery ranking. Only filled if a guild sales lottery is currently active. Will fill up with the sales data provided by LibHistoire of the selected guild and timeframe
8: Shows the guild sales lottery tab -> Right click for a context menu
9: Toggle the right box "dice throw history" (show/hide)
10: Open settings menu
11: Close the UI (slash command /fcogl toggles the UI visibility)
12: Shows the currently selected dice history type. If no guild is selected it will be Normal history. If a guild is selected it will be guild history and if a guild sales lottery is active it will be the guild sales lottery history. A dropdown arrow at the right of this text will appear if there are different history dates to select from (see image 3) ).
Selecting any entry will reset the current guild sales lottery and switch to this saved one. Your next dice throws will go on in the selected guid sales lottery then.
13: Search box for the dice throw history
14: The list of dice throws, showing the number, date and time and @accountName (character name) doing the dice throw + the dice sides and the (throw result) of that throw. 1 line = 1 throw -> See 16.
15: The "clear list" button. Will clear the currently shown dice history list and delete all entries, if the security question dialog shown will be accepted by the "yes" button. The entries will be deleted but the guild sales lottery will be kept and you could add new dice throws to it!
16: The dice roll result. D<number> is the number of dice sides, and (<roll>) is the rolled result number.

Image 2) Guild member index # dice throws

A guild was seleted at the guild dropdown (image 1, number 5).
1) The number of members in the selected guild. Is not changable as long as a guild is selected.
2) The dice throw history shows the guild throws done. Each throw will present a guild member index # of the number of guild members.
Can be used for a guild random present/gift roll e.g. or similar rolls.

Image 3) Guild sales lottery dice throws

A guild was seleted at the guild dropdown (image 1, number 5) and the guild sales lottery was started (image 1, button 3).
1) The number of members having sold anyting in the guild's shop -> Guild sales history ranking. Is not changable as long as a guild is selected and the guild sales lottery is active.
2) The stop button for the active guild sales lottery. A security dialog will ask before.
3) The list of the guild sales ranking in the selected timeframe. The current timeframe is shown above the guild drop down box!
4) The dice roll history for the guild sales lottery, showing the seller names which were rolled.
5) This arrow will open the dropdown box of the guild sales lotteries started. See 6.
6) Each line is a date and time as the lottery was started for the selected guildId, and shows the #<history entries in this guild sales lottery> at the end of the line.
Selecting any date row there will ask if the currently active guild sales lottery should be reset and will re-select this guild sales lottery then.
After that the next dice throws will be "added" to this existing lottery data!

Image 4) Delete guild sales lottery data at the dice throw history

This shows the bottom of the dice throw history.
1) Clear list button to clear the currently shown list of the dice throw history. The entries will be deleted but the guild sales lottery will be kept and you could add new dice throws to it!
2) Click the multi-select dropdown to see the given guild sales lotteries, if a guild sales lottery is currently active! Select the ones to delete, close the dropdown and click on the "junk" button right of it (see 3) to delete the selected entries.
3) Delete the selected guild sales lottery entries from the history. This will delete the complete history data and you won't be able to add dice throws to them later again. Only the currently active guild sales lottery will be kept active and can add new dice throws.



Dice throws:
Normal dice throws
Just use the UI and select the -no guild- entry from the guilds drop down box. Then press the "roll the dice" button.
The chat and the dice history will show you the result. You are able to change the sides of the dice with the text edit box next to the roll the dice button. Either enter a number or use the up/down keys to in-/decrease the dice sides. The maximum is 999. Minimum is 1.


Guild member # dice throws
Select a guild from the guilds drop down box. Then press the "roll the dice" button.
The chat and the dice history will show you the result. The sides of the dice will be the member count of the selected guild and you cannot change it! The dice result will be the index of the member in your guild so that you can use it for e.g. normal lotteries or random gifts etc.


Guild sales lottery dice throws
Prerequisites:
If you do not know LibHistoire then please read the librarie's description. It will fetch guild history data for your so that addons only needs this single source of data and do not query the history "per addon" again and again. The lib stores the data in the SavedVariables and handles updates of the history for you. Addons like MasterMerchant rely on the same data and thus should be provding exactly same results if used for the same timeframe and data.

If you want to use guild sales lottery ranking you fully need to update and sync LibHistoire to the time frame you will select for the lottery! The standard timeframe is the last 7 days, just like MasterMerchant does show it's 7 days sales ranking.
If you do not know how to update the LibHistoire data please read LibHistoire's descripion and/or MasterMerchant's howto section.

Auto update of the guild history data by the server can be really slow, so you can try t speed it up manually bs opening the guild panel (press G), switch to the history tab, select LibHistoire sales entry of that guild and press the keybind/button for "Show more" to fetch more history data, until LibHistoire's UI is showing yellow progress bars (means finished! / unfinished: light blue color) and the synched/linked chain icon appears on the LibHistoire UI. Remember to click refresh or else LibHistoire will not refresh the logs! After that, a best, do a /reloadui to update all data properly on your disk/LibHistoire SavedVariables file.

Do not press the keybind/button too fast, only once every 2 seconds e.g. or the server might do nothing or kick you for message spamming!

Dice throws
Select a guild from the guilds drop down box. Click on the "Start new guild sales lottery" button.
If any guild sales lottery was already active a dialog will ask if you want to reset the current and start a new one.

After the guild sales lottery is active you will see the "Stop guild sales lottery" button being shown and the left list shows the ranking of the sold items in the seleted timeframe.
Important: Changing the "days before" timeframe in the settings will need you to reload the UI!
Press the "roll the dice" button to roll the dice and find the member at the rolled sales rank.
The chat and the dice history will show you the result. The sides of the dice will be the member count of the selected guild whic have sold anything (number of different sellers in the ranking) and you cannot change it!


Thanks to
sirinsidiator for inventing LibHistoire and for all the help with the liband this addon
FooWasHere for ideas, and all the testing done
Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: