• 0

    posted a message on New and broken stuff with Cataclysm
    Quote from Morgalm
    I don't seem to be having any trouble in my (limited) testing of PLAYER_REGEN_ENABLED/DISABLED. But I have only tested on single mobs outside of instances and not in a raid.

    Did they change the dstGUID flags? Here is the ID's I found for Crystalline Ice Elemental:

    Live = 0xF5300066CC12D00B
    Cat = 0xF13066CC001BDA96

    I was using this code on live to get unitID:

    mobID = tonumber(string.sub(dstGUID, 9, 12), 16)
    So I switched to the following for cat and it seems to be giving me the same unitID's I expect:

    mobID = tonumber(string.sub(dstGUID, 7, 10), 16)

    I also made an edit to WoWWiki: API UnitGUID about it ..

    "UNIT_SPELLCAST_SUCCEEDED" and similar events now have the Spell ID(arg5). (Spell ID 2096)
    Spell Rank(arg3) is deprecated (logically in cataclysm)

    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    Quote from kunda
    What do you try to do with the UnitGUIDs?
    - the UnitGUID in WoW is a 64-bit hexadecimal string. do not use tonumber(). you will get trouble if you do this.

    I was kind of interested in the UnitGUIDs of the EU Cata beta server ... also was wondering which characters were the oldest and which the newest.
    I'm using tonumber() with strsub() as in: local sourceID = tonumber(string.sub(sourceGUID, 13, 18 ), 16)
    Quote from kunda
    - 0x040 = battlegroup identification (globally unique)
    You should've put that on WoWWiki, I was wondering all the time what it was!
    Quote from kunda

    - do not use excessive code execution in COMBAT_LOG*EVENT(s). minimalism rules.

    - disable guid scanning/digging/catching in combat!

    - simply save the whole UnitGUID and you can sort it easily.

    - digging for UnitGUIDs on a test/beta realm is really useless. nearly all characters are created in a very small period of time. if you try to test code for testing purpose, okay, but ptr/beta servers are slow, really very very slow compared to live servers.

    I know little about code optimalization/refactoring but I will post the code I use at the moment: Paste 2471

    - it's not possible to get a creation date unless you link the UnitGUID with the information someone can see in the account management side (this is the only place where you can see _when_ an account! (not a char!) was created (date only, no time). nobody with brain would allow some external code dig data from the WoW account management side --- or you have a SendAddonMessage() addonbot that sends played time data to you (but played time is not creation date)...).

    Well ehh I was also interested in when the character was made, but I guess somebody has to tell u when they made their character, or a SendAddonMessage() addonbot yes, or make characters myself to see between what date the Player IDs are. But .. thats going really far for a simple test addon isnt it
    By the way, your GT100GCX also shows a date for the Player ID, is that the creation date?!
    - check out GT100GCX aka 'Gnomish Top100 GUID Catcher Xtrem'. the current release version available here at wowace.com can catch up to 1000 UnitGUIDs per server (main purpose of this addon is to get old characters, and well i am currently doing a rewrite). in local tests i tried 5000, 10000 and even 250000(!!!): after digging nearly 1 year with 250000(!!!-one server only) i have not seen that much different UnitGUIDs on my server (and my server is one of the best visited and one of the oldest in europe). conclusion: your number of 3 million UnitGUIDs is not real, even on a ptr/beta server where people from the whole world join. you simply can not dig that much UnitGUIDs in such a short period of (ptr/beta) time. impossible!

    - a high or low UnitGUID says nothing without a very large amount of comparable data and server-based experience.


    sorry, don't know if this is offtopic or useful

    I mean if the Player ID starts from 1, and it normally increments by 1, then my logic assumes that if I see a player with an ID of 3.200.000~ that there would be also 3.2 million Player IDs/GUIDS ... Anyway I'm a lua noob, so what u say is useful to me : )
    Quote from DrKazza
    while we're discussing GUIDs... I see that you can pull GUIDs out of combat logs... and from the code posted it looks like the 12th argument of chat events seem to be GUIDs too (although I can't find it mentioned in documentation... is this new?)
    This has existed for quite some time (half year at least?). I found out myself from the /eventtrace.
    Although, now WoW Programming and WoWWiki (changed June 24) already got it documented, but when I checked it, it wasn't yet in their API docs


    Quote from DrKazza
    Anyway Q1: if I have a Guid can I look up a player?

    Practical example... I have a friend called "John" with a GUID (partial) of 1234567
    [...]
    Quote from Xinhuan
    1. If you have a only the GUID, you can't do anything with it. There is no WoW API that takes in a GUID.
    [...]

    Also have to quote Nevcairiel, thats not 100% correct. API SetItemRef also takes GUIDs, even though it isnt documented yet
    (I think its actually added functionality from the Blizzard Combat Log AddOn by hooking)
    -- Blizzard Combat Log AddOn
    local oldSetItemRef = SetItemRef;
    function SetItemRef([COLOR="DarkGreen"]link[/COLOR], text, button, chatFrame)
    
    [COLOR="DarkGreen"]	if ( strsub(link, 1, 4) == "unit") then
    		local _, guid, name = strsplit(":", link);[/COLOR]
    
    		if ( IsModifiedClick("CHATLINK") ) then
    			ChatEdit_InsertLink (name);
    			return;
    		elseif( button == "RightButton") then
    			-- Show Popup Menu
    			EasyMenu(Blizzard_CombatLog_CreateUnitMenu(name, guid), CombatLogDropDown, "cursor", nil, nil, "MENU");
    			return;
    		end
    	[...]
    	end
    end

    API SetItemRef Example: /run SetItemRef("unit:"..UnitGUID("target"))


    You can replace the UnitGUID with any GUID, it doesn't have to be a "valid unitID handle", however you require to have seen the GUID recently(cached).
    Kind of like Xinhuan said: "the GUID was in render distance, or in the combat log or chat events".

    However, once the unit/player is cached, but out of render range, it would return the unit level as "??", and it won't return the guild name anymore. Name, Race, and Class would still return. Actually, a lot of variables are missing, like: "name", "text", "button", "chatFrame"; but it still works fine though without those variables.
    ----- -----
    You can even call it from an UI Escape Sequence. (those hyperlinks in the Blizzard Combat Log)
    UI Escape Sequence "unit" Example: /run print("\124Hunit:"..UnitGUID("target").."\124h["..UnitName("target").."]\124h")

    Quote from Xinhuan
    It might also be interesting to note that when using private chat channels in WoW, when the current moderator leaves the channel, the next person to get moderator is the person with the lowest GUID.
    That little fact explains a lot for me btw = )

    Edit @ Xinhuan: yes you're right, can't just query them all, it would silently fail
    Edit 2: I've just noticed a very odd name .. (from the Mekkatorque EU beta realm)


    Edit 3: I support GT100GCX, u should update it for cata though O(n_n)O
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    Quote from Lombra
    What about this:
    local t = { --[[ random indices ]] }
    
    for i = 1, table.maxn(t) do
    	local v = t[i]
    	if v then
    		print(i, v)
    	end
    end

    Is this very bad in comparison?

    I tested your code and it works, but ehh the game freezes for like 3 sec when I call the function.
    I think maybe its because it runs 3.2 million iterations(?) before it gets to the end of the array/table because of the for do loop ...
    /dump table.maxn(KethoDatabase.db.profile.test7) --> [1]=3209883
    Posted in: Lua Code Discussion
  • 0

    posted a message on Trying to populate a list of all members in a raid / bg
    Quote from Kopty
    Hi,
    So basically, there will be a frame that will display all the names of people in the current raid or bg and I will then color them based on class and display an icon next to their name based on their class.


    If its useful here is some quick data:

    http://www.wowwiki.com/Class_colors
    http://www.wowwiki.com/UI_escape_sequences

    Warrior: |TInterface\\Icons\\INV_Sword_27:32:32:0:0:64:64:4:60:4:60|t (Cropped Texture example)
    Death Knight: |TInterface\\Icons\\Spell_Deathknight_ClassIcon|t
    Paladin: |TInterface\\Icons\\Ability_ThunderBolt|t
    Druid: |TInterface\\Icons\\Ability_Druid_Maul|t
    Rogue: |TInterface\\Icons\\INV_ThrowingKnife_04|t
    Hunter: |TInterface\\Icons\\INV_Weapon_Bow_07|t
    Shaman: |TInterface\\Icons\\Spell_Nature_BloodLust|t
    Priest: |TInterface\\Icons\\INV_Staff_30|t
    Mage: |TInterface\\Icons\\INV_Staff_13|t
    Warlock: |TInterface\\Icons\\Spell_Nature_Drowsy|t
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    Quote from Xinhuan
    Well lets see, how many seconds are there in 4 months?

    60 seconds * 60 minutes * 24 hours * 120 days = 10 368 000 seconds

    That's over 10 million seconds since the start of F&F alpha. Is 3.1 million characters really that unrealistic? They probably have a lot of internal testing as well done on character copying/transferring from live servers.


    I had no idea how long the beta realms were up, but neglected to do the math though

    That means the GUID really has nothing to do with time then (><)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    In the end, I only copied Xinhuan's perfectly working code and learned about the "for in loop", "key" and "value"...

    I tried to save the sorted table/array again to the AceDB, so I can e.g. see the AceDB in the SavedVariables folder with notepad++ easily without having to sort it in notepad++ manually.

    But without much success(keys in the table/array in random order again), so my way of thinking doesn't really work
    Codesnip of my _failed_ attempt:
    if not self.db.profile.test6 then self.db.profile.test6 = {}; end
    for i = 1, #t2 do
    	print("["..t2[i].."] = ".. KethoDatabase.db.profile.test4[t2[i]])
    	self.db.profile.test6[t2[i]] = KethoDatabase.db.profile.test4[t2[i]]
    end

    Anyways concerning the Player ID / UnitGUID:
    I made 3 characters in quick succession, without loading them, just creating. Then afterwards loading them. (You can see I reused 1 name "testguida")


    I still think the Player ID starts at 1~, but that however the Player ID increases over time.
    I think the reasons are that Blizzard assigns UnitGUIDs to players according to time or there are just a lot of characters being created/transferred/racechanged or even a combination of them.

    I estimate that almost every second the Player ID increases by 2 to 4 in value. So maybe the idea that 3.1 million characters were created really seems implausible ...
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    So my understanding of the logic is to make another "temporary" table, that can be sorted (in contrary to table 1), and then use the keys of table 1 as values in table 2.

    Thank you very much for your dummy proof explanation :p
    (I only learned some Lua by trial and error, going to try learn something from this)

    Quote from Xinhuan
    Ok let's try again. You have this table.
    [...]
    .. requires you to understand what iterators are.

    Right on the spot (><)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    Quote from Farmbuyer
    They don't necessarily start at 0000.....00001 for the first toon, do they?

    Not if you're using non-numerical keys. It's a hash table, after all. (Or "dictionary" or whatever the cool kids are calling them now.) Rearranging the keys would defeat the whole point of the hash.

    What you're doing -- an ancillary table with the numerical keys in whatever order you want, and the values as keys of the original table -- is pretty much the only approach, although there are many variants on the implementation.

    Well, the lowest Player ID I saw was [49361] = "Erniecool", so I kinda believe they start at 1 ...
    For the rest, I didn't really understand all that programming terminology since im just noob. But you are saying rearranging it is not how it works and there are variations on how to implement it and this is how it should kinda work right.

    Edit: This gonna take me some time to understand your posts (=.=)
    Edit2: So I should make another table "with the values of this table as the keys of the first" then sort it, then use the original table with the sorted keys. (so ehm keys are the things on the left, right)

    So the function I copied has performance issues ok .. but I didn't really understand that part of Xinhuan's post. I don't know enough yet to comprehend that :(
    Posted in: Lua Code Discussion
  • 0

    posted a message on Player GUID ID + Sort Array Question
    On the EU-Mekkatorque Cata beta realm, I was interested in the Player IDs
    So I wrote a quick and messy test addon to get some Player ID data into an array and im a noob btw.

    Paste 2450 (original code)
    Paste 2471 (updated snippet)
    data gathered during 1min in stormwind:

    ["test4"] = {
    [3139898] = "Naviky",
    [839978] = "Soneya",
    [1118565] = "Nounouille",
    [813049] = "Xanderin",
    [1074468] = "Voicequake",
    [396935] = "Krikkel",
    [3162227] = "Ëithne",
    [1055387] = "Kiassira",
    [240821] = "Quercia",
    [1408445] = "Screamlord",
    [3009161] = "????",
    [1032772] = "Schnurli",
    [1113930] = "Lillock",
    [651090] = "Person",
    [1039014] = "Shizurû",
    [715982] = "Rezarga",
    [484780] = "Ceryrn",
    [3144766] = "Rekkøn",
    [962503] = "Rihia",
    [959102] = "Eluriana",
    [1460297] = "Sákurá",
    [1523382] = "Fiscal",
    [471496] = "Jenkins",
    [1031649] = "Evyon",
    [1452435] = "Ihealnaked",
    [629017] = "Slashslap",
    [1460108] = "Warhammer",
    [330638] = "Azinee",
    [3134633] = "Mtvpally",
    [266158] = "Melitwo",
    [1386129] = "Laxati",
    [1421962] = "Sparroww",
    [960797] = "Alisier",
    },


    In the picture below:
    The upper part is: /dump KethoDatabase.db.profile.test4
    The lower part is: /run for key, val in orderedPairs(KethoDatabase.db.profile.test4) do print(key.." = "..val); end


    btw thanks sylvanaar for updating prat for cata already

    http://www.wowwiki.com/API_UnitGUID
    Player GUIDs are local on a per-server basis, making the "global" scope to be bound to the specific server. Every time a character is created, a new GUID is assigned from a simple +1 counter and then given to that character.


    Question 01: Is it normal there were created over 3.1 million characters on that server?
    Even though ppl might make a lot of alts and/or even delete them again, racechanges, and taking into consideration how long that beta server has been up already(4-6 month?)

    Question 02: About sorting lua tables/arrays:
    I tried table.sort(KethoDatabase.db.profile.test4), but I guess I'm doing that wrong.
    So I copied the example function at http://lua-users.org/wiki/SortedIteration and use the following code/macro to call the sorting function which I copied to the test addon:
    /run for key, val in orderedPairs(KethoDatabase.db.profile.test4) do print(key.." = "..val); end

    So Question 02 is: Can a lua array be sorted numerically or can it only be printed out sorted with this "orderedPairs()" function?
    Posted in: Lua Code Discussion
  • 0

    posted a message on ReadySetDing - Leveling AddOn
    I have submitted the Localization Strings in my first try at Locales for in v0.53 ...
    http://wow.curseforge.com/addons/readysetding/localization/

    Please give me feedback or bonk me if I'm doing something wrong
    Posted in: General AddOns
  • 0

    posted a message on ReadySetDing - Leveling AddOn
    Quote from morpheusdead
    Its ok. But the max default value as per set ingame using the slider is 30m.

    So technically that is max distance, where as 50m happens to be the games limit. But you can only get there through an addon or manually setting the cvar in your config.wtf file.

    Yeah, thats why I put it in this addon, because I thought most people would find it convenient

    If you want a quick update on my progress: I decided to not show a one-time pop-up dialog box, because it would be more annoying for the majority of other players.

    I instead decided to inform the player in the Advanced Options window and in a one-time ChatFrame message instead.

    Advanced Options window


    Instead of a one-time pop-up dialog box


    To a one-time message


    Im also doing some Code refactoring (better Variable scoping) now .. I will upload it afterwards as v0.51
    Edit: That might take a while like at least an half hour or so
    2010.09.03 13:00 (UTC+01): Well actually it got a bit more complicated don't expect it to be finished anytime soon.
    2010.09.04 03:30 (UTC+01): ... uploaded v0.51
    2010.09.04 23:50 (UTC+01): Decided to remove the description about the Max Camera Distance from the [Advanced] Options Tab and to just keep the one-time message. Uploaded v0.52; changes: Fixed Table of Contents (.TOC) Title; Added ReadySet7 Images; Cleaned up [Advanced] Options tab
    Posted in: General AddOns
  • 0

    posted a message on Assemble - Gathering players have never been so easy
    The guy could have just done a quick copy paste, but instead he just chose to write 2 lines with a link and then asking for feedback
    Let me present to you, the features of the worlds first super awesome addon (yeah rly!). But what exactly does it do? The answer is simple. By combining traditional ways of finding players for parties and groups, a player can easily use the addon and its automated processes to quickly find fellow co-players.

    So here's the features:

    » Flexible timer-based announcements based on build setup, requirements and current group build.
    » Automated requirements gathering.
    » Automated behaviour such as automatically convert to raid.
    » Invite queuing for better group planning.
    » Automated whispering communication allows the queued player to know what he needs to provide and whats going on.
    » Clean overview of the group roles, the queued players, the current group build and the status of the build.
    » ...and more (to be unveiled at a later point or to be discovered by you)!

    It does so many things? Whats next? Well, I am living by the rule that you should stop when its good enough. But for this addon, there is no good enough. Player behavior changes so it needs to stay updated based on how players communicate and interact. Issues need to be addressed. Whats most important to me is that new features and improvements are applied which are requested from the community.
    Posted in: General AddOns
  • 0

    posted a message on ReadySetDing - Leveling AddOn
    Quote from morpheusdead
    DAMMIT thats the kinda thing that should be documented!!

    I been looking everywhere trying to figure this out. I updated about 7 addons today with the curse client, and suddenly my camera was all messed up.

    I have been having a hell of a time trying to trackit down.

    I'm so sorry, I did not realize there could be people that do not want their camera distance to be at max distance.

    I will put in a pop-up dialog box at start asap, that lets you choose if you want to reset it to default, if your camera distance was found to be at max; So that players won't have to go out of their way to fix it.

    It won't change your camera distance anymore.
    Again .. I am really sorry morpheus

    Edit: As for the reason why I didn't document it. Because it has been in for ever since I made it. And as previously stated, I didn't think there could be people that do not want it to be at max distance ...
    ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    Version History Images (Overflow pictures edit)
    • v0.4

    • v0.5

    • v0.60

    • v0.63 Ding Message Variables
    Posted in: General AddOns
  • 0

    posted a message on ReadySetDing - Leveling AddOn

    This is ReadySetDing ... just another leveling addon

    The idea for this name came from www.readyset7.net (for Microsofts Windows 7 partner campaign)
    So the goal for this addon is to make Leveling competitive by comparing level speed





    Changelog v0.70 [2010.10.14] Paste 2701
    ...

    Quick Facts v0.60
    • AceConfigDialog: yes; AceGUI: No
    • Locales: yes ... awaiting translations, deDE translated
    • Noob author: .. wait what?
    • Repositories / Revision Control: no (never tried it yet)
    • Text Editor: Notepad++ (I don't got an WoW IDE)

    Features v0.52
    • Custom Ding Message + Preview "Description"
    • LevelUp Times Summary
    • Ding Screenshot + Time Delay "Slider" (2 seconds softMax; 60 seconds max)
    • RealID Broadcasting (your previous message gets restored/broadcasted again)
    • Option: Ding Emote <Player> reached a new level. DING!
    • Option: Skip Ding Announce for Achievement Levels (10 / 20 / 30 / 40 / 50 / 60 / 70 / 80 / 85)
    • LevelUp / Achievement Sound Button + Sound File Path Description
    • No extra /played spam. It will wait 7 seconds for other leveling addons if they want to request /played too
    • Randomly generated Example Times with a throttle of 60 seconds
    • Icons for almost every option/button; Colors for more readability
    • If you are not in a guild, the Guild Announce option will be disabled (grayed out)

    Links

    • Curse: http://wow.curse.com/downloads/wow-addons/details/readysetding.aspx
    • WoWInterface: http://www.wowinterface.com/downloads/info16220-ReadySetDing.html
    • CurseForge: http://wow.curseforge.com/addons/readysetding/
    • Lozalization: http://wow.curseforge.com/addons/readysetding/localization/
    • there is an easter egg in the sounds (n_n)
    Posted in: General AddOns
  • 0

    posted a message on Newb Automated Changelog question
    Oh that was actually stupid of me

    At least there should be a message inside the changelog by what revision control system it was generated ... (=.=)

    Edit: .. forgot to thank you, yssaril
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.