Download
(2 Kb)
Download
Updated: 03/08/15 09:33 AM
Pictures
File Info
Compatibility:
Update 6 (1.6.5)
Update 5 (1.5.2)
Updated:03/08/15 09:33 AM
Created:07/12/14 01:28 AM
Monthly downloads:26
Total downloads:9,653
Favorites:20
MD5:
Guildinvite Continued  Popular! (More than 5000 hits)
Version: v1.9
by: Godwyn74, Garkin
This addon makes the inviting in guilds easy.
All you need to do is rightclick the name of the player
and the addon gives you a invite option for every guild
you have inviting rights.

This addon was once a fixed edition of Guildinvite but there is
not much left of the code of the original coder, so i removed the credits.
Many thanks to Garkin For helping this addon to survive.

Howto use:
- Richtclick a name in the chat.
- /gin <@name> <#id of the guild> (for example: /gin @JohnDoo 3)
- /gin debug
- /gin help
Update v1.1
Minor update to fix a bug where you rightclick twice on a name the guilds where shown double.

Update v1.0
Changed the original script where the addon was broken copletely. The player information data was changed in a recent ESO patch.
Archived Files (10)
File Name
Version
Size
Uploader
Date
v1.8
2kB
Godwyn74
11/11/14 05:35 AM
v1.7
2kB
Godwyn74
10/14/14 07:00 AM
v1.6.1
3kB
Garkin
10/11/14 10:10 AM
v1.6
2kB
Godwyn74
10/11/14 05:15 AM
v1.5
2kB
Godwyn74
10/06/14 03:16 AM
v1.4
2kB
Godwyn74
09/26/14 02:00 PM
v1.3
2kB
Godwyn74
09/21/14 03:59 AM
v1.2
2kB
Godwyn74
08/10/14 08:44 AM
v1.1
2kB
Godwyn74
07/13/14 02:22 AM
v1.0
2kB
07/12/14 01:28 AM


Post A Reply Comment Options
Unread 10/09/14, 07:02 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
I have found what was wrong, I have confused arguments name and rawName. Argument name contains valid decorated display name (@account), rawName contains undecorated display name (account).

Here is corrected "GuildInvite Continued.lua":
Lua Code:
  1. local isDebug = false
  2.  
  3. local function AddPlayerToGuild(name, guildid, guildname)
  4.     d(zo_strformat(GINV_GUILDINVITED, name, guildname))
  5.     GuildInvite(guildid, name)
  6. end
  7.  
  8. local function ManualInvite(option)
  9.     local options = {}
  10.     local searchResult = { zo_strmatch(option, "^(%S+)%s?(.*)") }
  11.     for i,v in ipairs(searchResult) do
  12.         if (v ~= nil and v ~= "") then
  13.             options[i] = zo_strlower(v)
  14.         end
  15.     end
  16.         if #options == 0 or options[1] == "help" then
  17.         d(GetString(GINV_HELP))
  18.         d("/gin debug")
  19.     elseif options[1] == "debug" then
  20.         isDebug = not isDebug
  21.         d("Debugging " .. (isDebug and "|c00FF00on|r" or "|cFF0000off|r"))
  22.     else
  23.         local gid = GetGuildId(options[2])
  24.         local guildName = GetGuildName(gid)
  25.         AddPlayerToGuild(options[1], gid, guildName)
  26.     end
  27. end
  28.  
  29. local ShowPlayerContextMenu = CHAT_SYSTEM.ShowPlayerContextMenu
  30. CHAT_SYSTEM.ShowPlayerContextMenu = function(self, name, rawName, ...)
  31.     ShowPlayerContextMenu(self, name, rawName, ...)
  32.     if isDebug then
  33.         d(zo_strjoin(nil, "Name: |cFFFFFF", name, "|r RawName: |cFFFFFF", rawName, "|r"))
  34.     end
  35.  
  36.     if not IsDecoratedDisplayName(name) then return end
  37.  
  38.     for i = 1, GetNumGuilds() do
  39.         local gid = GetGuildId(i)
  40.         if DoesPlayerHaveGuildPermission(gid, GUILD_PERMISSION_INVITE) then
  41.             local guildName = GetGuildName(gid)
  42.             AddMenuItem(zo_strformat(GINV_GUILDINVITE, guildName), function() AddPlayerToGuild(name, gid, guildName) end)
  43.         end
  44.     end
  45.     if ZO_Menu_GetNumMenuItems() > 0 then
  46.         ShowMenu()
  47.     end
  48. end
  49.  
  50. SLASH_COMMANDS["/gin"] = ManualInvite
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 07:24 PM  
Dirtybyrd

Forum posts: 0
File comments: 12
Uploads: 0
Re: Re: Re: Re: Not Working

Originally Posted by Garkin
Originally Posted by Dirtybyrd
Ok, Thank you for answering so fast! But No to your questions. It is just simple names like john
Are you sure that you are using the latest version? The following line which was added in the latest version ends the script when rawName is not a valid account name:
Lua Code:
  1. if not IsDecoratedDisplayName(rawName) then return end
It means that GuildInvite should add menu items just for the links which contains valid account name.

If it doesn't work for you (maybe some error in IsDecoratedDisplayName function?) replace that line with:
Lua Code:
  1. if rawName:find("^@") ~= nil then return end
This line checks if the first character in the rawName is "@", it should be enough to identify valid account names.
Got it, Thank you very much
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 09:56 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Re: Re: Re: Not Working

Originally Posted by Dirtybyrd
Ok, Thank you for answering so fast! But No to your questions. It is just simple names like john
Are you sure that you are using the latest version? The following line which was added in the latest version ends the script when rawName is not a valid account name:
Lua Code:
  1. if not IsDecoratedDisplayName(rawName) then return end
