F2P Addon

Re: Yasueh's Macros and Addons for F2P

Lightbringer, ally. I don't need it but there are a few friends who use it, they have been using a second channel, but obviously then new players will have a hard time using that ect.

I guess I could have the addon whisper people on the friends list to ask for the channel they're using, in case the default channel ever becomes locked. Would work well enough for people who are online regularly, although completely new players would still be unable to find the channel name.




The code had to be obfuscated (made unreadable in a way that still allows it to function) for the addon to have a chance at being "secure". This is now prohibited by Blizzard's addon policy though, so there'd be no way to stop people changing their ratings if/when I update it :(

I wish Blizzard would support a way to make addons more secure. They probably can't work with compiled or obfuscated code, because we'd have to submit separate source and object code, and someone would have to be paid to check all the source over to make sure nothing malicious was submitted (I'm not entirely sure how thorough Curse's checks are, or if their people are paid, although they do make enough money from hosting addons to give a little back to the authors).

What they could do instead is have the game client run a hash on an addon's folder, and then whenever an addon communicates with the same addon being used by another player, that checksum is provided as an additional field in the addon-to-addon message, so that addons can decide to accept or reject incoming data, based on whether or not a player has made changes to their own copy of an addon.

It wouldn't stop the most determined of hackers, but they would have to modify the game client to send false hashes, instead of just being able to modify the addon code to send false data.

---

If I was to make an arena rating addon, then it would merely collect data to be sent to a web server by a separate executable, kind of like how the Wowhead addon needs a separate uploader. Ratings for each match would only be considered valid if all participants submitted matching data, as well as screenshots of the final scoreboards (and you could even crowdsource checking the scoreboards, by using them as a captcha for the website).
 
Re: Yasueh's Macros and Addons for F2P

Message: Interface\AddOns\F2PAddon\f2pdata.lua:9: bad argument #1 to 'match' (string expected, got nil)
Time: 05/26/14 23:22:54
Count: 8502
Stack: [C]: in function `match'
Interface\AddOns\F2PAddon\f2pdata.lua:9: in function `F2PData_OutgoingDataPacket'
Interface\AddOns\F2PAddon\f2pdata.lua:79: in function `F2PData_SendMyData_ToAll'
Interface\AddOns\F2PAddon\f2paddon.lua:180: in function <Interface\AddOns\F2PAddon\f2paddon.lua:141>

Locals: (*temporary) = nil
(*temporary) = "^(.)(.+)$"
(*temporary) = "string expected, got nil"

Getting this error?
 
Re: Yasueh's Macros and Addons for F2P


Hey man! Add-on might be bugging or it's me (not sure). On AP it's adding some people w/ the addon but not everyone (for example Bossboss who has lead of the channel can't be added to the channel, seen in the channel or even added to friends list BUT we can whisper him still). On Ravenholdth (for me) I can't even see anyone else in chat except P2Ps (LUA error is in the above post). On BWL everyone is working for me. On both AP and BWL I have no LUA errors but on Raven I have a lot.
 
Re: Yasueh's Macros and Addons for F2P

Try running the following slash commands from the chat edit box, and let me know what gets printed out

Code:
/run print(GetUnitName("player",0))
Should be your character name, with the '-<realmname>' bit stripped off.

Code:
/run print(F2PAddonGlobalVars.myName)
Should be exactly the same.


Code:
/run print(UnitClass(GetUnitName("player",0)))
Should be your character's class in all capitals.

Code:
/run print(UnitClass(F2PAddonGlobalVars.myName))
And exactly the same again.
 
Re: Yasueh's Macros and Addons for F2P

Try running the following slash commands from the chat edit box, and let me know what gets printed out

Code:
/run print(GetUnitName("player",0))
Should be your character name, with the '-<realmname>' bit stripped off.

Code:
/run print(F2PAddonGlobalVars.myName)
Should be exactly the same.


Code:
/run print(UnitClass(GetUnitName("player",0)))
Should be your character's class in all capitals.

Code:
/run print(UnitClass(F2PAddonGlobalVars.myName))
And exactly the same again.

I'm an idiot. I was trying to actually print something out for some stupid reason haha.

1.Name
2. Name
3. Nil Nil Nil
4. Nil Nil Nil
 
Re: Yasueh's Macros and Addons for F2P

How about:

Code:
/run print(UnitClass("player"))

Could be your character name has too many accents and confuses the function. Alternatively some other addon has changed how UnitClass() works.

If the above shows something in the same format as 'Warrior WARRIOR 1' instead of 'Nil Nil Nil', then F2PAddon_1.2.18 should fix the problem.
 
Re: Yasueh's Macros and Addons for F2P

How about:

Code:
/run print(UnitClass("player"))

Could be your character name has too many accents and confuses the function. Alternatively some other addon has changed how UnitClass() works.

If the above shows something in the same format as 'Warrior WARRIOR 1' instead of 'Nil Nil Nil', then F2PAddon_1.2.18 should fix the problem.

mage MAGE 8 (why 8?). Sweet :D - thanks! Yeah the name has no accents and it's only one this one character on this one realm haha.
 
Re: Yasueh's Macros and Addons for F2P

Thanks for keeping this updated, Yasueh!

Everyone log into Curse and give it a like; it only had 5!
 
Re: Yasueh's Macros and Addons for F2P

http://us.battle.net/wow/en/forum/topic/13421662064 said:
== Add-On Communications ==

Add-on communication is now available through custom chat channels.

SendAddonMessage() where Type is "CHANNEL", and target is the channel name.

This is a big enough change that making use of it in F2PAddon will warrant a complete rewrite and a 2.0.0 version.

In preliminary testing I could even send messages through the addon channel from a F2P to a P2P who didn't have me on their friends list. Will need to check with P2Ps who haven't recently sent whispers to the F2P, but if this works, the whole of F2PAddon's code will become a lot simpler, making it more reliable, and easier to add new features to.
 
Last edited by a moderator:
Re: Yasueh's Macros and Addons for F2P

This is a big enough change that making use of it in F2PAddon will warrant a complete rewrite and a 2.0.0 version.

In preliminary testing I could even send messages through the addon channel from a F2P to a P2P who didn't have me on their friends list. Will need to check with P2Ps who haven't recently sent whispers to the F2P, but if this works, the whole of F2PAddon's code will become a lot simpler, making it more reliable, and easier to add new features to.

Yasueh you're pretty much the greatest thing to ever happen to F2P. We all owe you so much! Thank you a hundred times.
 
Re: Yasueh's Macros and Addons for F2P

You really are the most important person to F2P haha.. definitely donating
 
Re: Yasueh's Macros and Addons for F2P

Since a few days ago my friends list counter stopped updating whenever somebody logs in. I have to manually open the friends list for the counter to update.

For all other purposes this seems to be just a visual problem but it actually prevents f2paddon from sending channel messages to the people who just logged in (and it's just channel messages, whispers work fine). Once I manually open friends list (and the number of friends online updates) they start seeing my messages like normal.

It happens both as p2p and f2p, except p2p messages still can be seen without updating the friends counter.

No LUA errors appear.
 
Re: Yasueh's Macros and Addons for F2P

Possibly related, I have noticed on some occasions when I send a message to the f2p channel it will tell me that one or two names are not online. Seems to be something with updating the friends list as well? Would be happy to test or submit other information.
 
Re: Yasueh's Macros and Addons for F2P

I've also been seeing a lot of grey names in chat, so I took a look at why it might be happening: No entries in the friends list, so no way to get a player's class from there (the tooltips get the class from the addon's database, so they're always the right color).

When someone joins the channel the addon calls the game's AddFriend() function sending the name to the server to add to the friends list, which should be followed shortly by a FRIENDLIST_UPDATE event (that the addon checks for) when the server sends the updated friends list data back to the game client, to confirm that the friend was added. Opening the friends list asks for the server to send the same data, causing the same event to happen (you can use the /etrace command to watch as events happen, and see that event firing as people join the channel, so the data should be there).

I can't see any reason why the friends list would not be updating, just because its window hasn't been opened, unless Bliz have been really stupid and changed the game client so it now uses two copies of the same friends list data, one that's updated when the event fires (that addons can't read), and another that's updated when the friends window is opened (that addons can read). Of course it could just be server lag delaying the data coming in (so its 'update' after you've told it to add a friend is still the old friends list), and you have to send another request after the server has got round to processing the changes, for the data to get updated properly.

Switching chat to use the new addon-to-addon channel will fix this, when I get around to it. Like I said, the whole addon is going to need rewriting to support that change (plus I really want that corehound mount + damned 8 hour maintainance today).
 
Re: Yasueh's Macros and Addons for F2P

When someone joins the channel the addon calls the game's AddFriend() function sending the name to the server to add to the friends list, which should be followed shortly by a FRIENDLIST_UPDATE event (that the addon checks for) when the server sends the updated friends list data back to the game client, to confirm that the friend was added. Opening the friends list asks for the server to send the same data, causing the same event to happen (you can use the /etrace command to watch as events happen, and see that event firing as people join the channel, so the data should be there).

Whenever somebody logs in I get the "xxx is already a friend" message, so it seems to know that the person is on my friends list but for some reason f2paddon doesn't send messages unless I open friends tab first.
 
Last edited by a moderator:

Users who are viewing this thread

Top