I did an update to lisas userfunction.
The idea was, to make the function work, independant from localisation and is based on the idea that itemtypestable.lua is build independant from localised clients ... please report, if this is not.
I tested this version on a german client. As I am not very good in things like coding and testing, this version is released as beta. Please feel free to report any bugs.
The main benefit goes to rock5 and lisa, who helped me in other threads on questions regarding to this topic.
It mainly contains lisas code with following changes:
- using itemtypestable.lua for localised names
- searches only backpacks 1-6 for ressources
- donates woods, ores, herbs
- minor changes for checking _type and _quality
This is a userfunction created for the purpose of donating gathered resources to your guild, inluding quality 8 guild resources from mini games.
It does not cover guild runes / guild stones / guild rubies, it is purely for herb / ore / wood.
Usage:
Code: Select all
GuildDonate(arg1, arg2, arg3)
- arg1 is the type of resource "ore", "wood", "herb" or "all"
- arg2 is the quality "white"(0), "green"(1) "blue"(2), "purple"(3), "orange"(4), "gold"(5)
You can also use numbers from 0-15 without quotes.
To use mini game resources use 8 witout quotes. - arg3 is if you want to also donate lesser quality "true", defaults to "false"
This is, because users have to be sure what they want to donate!
Examples
Code: Select all
GuildDonate()
Code: Select all
GuildDonate("all", 15, "true")
Code: Select all
GuildDonate("ore", "green")
Code: Select all
GuildDonate("herb","blue","true")
Code: Select all
GuildDonate("all", "green")
V 1.44 again by Rickster
same old functions plus added a new function with a table as argument.
example.
Code: Select all
GuildDonateItems({"Guild Stone", "Guild Rune", "Handcrafted Ruby"})