Guest Carnifex Posted September 29, 2010 Share Posted September 29, 2010 Rightclicking on a name in the chat opens a context menu with some option... Problems: 1. How to add a player to a group/raid/guild by only knowing his name (not the id :-( )? 2. Why is the lvlTELL-Widget not shown? o.O 3. Same Problems with getting lvl and class by temporary adding player to friendslist as in GuildGui1b. --> fixed (not it is shown corectly after 3 sec) 4. Some little bugfixes --> included BTW: Can somebody translate the russian and french locales? Quote Link to comment Share on other sites More sharing options...
Setras Posted September 30, 2010 Share Posted September 30, 2010 group.InviteByName( name ) As for all other things... Try to paste their names into chat with required slash command... I don't see a clever solution. Quote Link to comment Share on other sites More sharing options...
SLA Posted September 30, 2010 Share Posted September 30, 2010 group.InviteByName( name ) will be added in AO 1.1.02 (October 5th). But it is impossible to run slash-commands programmatically. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted September 30, 2010 Share Posted September 30, 2010 1. How can I get the id of a player, which is in the friendslist? --> this is an 1.1.04+ only feature -.- 2. But there is no raid.InviteByName(name) -.- (someone an idea for this problem?) 3. lvlTELL-Widget not shown -> fixed Now I get id from guild or group/raid (can only inspect then and only invite group members to guild) 4. Inspect is closed shortly after opening, why? o.O --> fixed with 2 sec timer Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted September 30, 2010 Share Posted September 30, 2010 Quote: But it is impossible to run slash-commands programmatically. But only pressing enter is much betther then typing "/inv [name]" and pressing enter. Quote Link to comment Share on other sites More sharing options...
Setras Posted October 3, 2010 Share Posted October 3, 2010 Quote: 2. But there is no raid.InviteByName(name) -.- (someone an idea for this problem?) Isn't a raid... Simply a group? Doesn't group invite work for raid? Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 3, 2010 Share Posted October 3, 2010 Quote: Isn't a raid... Simply a group? Doesn't group invite work for raid? I don't know, but there is group.Invite(playerID) and raid.Invite(playerID)(I can't test it with version 1.1.00) Quote Link to comment Share on other sites More sharing options...
SLA Posted October 5, 2010 Share Posted October 5, 2010 There are: group.Invite( unitId ) group.InviteByName( name ) raid.Invite( unitId ) P.S. Afaik, Raid always consists of 1 to 4 parties, so shouldn't group.InviteByName() function work in Raid? UPD: Maybe I'm wrong. If Raid members log out (without leaving the Raid), and then one of them log in, then looks like Raid still exists (surprise), but NO Party exists. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 8, 2010 Share Posted October 8, 2010 I will do this as soon as I have a bether internet-access than umts. I still have to download the patch for 1.1.02... Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 16, 2010 Share Posted October 16, 2010 Can someone say me, if AOChatExtension works in AO 1.1.04+? Quote Link to comment Share on other sites More sharing options...
SLA Posted October 16, 2010 Share Posted October 16, 2010 OK, I will test it, little bit later, this night. P.S. AO 1.1.04 already have a new function - raid.InviteByName( name ), at last I have discovered it from the leaked AO 2.0 API. EDIT: raid.InviteByName() was added in AO 1.1.04, not AO 2.0.00. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 16, 2010 Share Posted October 16, 2010 But at the moment group.InviteByName(name) is also working in raids (I have not tested, what happens, if the first group of the raid is full) Edit: Bugfix: It was not possible to add someone to ignore list, while he was temporary in the friendslist for gettinf zone+lvl+class-data from him. Knownbugs: -someone is invited to your gruop, if you click one His Name , wtf o.O Code: Error: addon AOChatExtension: func: GetAddonRelatedTexture, field, line: -1, defined: C, line: -1, [C] Error: addon AOChatExtension: func: SetInfoFromFriend, global, line: 126, defined: Lua, line: 112, [string "Mods/Addons/AOChatExtension/AOChatExtension..."] Error: addon AOChatExtension: func: OnSecondTimer, global, line: 344, defined: Lua, line: 337, [string "Mods/Addons/AOChatExtension/AOChatExtension..."] Error: addon AOChatExtension: UI::LuaGetAddonRelatedTexture: param 1 not a class nstl::basic_string<char> (type: nil), details: int __cdecl UI::LuaGetAddonRelatedTexture(struct lua_State *) Error: addon AOChatExtension: Error: addon AOChatExtension: Error: addon AOChatExtension: func: SetBackgroundColor, method, line: -1, defined: C, line: -1, [C] Error: addon AOChatExtension: func: SetInfoFromFriend, global, line: 127, defined: Lua, line: 112, [string "Mods/Addons/AOChatExtension/AOChatExtension..."] Error: addon AOChatExtension: func: OnSecondTimer, global, line: 344, defined: Lua, line: 337, [string "Mods/Addons/AOChatExtension/AOChatExtension..."] Error: addon AOChatExtension: Widgets::LuaSetBackgroundColor: param 2 not a class Lua::Table (type: nil), details: int __cdecl Widgets::LuaSetBackgroundColor(struct lua_State *) Quote Link to comment Share on other sites More sharing options...
Guest neFAST Posted October 17, 2010 Share Posted October 17, 2010 Nice plugin ! However "ignore player" does not work. Is it normal? Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 17, 2010 Share Posted October 17, 2010 what version did you have downloaded? The version in my last comment should fix this. Quote Link to comment Share on other sites More sharing options...
Guest neFAST Posted October 18, 2010 Share Posted October 18, 2010 I will try again this evening. Any idea why clicked players are invited to party? Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 19, 2010 Share Posted October 19, 2010 Nö, As you See, of you have a Look in the Code, this should Not Happen, but i and also Sole Otter German Player have nötiger this too. Quote Link to comment Share on other sites More sharing options...
SLA Posted October 20, 2010 Share Posted October 20, 2010 Quote: Sole Otter German Player have nötiger this too. ...which translates from iPod autocomplete as:Some other German player have noticed this too.Autocomplete is evil =)))Btw, EXCELLECT addon, I love it!!! But I couldn't test all its functions yet, because people gets very confused, when it invites them into party ) And I have just discovered why it does so:Code: elseif params.sender=="Push6" and (SelfHaveGroupInvRight() and (not IsInGroup(player))) or ((not raid.IsExist()) and group.GetMembers()==nil and (not IsPlayerSelf(player))) then Here, "or" completely splits the "if" statement conditions into two separate groups. Second group is VERY OFTEN "true":if (no raid) AND (no group) AND (player not clicked himself) then... group.InviteByName() ))To fix this bug, group ALL conditions after params.sender=="Push6" into ( and ), this way:Code: elseif params.sender=="Push6" and ( (SelfHaveGroupInvRight() and (not IsInGroup(player))) or ((not raid.IsExist()) and group.GetMembers()==nil and (not IsPlayerSelf(player))) ) then Please check all other "if" statements carefully! It will be true evil, if we will discover later, that this addon "automatically" do such bad things like quiting the Guild, etc., etc. Btw, since "AOChatExtension" have "Ignore player" ability, I think, this addon fully replaces your previous addon "SpamProtect", right?And this addon should hold a *cache* of, for example, last 10 player Levels/Zones. Because when we send private messages, we repeatedly click on the same player many times. Adding the same player to FriendList, to learn his Level/Zone again and again, is not very wise Also, it is better to remove the red "Oh, thats me!" button. Because, for example in GuildGui1b, red color means it is a dangerous option, like "If you click this, it will destroy something!" Better remove "Oh, thats me!" completely, and leave only the gray "Close" (and "Leave gruop/raid", when player is in group/raid) - that is enough.P.S. Russian localization attached File: AOChatExtension-RUS-20101020.zip Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 20, 2010 Share Posted October 20, 2010 Quote: Sole Otter German Player have nötiger this too. lol, this are some german word in an english sentence (next time I realy have to swich the language to english)There are much more feaures plant. Here is a short summerize.-[!!!]Whats happens, if player goes offline!?!-[!!!|getid from guildmember borken!!!-[0.3.3]show subzones, if in guild-[0.4]option button with: turn off/on playerdata (zone, lvl, class) + open whole chatlog + paste item-[0.6]chatlog with ingame UI (if you open it with a click on a players name with the filter to the messages of this player-[0.7]send event to SpamProtect to add Goldsellermsg by contextmenuoption and ban the Goldseller (thanks Regimardyl (German forum) for this idea)-[1.0]abbility to paste items in a special format to the chat (you must press enter by your self or include the "link" in a text")-[1.0]abbilty to show Items, which were pasted in the chat with this addon (only works if both siedes use this addon)...-[0.3.3] Subzone bei Gildenmitgliedern-[0.4]Einstellbutton mit (Möglichkeit Auszustellen ob Informationen über Klasse, Zone, lvl bekommen werden sollen + öffnen des vollständigen chatlogs + öffnet item posten dialog)-[0.6]chatlog mit ingame Oberfläche und möglichkeit nach Spielern zu filtern (später auch nach channel...)-[0.7]Anbindung an SpamProtect (Goldsellernachrichten über Contextmenü hinzufügen)-[1.0]Möglichkeit items im Chat zu posten und gepostete Items im chat anzuzeigen (benötigt beides das Vorhandensein dieses Addons) Quote Link to comment Share on other sites More sharing options...
Guest neFAST Posted October 20, 2010 Share Posted October 20, 2010 wouhou, nice todo list Quote Link to comment Share on other sites More sharing options...
SLA Posted October 20, 2010 Share Posted October 20, 2010 Nice To-Do list, but i'm not sure that everything i this plan is possible, especially interaction with other players via chat. Yesterday I could probably say that it is absolutely impossible. But today, KaaPex have discovered, that WE CAN interact with standard addon widgets!!! (look at his ShowMePrice to see how it is possible. P.S. Bug found: In AO 1.1.03+, guild.GetRights( memberId ) takes memberId as a parameter, NOT player's name: Error: addon AOChatExtension: func: GetRights, field, line: -1, defined: C, line: -1, [c] Error: addon AOChatExtension: func: GuildCanInvite, global, line: 105, defined: Lua, line: 103, [string "mods/addons/aochatextension/aochatextension.lua"] Error: addon AOChatExtension: func: OnTextObjectClicked, global, line: 243, defined: Lua, line: 161, [string "mods/addons/aochatextension/aochatextension.lua"] Error: addon AOChatExtension: Game::LuaGuildGetRights: param 1 not a class GMUIHelper::ObjectId (type: WString), details: int __cdecl Game::LuaGuildGetRights(struct lua_State *) Replace this: Code: local rights=guild.GetRights(object.GetName(avatar.GetId())) with this: Code: local rightsif guild.GetMember then -- AO 1.1.03+ rights=guild.GetRights(guild.GetMember(object.GetName(avatar.GetId()))) else -- AO 1.1.02 rights=guild.GetRights(object.GetName(avatar.GetId())) end Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 23, 2010 Share Posted October 23, 2010 Changelist: --fixed 3 bugs --if the id is known from guild/group/raid, now the id is used to get data over zone, lvl, class (directly shown) --color change of thats me (to yellow) --added new strings (localisation) btw: give me localisiced strings!!! I think, that Spamprotect does not become senseless with AOChatExtension. Here you must do 2 clicks instead of 0 and in AOCHatExtension is no syncronisation between all characters and so Spam Protect is still a bether way to fight against goldseller. It is planned to publish AOChatExtension at the end of this weekend (russian: msg14 + all b? and french: all strings)!!! Changelist2: -added one minute cache -improve the auto-close-alogrithm (if you tipe a whisper-msg) Quote Link to comment Share on other sites More sharing options...
Guest neFAST Posted October 23, 2010 Share Posted October 23, 2010 I will try to give you translated string by the end of the weekend. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 23, 2010 Share Posted October 23, 2010 @SLA: is there the possibility to get the playerID from friendslist in 1.1.04 (with social.getfriendinfo())? btw: have you a downloadlink for the 1.1.04 api, I only have the 1.1.03 one? Edit: Can someone explain, what common.CreateValuedText() does? and why is mission.SetChatInputText( text ) not working? o.O Quote Link to comment Share on other sites More sharing options...
SLA Posted October 24, 2010 Share Posted October 24, 2010 Quote: It is planned to publish AOChatExtension at the end of this weekend (russian: msg14 + all b? and french: all strings)!!! It is about time! OK , then, it is planned to publish an English translation of "New addon publication guide" during this weekend =))Russian strings attached to this message.Quote: @SLA: is there the possibility to get the playerID from friendslist in 1.1.04 (with social.getfriendinfo())? No. There is playerId in guild.GetMemberInfo(), but for some unknown reason (by mistake?), social.GetFriendInfo() don't have such parameter. This means, that in future API versions they can either add playerId to Friends, or remove playerId from Guildies, because I think it is not very useful for game devs to have palyer IDs in GuildList.Quote: btw: have you a downloadlink for the 1.1.04 api, I only have the 1.1.03 one? No, we never had an API 1.1.04 documentation. Game devs skipped this version, but later they gave us API 2.0.00, which includes all changes from 1.1.04 and 2.0.00. You can look in API 2.0.00 for 1.1.04 changes. Compare it with API 1.1.03, and if you are not sure, is a new function from API 1.1.04 or API 2.0.00, then ask me, I'll try to guess.Quote: Edit: Can someone explain, what common.CreateValuedText() does? Creates a new instance of ValuedText (which is "userdata"). ValuedText is a kind of "HTML-preformatted anything", like contents of tooltips, etc, etc. I have never seen this in user addons, but probably you can use it this way:Code: local vtMyValuedText = common.CreateValuedText()vtMyValuedText:SetFormat( "<body><r name=\"value\"/></body>" )vtMyValuedText:SetVal( "value", userMods.ToWString( "Hello World!" ) ) Quote: and why is mission.SetChatInputText( text ) not working? o.O Very likely, it is disabled as a part of "protection" against spammers. There is no API methods to write anything to chat - they did this intentionally. There is no user addons out there, which use this function.But all spammers have created Win32 apps, which write to AO chat directly via keyboard hooks. This makes API "protection" almost useless, so I think, we have to ask game devs to un-ban all those chat-related functions. It wont help spammers very much, but it will help us, addon makers, to make better addons.Btw, you can make your OnReactionPush() function 100% bulletproof (and protected against any new possible problems in the future), if you split your IF statements into 2 separate IFs. I mean, instead of:Code: ...elseif params.sender=="button-here" and BLABLABLA then do-something... write it this way:Code: ...elseif params.sender=="button-here" then if BLABLABLA then do-something end... This way, you will be 100% SURE, that the code of any button will be NOT executed if you haven't pressed it. Even is there are potential bugs in BLABLABLA conditions, or if future changes in API will break something in BLABLABLA conditions.And here are new RU strings:File: AOChatExtension-RUS-20101024.zip Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted October 24, 2010 Share Posted October 24, 2010 Ok, I think I will publish AOChatExtension at the beginning of the next week, because I will include the v.0.4 features (option button with turn on/off check for lvl,zone,class by friendslist, which will get more functions in later releases) in the release. I wrote: - [!!!] Whats happens, if player goes offline!?! - [!!!|getid from guildmember borken!!! -[0.3.3] show subzones, if in guild - [0.4] option button with: turn off/on playerdata (zone, lvl, class) + open whole chatlog + paste item - [0.6] chatlog with ingame UI (if you open it with a click on a players name with the filter to the messages of this player - [0.7] send event to SpamProtect to add Goldsellermsg by contextmenuoption and ban the Goldseller (thanks Regimardyl (German forum) for this idea) - [1.0] abbility to paste items in a special format to the chat (you must press enter by your self or include the "link" in a text") - [1.0] abbilty to show Items, which were pasted in the chat with this addon (only works if both siedes use this addon) Oh, I've forgotten, that I already have api 2.0, so I can use it... Quote: Very likely, it is disabled as a part of "protection" against spammers. There is no API methods to write anything to chat - they did this intentionally. There is no user addons out there, which use this function.But all spammers have created Win32 apps, which write to AO chat directly via keyboard hooks. This makes API "protection" almost useless, so I think, we have to ask game devs to un-ban all those chat-related functions. It wont help spammers very much, but it will help us, addon makers, to make better addons. I do not want to wirte somethink automaticly in the chat. I only want to add somethink in the textbox, where you type your msg in and I think, that disabling the send-feature would be protection enought. So I only can show the "chatlink for items" in a Textbox and you have to copy and paste it by your own in the chateditbox? BTW: Someone an idea, why this code do not work? o.O Code: if guild.IsExist() then local members=guild.GetMembers() for _,member in ipairs(members) do if guild.GetMemberInfo then -- AO 1.1.03+ if common.CompareWString(guild.GetMemberInfo(member).name,player1)==0 then return guild.GetMemberInfo(member).playerId end else if common.CompareWString(member.name,player1)==0 then return member.id end end end end BTW2: How to check, if the sender of a msg is now offline? Quote Link to comment Share on other sites More sharing options...
Recommended Posts