It means that GuildInvite should add menu items just for the links which contains valid account name.

If it doesn't work for you (maybe some error in IsDecoratedDisplayName function?) replace that line with:
Lua Code:
  1. if rawName:find("^@") ~= nil then return end
This line checks if the first character in the rawName is "@", it should be enough to identify valid account names.
Last edited by Garkin : 10/06/14 at 11:15 AM.
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 09:19 AM  
Dirtybyrd

Forum posts: 0
File comments: 12
Uploads: 0
Re: Re: Not Working

Originally Posted by Garkin
Originally Posted by Dirtybyrd
Originally Posted by Godwyn74
1.5 uploaded with Garkin's edit

Can you explain how we are to use it please? I am still getting the "Account not found"
I have never tested that code, it was just guess what could be wrong.
Try to type /gin debug and then invite player again. Check names are printed to the chat - "Name: <name> RawName: <rawname>". Does the RawName contain correct account name? I.e. is there "@" as the first character? Are there some special or control characters?

Ok, Thank you for answering so fast! But No to your questions. It is just simple names like john
Last edited by Dirtybyrd : 10/06/14 at 09:20 AM.
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 08:07 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Re: Not Working

Originally Posted by Dirtybyrd
Originally Posted by Godwyn74
1.5 uploaded with Garkin's edit

Can you explain how we are to use it please? I am still getting the "Account not found"
I have never tested that code, it was just guess what could be wrong.
Try to type /gin debug and then invite player again. Check names are printed to the chat - "Name: <name> RawName: <rawname>". Does the RawName contain correct account name? I.e. is there "@" as the first character? Are there some special or control characters?
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 07:44 AM  
Dirtybyrd

Forum posts: 0
File comments: 12
Uploads: 0
Not Working

Originally Posted by Godwyn74
1.5 uploaded with Garkin's edit

Can you explain how we are to use it please? I am still getting the "Account not found"
Report comment to moderator  
Reply With Quote
Unread 10/06/14, 03:19 AM  
Godwyn74
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 13
Uploads: 1
1.5 uploaded with Garkin's edit
Report comment to moderator  
Reply With Quote
Unread 10/01/14, 05:24 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Re: bug

Originally Posted by Walkyrianne
v 1.4

function list is correct but error : account not found :/
It is probably because you have to use display (account) name if you want to invite someone to the guild.

This will disable menus for character names, so it won't show error messages:
Lua Code:
  1. local ShowPlayerContextMenu = CHAT_SYSTEM.ShowPlayerContextMenu
  2. CHAT_SYSTEM.ShowPlayerContextMenu = function(self, name, rawName, ...)
  3.     ShowPlayerContextMenu(self, name, rawName, ...)
  4.     if isDebug then
  5.         d(zo_strjoin(" ", "Name:", name, "RawName:", rawName))
  6.     end
  7.  
  8.     if not IsDecoratedDisplayName(rawName) then return end --this line is added to the original code
  9.  
  10.     for i = 1, GetNumGuilds() do
  11.         local gid = GetGuildId(i)
  12.         if DoesPlayerHaveGuildPermission(gid, GUILD_PERMISSION_INVITE) then
  13.             local guildName = GetGuildName(gid)
  14.             AddMenuItem(zo_strformat(GINV_GUILDINVITE, guildName), function() AddPlayerToGuild(rawName, gid, guildName) end)
  15.         end
  16.     end
  17.     if ZO_Menu_GetNumMenuItems() > 0 then
  18.         ShowMenu()
  19.     end
  20. end
Report comment to moderator  
Reply With Quote
Unread 09/30/14, 04:19 AM  
Walkyrianne

Forum posts: 0
File comments: 1
Uploads: 0
bug

v 1.4

function list is correct but error : account not found :/
Report comment to moderator  
Reply With Quote
Unread 09/27/14, 08:11 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Originally Posted by Godwyn74
The context text menu works again as intended.
My thanks go to Garkin.
Thanks for your work and all hail the mighty Garkin.
Report comment to moderator  
Reply With Quote
Unread 09/27/14, 12:45 AM  
Godwyn74
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 13
Uploads: 1
The context text menu works again as intended.
My thanks go to Garkin.
Report comment to moderator  
Reply With Quote
Unread 09/24/14, 12:00 PM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Originally Posted by Godwyn74
Originally Posted by dominoid
Although this add-on's context menu shows up, all the default choices are missing now.

http://i.imgur.com/iegLKp9.jpg
Yea i noticed that myself allready. I will try to fix that asap.
My agenda is pretty full the comming days but i work on it when i have time.
No problem.
Report comment to moderator  
Reply With Quote
Unread 09/23/14, 03:10 PM  
Godwyn74
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 13
Uploads: 1
Originally Posted by dominoid
Although this add-on's context menu shows up, all the default choices are missing now.

http://i.imgur.com/iegLKp9.jpg
Yea i noticed that myself allready. I will try to fix that asap.
My agenda is pretty full the comming days but i work on it when i have time.
Report comment to moderator  
Reply With Quote
Unread 09/22/14, 09:48 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Although this add-on's context menu shows up, all the default choices are missing now.

http://i.imgur.com/iegLKp9.jpg
Last edited by dominoid : 09/22/14 at 09:48 AM.
Report comment to moderator  
Reply With Quote
Unread 09/21/14, 08:23 AM  
Eldorhaan
 
Eldorhaan's Avatar

Forum posts: 2
File comments: 142
Uploads: 0
Too excellent and thx to update this great addon
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.