00:00.21 | *** join/#waruidev Repo (n=supybot@repos.curseforge.net) |
00:00.21 | *** mode/#WARUIDev [+v Repo] by ChanServ |
00:07.26 | *** join/#waruidev Aes[entfernt] (n=feed@p5B0A5FC2.dip.t-dialin.net) |
00:14.26 | *** join/#waruidev Aes[entfernt]2 (n=feed@p5B0A4D91.dip.t-dialin.net) |
03:12.42 | *** join/#waruidev Repo (n=supybot@repos.curseforge.net) |
03:12.42 | *** mode/#WARUIDev [+v Repo] by irc.freenode.net |
03:16.06 | *** join/#waruidev Repo (n=supybot@repos.curseforge.net) |
03:16.06 | *** mode/#WARUIDev [+v Repo] by ChanServ |
03:31.23 | *** join/#waruidev Nechckn (n=N@WoWUIDev/Norganna/Admin/Nechckn) |
04:55.15 | *** join/#waruidev Haloperidol (i=50rt9z8s@p57A0A70C.dip.t-dialin.net) |
05:36.52 | *** join/#waruidev Aes[entfernt] (n=feed@p5B0A6684.dip.t-dialin.net) |
06:50.28 | *** join/#waruidev purl (i=ibot@rikers.org) |
06:50.28 | *** topic/#waruidev is http://waruidev.pastey.net/ | http://forums.curseforge.com/forumdisplay.php?f=6 and http://war.mmoui.com/forums | See http://thewarwiki.com/ for API info | Create WAR addons on http://war.curseforge.com/ and http://war.mmoui.com | WHA Mod Author Group: http://tinyurl.com/wha-mods | (22:44:20) God left the room (Kicked by Aiiane (Aiiane)). |
07:38.49 | *** join/#waruidev Chryzo (n=Chryzo@83-156-245-81.rev.libertysurf.net) |
07:55.14 | *** join/#waruidev Computerpunk (n=IceChat7@92.82.167.82) |
08:36.03 | Computerpunk | asdf |
08:57.49 | *** join/#waruidev nicoli_s (n=nsinkule@69.73.16.202) |
13:30.43 | *** join/#waruidev ckknight (n=ckknight@WoWUIDev/WoWAce/CurseStaff/CurseForge/ckknight) |
13:30.43 | *** mode/#WARUIDev [+o ckknight] by ChanServ |
14:11.20 | *** join/#waruidev Ryelle_ (n=chatzill@hc652f035.dhcp.vt.edu) |
14:21.03 | *** join/#waruidev ckknight__ (n=ckknight@69.73.16.202) |
14:22.53 | *** join/#waruidev Vidhar (n=mr_rattl@p57B6455C.dip.t-dialin.net) |
14:29.16 | Ryelle_ | anyone around that's done anything with monitoring the combat log? specifically i want to detect incoming heals and heals that i cast, if possible |
14:29.38 | Ryelle_ | i'm looking at http://war.curse.com/downloads/war-addons/details/combatlog.aspx but it's old and i don't think it's working |
14:30.01 | Ryelle_ | and of course it doesn't deal with incoming heals either |
15:32.02 | *** part/#waruidev Vidhar (n=mr_rattl@p57B6455C.dip.t-dialin.net) |
15:50.53 | *** join/#waruidev Haloperidol (i=06l745j7@p57A0FC8C.dip.t-dialin.net) |
15:56.58 | *** join/#waruidev Haloperidol (i=01v1otq1@p57A0FC8C.dip.t-dialin.net) |
16:35.11 | *** join/#waruidev ckknight (n=ckknight@69.73.16.202) |
16:35.24 | *** mode/#WARUIDev [+o ckknight] by ChanServ |
18:31.53 | *** join/#waruidev Computerpunk (i=IceChat7@95.76.179.17) |
18:53.18 | *** join/#waruidev Crestor (n=crestor@dslb-094-222-138-028.pools.arcor-ip.net) |
18:59.13 | Repo | 10rv_mods: 03MrAngel 06rv_mod_rebirth * r71 RVMOD_Targets/Logics/Single (6 files in 2 directories): Finised work on RTVL_Single sub addon |
19:08.13 | Repo | 10rv_mods: 03MrAngel 06rv_mod_rebirth * r72 RVMOD_Targets/Logics/Single/RVTL_Single.lua: |
19:08.16 | Repo | Small fix: frame will be disabled and unregistered if deleted by user |
19:20.33 | *** join/#waruidev ckknight (n=ckknight@WoWUIDev/WoWAce/CurseStaff/CurseForge/ckknight) [NETSPLIT VICTIM] |
19:20.33 | *** join/#waruidev Haloperidol (i=01v1otq1@p57A0FC8C.dip.t-dialin.net) [NETSPLIT VICTIM] |
19:20.33 | *** join/#waruidev Ryelle_ (n=chatzill@hc652f035.dhcp.vt.edu) [NETSPLIT VICTIM] |
19:20.33 | *** join/#waruidev Chryzo (n=Chryzo@83-156-245-81.rev.libertysurf.net) [NETSPLIT VICTIM] |
19:20.33 | *** join/#waruidev Repo (n=supybot@repos.curseforge.net) |
19:20.33 | *** mode/#WARUIDev [+ov ckknight Repo] by irc.freenode.net |
19:21.45 | Ryelle_ | does this mean anything to anyone....i'm trying to understand the significane of the .+ %d+ and .* ............ |
19:21.45 | Ryelle_ | CombatLogParserTables.table[i][CombatLogParserTables.TEXT_YOUR_PET_CRITS_X_FOR_Y]= function (t) |
19:21.45 | Ryelle_ | return CombatLogParserTables.simple(t, L"Your pet's (.+) critically hits (.+) for (%d+) damage.(.*)", function(a,b,c,d) CombatLogParser.p = {a,b,c,d} end) |
19:22.16 | Crestor | %d is a digit |
19:22.16 | Crestor | + means there are many of them |
19:22.36 | *** join/#waruidev Repo (n=supybot@repos.curseforge.net) |
19:22.36 | *** mode/#WARUIDev [+v Repo] by ChanServ |
19:22.49 | Crestor | . can ba anything |
19:23.35 | Crestor | these are regular expressions |
19:24.33 | Crestor | got anything of what I said ? |
19:28.24 | Ryelle_ | yeah sorry, i'm at work and had to take a phone call |
19:28.45 | Ryelle_ | so would that expression be storing the .+ and stuff as variables in some way? |
19:28.55 | Ryelle_ | or no? |
19:32.06 | Crestor | I dont know what the CombatLogParser does but internally he will use functions like find who will return the matches |
19:33.43 | Crestor | as I see it from the little code there, it calls a function with the matches and the function stores them into CombatLogParser.p |
19:33.46 | Ryelle_ | basically it monitored the combat log for outgoing heals, heal crits, damage, autoattacks, etc |
19:34.07 | Ryelle_ | and it displayed them on the screen so you could see a running tally |
19:34.26 | Ryelle_ | i'm trying to do something similar in a different addon and i'm trying to understand this one lol |
19:34.45 | Ryelle_ | err rather it displayed the running totals by parsing the combat log |
19:35.23 | Ryelle_ | function CombatLogParserTables.simple(t, s, f) |
19:35.23 | Ryelle_ | r, c = wstring.gsub(t, s, f, 1) |
19:35.23 | Ryelle_ | if c == 1 then |
19:35.23 | Ryelle_ | return CombatLogParser.p |
19:35.24 | Ryelle_ | end |
19:35.26 | Ryelle_ | return nil |
19:35.27 | Ryelle_ | end |
19:35.29 | Ryelle_ | is the function that it calls |
19:36.47 | Crestor | ah, that is something you will definitly need |
19:37.09 | Crestor | you can do this in 2 different ways but one is enough |
19:37.48 | Ryelle_ | i'm just not quite grasping the "return CombatLogParserTables.simple(.................." line |
19:38.23 | Ryelle_ | if each (.+) and (%d+) turns into a, b, c, d, etc etc in order then i get it |
19:38.27 | Ryelle_ | if not, then i'm confused |
19:39.25 | Ryelle_ | turns into is poor word choice.......if each (.+) is stored in a, b, c, d would be better |
19:39.52 | Crestor | yeah it is converted into that but these results are put into a table "{a,b,c,d}" and then this tables is returned etc. |
19:43.17 | Ryelle_ | ah ok |
19:43.25 | Ryelle_ | i get it now, thanks |
19:43.32 | Crestor | maybe a easier example |
19:43.33 | Crestor | local _,_,a,b,c,d wstring.find(t, L"Your pet's (.+) critically hits (.+) for (%d+) damage.(.*)") |
19:44.12 | Crestor | but it is not so universal as yours |
19:49.35 | Ryelle_ | i'm not sure i understand the differentiation |
19:49.51 | Ryelle_ | or any pros or cons associated with one or the other |
19:50.05 | Computerpunk | I'm here, but I won't answer anything. Really bad mood. |
19:50.07 | Crestor | these are 2 different functions todo this |
19:51.04 | Ryelle_ | i think your way is the same as the mod's way |
19:51.11 | Ryelle_ | just that his way split it up into 2 functions |
19:51.25 | Ryelle_ | or actually it used gsub instead of find |
19:51.28 | Crestor | the bad thing of the first one is that you create a function to test |
19:51.48 | Crestor | gsub instention is replacement |
19:52.01 | Crestor | find is ... |
19:52.06 | Crestor | you know |
19:52.24 | Ryelle_ | well i don't need to manipulate the combat log entries |
19:52.50 | Ryelle_ | i just want to find the ones that says "Player X's Y heals you for Z" and "Player X's Y critically heals you for Z" |
19:53.05 | Crestor | but if you give gsub a function you can get what it wants to replace nad insteady of replacing you just copy your needed results |
19:54.09 | Crestor | gsub was mis-/cleverly used in that situation |
19:54.26 | Ryelle_ | I just want to extract Player X's name and maybe extract the ability Y used |
19:54.34 | Ryelle_ | actually i really only care about Player X's name |
19:55.10 | Ryelle_ | no i guess ability is important too |
19:55.14 | Ryelle_ | damn, can't make up my mind |
19:55.16 | Ryelle_ | lol |
19:56.01 | Crestor | than you could set up something with wstring.find and some matches for the combatlog |
19:56.31 | Ryelle_ | and wstring.find allows me to extract the info or i have to go with gsub? |
19:56.38 | Crestor | but the strings have to be different for every language :/ |
19:57.08 | Ryelle_ | but getting those two lines of chat in a few languages shouldn't be terribly hard |
19:57.43 | Crestor | internally they both work the same only with the obvious difference that find is for searching and gsub for replacement |
19:58.31 | Crestor | it now depends on your outer framework what is better suited for it |
19:58.46 | Crestor | but both will work |
19:59.20 | Crestor | if you are unsure you could use the one that you understand better or feels better ;) |
20:00.29 | Repo | 10trakario: 03smurfy 07master * 89b92a8 / (2 files in 2 directories): [+1 commit] Uptimized Rkoth module |
20:02.16 | Ryelle_ | i'm going with find, seems easier lol |
20:02.43 | Crestor | ^^ |
20:03.05 | Ryelle_ | thanks |
20:03.26 | Crestor | np |
20:06.06 | Ryelle_ | one last question, what does .* mean? |
20:06.23 | Ryelle_ | or do |
20:07.05 | Computerpunk | Any remaining chars after that. |
20:07.14 | Computerpunk | (.*) = anything/everything |
20:07.42 | Crestor | . = any character (only one) |
20:09.03 | Ryelle_ | how is that different from .+ |
20:09.32 | Crestor | ? the former occours once or is completely missing |
20:09.32 | Crestor | * the former can be missing or ccour as many times as needed |
20:09.32 | Crestor | + the former has to occour once at least but it can be many times |
20:13.03 | Ryelle_ | ok, and these are all related to characters found because of the period |
20:13.22 | Ryelle_ | if it was numbers we were after we would use %d instead of the . and then use ?,*,+ as applicable |
20:15.31 | Computerpunk | http://lua-users.org/wiki/StringLibraryTutorial |
20:15.32 | Crestor | jep |
20:15.54 | Computerpunk | This could help too. |
20:16.31 | Computerpunk | http://www.lua.org/manual/5.1/manual.html#5.4.1 |
20:16.56 | Ryelle_ | thanks |
20:19.42 | Computerpunk | lua> word="word" w, ord = string.gsub(word, (...)(.)) print(w, ord) |
20:19.43 | lua_bot | Computerpunk: luabot:1: unexpected symbol near '.' |
20:20.14 | Computerpunk | oh lol |
20:20.32 | Computerpunk | lua> word="word", w, ord = string.gsub(word, "(.)(...)) print(w, ord) |
20:20.33 | lua_bot | Computerpunk: luabot:1: unexpected symbol near '=' |
20:20.34 | Computerpunk | FFS |
20:20.47 | Computerpunk | lua> word="word" w, ord = string.gsub(word, "(.)(...))") print(w, ord) |
20:20.47 | lua_bot | Computerpunk: luabot:1: bad argument #3 to 'gsub' (string/function/table expected) |
20:22.09 | Computerpunk | lua> word="word" w, ord = string.gsub(word, "(.)(...))", print) |
20:22.10 | lua_bot | Computerpunk: luabot:1: invalid pattern capture |
20:22.13 | Computerpunk | v.v |
20:22.15 | Computerpunk | LOL |
20:22.23 | Computerpunk | lua> word="word" w, ord = string.gsub(word, "(.)(...)", print) |
20:22.23 | lua_bot | Computerpunk: w, ord |
20:22.26 | Computerpunk | Failure. |
20:22.43 | Ryelle_ | lol |
20:23.04 | Computerpunk | I fail at typos today. |
20:23.10 | Computerpunk | I'm a bit pissed off. |
20:23.14 | Computerpunk | Drank a bit... |
20:23.14 | Computerpunk | Meh. |
20:23.24 | Ryelle_ | heh, it's friday though! |
20:23.30 | Crestor | sry, I was busy with a testrun ... |
20:23.46 | Ryelle_ | 'tis ok, computerpunk was just giving me an example if it in action |
20:23.58 | Crestor | O.o why does everyone usrs gsub instead of find |
20:24.09 | Computerpunk | Well, I dunno, but I liek gsub a bit. |
20:24.16 | Crestor | hehe, ok |
20:24.21 | Computerpunk | I avoided working with strings. |
20:24.23 | Computerpunk | As much as possible. |
20:24.39 | Computerpunk | But you I'll have to use it on C++ and stuff, so I gotta start working with them |
20:24.43 | Computerpunk | strchr and etc. |
20:24.43 | Computerpunk | v.v |
20:25.01 | Crestor | string hanlding in lua is strange |
20:25.19 | Computerpunk | In what way strange? |
20:25.57 | Crestor | that creation and manipulating is slow but comparing is very fast because it checks after every creation if this string already exists so it can use the existent reference |
20:26.34 | Crestor | if it compares string it looks if they are the same reference and is done |
20:27.05 | Computerpunk | o-O |
20:27.05 | Computerpunk | You lost me... |
20:27.05 | Computerpunk | Drank a bit too much, got a cold too. |
20:27.21 | Computerpunk | If I start making a list of my current states, I'd make a laughing stock of myself, lol. |
20:27.22 | Crestor | I got a cold but no alcohol ... xD |
20:27.39 | Computerpunk | I got alchoholo-tite. |
20:34.23 | Ryelle_ | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.find(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)",print) |
20:34.24 | lua_bot | Ryelle_: luabot:1: bad argument #3 to 'find' (number expected, got function) |
20:37.26 | Crestor | find does not take a function |
20:37.53 | Crestor | that was the speciality of gsub |
20:38.05 | Ryelle_ | a function? |
20:38.20 | Computerpunk | print() is a function |
20:38.24 | Computerpunk | you named the function (print) |
20:38.37 | Computerpunk | string.find has other 3rd argument |
20:38.39 | Computerpunk | check the links I gave you |
20:38.49 | Ryelle_ | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.find(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)") |
20:38.49 | lua_bot | Ryelle_: No output |
20:38.53 | Ryelle_ | i see |
20:39.45 | Ryelle_ | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.gsub(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)",print) |
20:39.45 | lua_bot | Ryelle_: No output |
20:40.15 | Ryelle_ | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.gsub(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)",print(healers_name,spell,healed_amount,overhealed_amount) |
20:40.32 | lua_bot | Ryelle_: luabot:1: ')' expected near '<eof>' |
20:40.32 | Ryelle_ | sorry for spam, if it doesn't work this time i give up |
20:40.50 | Ryelle_ | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.gsub(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)",print(healers_name,spell,healed_amount,overhealed_amount)) |
20:40.51 | lua_bot | Ryelle_: nil, nil, nil, nil, luabot:1: bad argument #3 to 'gsub' (string/function/table expected) |
20:40.58 | Ryelle_ | FAIL |
20:41.04 | Ryelle_ | i'll stop spamming now |
20:41.55 | Crestor | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.find(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)");print(healers_name,spell,healed_amount,overhealed_amount) |
20:41.56 | lua_bot | Crestor: nil, nil, nil, nil |
20:42.18 | Crestor | ah ... :/ |
20:43.01 | Ryelle_ | beats me |
20:43.03 | Crestor | the variables aren't assigned in this onliner ... |
20:43.12 | Crestor | *oneliner |
20:43.22 | Ryelle_ | oooo |
20:43.48 | Crestor | they are assigned AFTER print was called |
20:44.13 | Crestor | it should work in you addon though |
20:44.58 | Ryelle_ | i don't get why it worked for computer punk tho |
20:45.29 | Ryelle_ | lua> word="word" w, ord = string.gsub(word, "(.)(...)", print) |
20:45.29 | lua_bot | Ryelle_: w, ord |
20:45.42 | Ryelle_ | it's like the exact same thing except less complicated |
20:45.48 | Crestor | because gsub calles the print after it is finished |
20:45.59 | Ryelle_ | but i tried it w/ gsub |
20:46.30 | Crestor | not in the right syntax |
20:49.23 | Ryelle_ | what'd i do wrong? |
20:51.00 | Crestor | you assummed that find and gsub can be called the same way ;) |
20:51.20 | Ryelle_ | i duplicated what computerpunk did tho |
20:51.27 | Computerpunk | o_O |
20:51.28 | Ryelle_ | only difference i can see is that i used .+ instead of . |
20:51.38 | Crestor | better, you mixed the usage of both functions |
20:51.50 | Ryelle_ | well i tried it both with .find and .gsub |
20:51.57 | Computerpunk | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.gsub(phrase, "(.+)'s (.+) heals you for (%d+). ((%d+) overhealed)",print) |
20:51.58 | lua_bot | Computerpunk: No output |
20:52.26 | Ryelle_ | it's not a big deal, i can experiment more when i get home later |
20:52.27 | Computerpunk | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" healers_name,spell,healed_amount,overhealed_amount = string.gsub(phrase, "(.+)'s (.+) heals you for (%d+). (.+) overhealed)",print) |
20:52.28 | lua_bot | Computerpunk: luabot:1: invalid pattern capture |
20:52.35 | Crestor | it didn't worked because you mixed them up |
20:52.39 | Computerpunk | Hmm. |
20:52.42 | Computerpunk | I think so. |
20:53.00 | Ryelle_ | i don't see a difference between the w,ord example and the one that computer punk just pasted. but i am an admitted noob |
20:53.49 | Ryelle_ | well the last one he removed a ( that i think is required |
20:53.51 | Ryelle_ | but the one before that |
20:53.52 | Computerpunk | I can't think atm. |
20:53.56 | Ryelle_ | tis ok |
20:54.01 | Computerpunk | I did a simple thing |
20:54.05 | Computerpunk | Just to sort it out in my brain |
20:54.08 | Computerpunk | but when I read long stuff |
20:54.09 | Computerpunk | v.v |
20:54.26 | Ryelle_ | maybe the lua bot hates longer variables or doesn't like the .+ or something |
20:55.12 | Crestor | lua> phrase="Ryell's Rend Soul heals you for 1000. (9000 overhealed)" ,string.gsub(phrase, "(.+)'s (.+) heals you for (%d+)%. (.+) overhealed)",print,1) |
20:55.12 | lua_bot | Crestor: luabot:1: bad argument #1 to 'gsub' (string expected, got nil) |
20:55.26 | Ryelle_ | >lua> words="these are words" these,are,words = string.gsub(words, "(.+) (.+) (.+)", print) |
20:55.52 | Crestor | lua> string.gsub("Ryell's Rend Soul heals you for 1000. (9000 overhealed)", "(.+)'s (.+) heals you for (%d+)%. (.+) overhealed)",print,1) |
20:55.53 | lua_bot | Crestor: luabot:1: invalid pattern capture |
20:56.34 | Ryelle_ | don't worry about it too much, i'll try to actually do it in game |
20:56.43 | Ryelle_ | lua> words="these are words" these,are,words = string.gsub(words, "(.+) (.+) (.+)", print) |
20:56.43 | lua_bot | Ryelle_: these, are, words |
20:56.53 | Computerpunk | There's an invalid place. |
20:57.01 | Ryelle_ | i understand the usage now, not sure why my complicated example fails |
20:57.26 | Ryelle_ | perhaps it doesn't like the extra () around overhealed |
20:57.28 | Computerpunk | lua> string.gsub("Ryell's Rend Soul heals you for 1000. (9000 overhealed)", "(.+)'s (.+) heals you for (%d+). ((.+) overhealed)",print) |
20:57.29 | lua_bot | Computerpunk: Ryell, Rend Soul, 1000, (9000 overhealed, (9000, Ryell's Rend Soul heals you for 1000. (9000 overhealed), 1 |
20:57.33 | Computerpunk | :P |
20:58.13 | Computerpunk | Seems it does. |
20:58.24 | Ryelle_ | i wish i saw what you changed |
20:58.30 | Ryelle_ | other than removing the phrase variable |
20:58.54 | Crestor | maybe mask the () with % ? |
20:59.08 | Crestor | so that they dont create another math |
20:59.10 | Ryelle_ | well tbh, the overhealed doesn't matter |
20:59.18 | Ryelle_ | i'll just not even query that part in the addon |
20:59.31 | Ryelle_ | the amounts aren't important for my addon, just the fact that something tried to heal the player |
21:00.17 | Ryelle_ | thanks again |
21:01.04 | *** join/#waruidev Haloperidol (i=gek1rufi@p57A0E3BE.dip.t-dialin.net) |
21:01.36 | Crestor | np, coding anyway here |
21:07.53 | Computerpunk | He could've also used events. |
21:07.59 | Computerpunk | For combat events. |
21:08.05 | Computerpunk | Easier than combat logs. |
21:08.06 | Computerpunk | o_o |
21:08.20 | Crestor | I dont know, never used them |
21:08.29 | Computerpunk | DHRecords and WSCT use them |
21:36.22 | *** join/#waruidev purl (i=ibot@rikers.org) |
21:36.22 | *** topic/#waruidev is http://waruidev.pastey.net/ | http://forums.curseforge.com/forumdisplay.php?f=6 and http://war.mmoui.com/forums | See http://thewarwiki.com/ for API info | Create WAR addons on http://war.curseforge.com/ and http://war.mmoui.com | WHA Mod Author Group: http://tinyurl.com/wha-mods | (22:44:20) God left the room (Kicked by Aiiane (Aiiane)). |