[Release] WoWBasic 2.0 menu

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 41
  1. #16
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Soularis View Post
    Keylogger eh?!?!?!
    This section is over your head, kindly back up and head back to the "Noobs R Us" store.

    Have a great day!

    [Release] WoWBasic 2.0
  2. #17
    bigtimt's Avatar Active Member
    Reputation
    41
    Join Date
    Mar 2008
    Posts
    100
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well shynd, i can rewrite that whole program from scratch without looking at any documentation, i know every offset i used and i know how every class i wrote works. that's why i don't comment, i have it all memorized.

  3. #18
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And if you were to take a sabbatical from WoW for a few months and then come back to it you'd still be able to read your code line by line because you'd still have every little thing memorized? Give me a break. Only shitty programmers don't comment their code, at least parts of it.

  4. #19
    bigtimt's Avatar Active Member
    Reputation
    41
    Join Date
    Mar 2008
    Posts
    100
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i'm sorry you take forever to remember what the hell things do, i didn't do anything to deserver you're flaming Shynd, so why don't you go ahead and back off. I program the way I want to program, and you are in no place to be judging the way i like to do things.

  5. #20
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Soularis View Post
    Keylogger eh?!?!?!

    Holy christ. You're here now? Kindly get the **** out, as kynox has pointed out this section is over your head. This isn't the lulz-auto-it-macro-section, so what are you doing here?

    Originally Posted by Shynd View Post
    Now there's a good practice to get into. Who the **** comments code only because they're showing it to others.
    I'm gonna admit that I usually only comment very obscure parts of my code, for example if there's a pointer offset I'm using that's not obvious I'll document where it came from, but if I can work it out in 5 seconds from just firing up IDA I probably won't bother.

    That being said with the rewrite of all my code I'm doing now I'm taking the opportunity to do a full cleanup and proper commenting. When you're working at a low level on a really big project sometimes you just want to throw something in quickly to see if it works but not comment it incase it doesn't, then you never get around to cleaning it up and recommenting it. Prime example:

    Code:
        gpDumpLog->Add("enum eClientDB {");
    
        unsigned int iDBCount = 0;
        unsigned int dwRegisterDbcBase = 0;
        unsigned int dwValue, dwRegDbcFunc, dwGetDbcFunc, dwDbcNameOff = 0;
        std::string sFullDbcName, sDbcName;
        do
        {
            if (!iDBCount)
                dwRegisterDbcBase = __ClientDB__RegisterBase;
            else
                dwRegisterDbcBase += 0x14;
    
            dwValue = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 1);
            dwRegDbcFunc = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 0x10) + (dwRegisterDbcBase + 0x10) + 5 - 1;
            dwGetDbcFunc = *reinterpret_cast<unsigned int*>(dwRegDbcFunc + 0x10) + (dwRegDbcFunc + 0x10) + 5 - 1;
            dwDbcNameOff = *reinterpret_cast<unsigned int*>(dwGetDbcFunc + 1);
            sFullDbcName = reinterpret_cast<const char*>(dwDbcNameOff);
            sDbcName = sFullDbcName;
            sDbcName.erase(0,14);
            sDbcName.erase(sDbcName.end() - 4, sDbcName.end());
            sDbcName.insert(0,"tDB_");
            char TempValue[10] = { 0 };
            sprintf_s(TempValue,sizeof(TempValue),"0x%X",dwValue);
            sDbcName.append(" = ");
            sDbcName.append(TempValue);
            sDbcName.append(", // ");
            char TempPointer[12] = { 0 };
            sprintf_s(TempPointer,sizeof(TempPointer),"0x00%X",reinterpret_cast<unsigned int>(gpClientDB->GetMap()[dwValue]));        
            sDbcName.append(TempPointer);
    
            gpDumpLog->Add(sDbcName.c_str());
    
            ++iDBCount;
        } while (*reinterpret_cast<unsigned char*>(dwRegisterDbcBase + 0x14) == 0x68);
    
        dwRegisterDbcBase = __DBClient__RegVideoHardware;
        dwValue = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 1);
        dwRegDbcFunc = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 0x10) + (dwRegisterDbcBase + 0x10) + 5 - 1;
        dwGetDbcFunc = *reinterpret_cast<unsigned int*>(dwRegDbcFunc + 0x10) + (dwRegDbcFunc + 0x10) + 5 - 1;
        dwDbcNameOff = *reinterpret_cast<unsigned int*>(dwGetDbcFunc + 1);
        sFullDbcName = reinterpret_cast<const char*>(dwDbcNameOff);
        sDbcName = sFullDbcName;
        sDbcName.erase(0,14);
        sDbcName.erase(sDbcName.end() - 4, sDbcName.end());
        sDbcName.insert(0,"tDB_");
        char TempValue1[10] = { 0 };
        sprintf_s(TempValue1,sizeof(TempValue1),"0x%X",dwValue);
        sDbcName.append(" = ");
        sDbcName.append(TempValue1);
        sDbcName.append(",");
        gpDumpLog->Add(sDbcName.c_str());
        ++iDBCount;
    
        dwRegisterDbcBase = __DBClient__RegStartupStrings;
        dwValue = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 1);
        dwRegDbcFunc = *reinterpret_cast<unsigned int*>(dwRegisterDbcBase + 0x10) + (dwRegisterDbcBase + 0x10) + 5 - 1;
        dwGetDbcFunc = *reinterpret_cast<unsigned int*>(dwRegDbcFunc + 0x10) + (dwRegDbcFunc + 0x10) + 5 - 1;
        dwDbcNameOff = *reinterpret_cast<unsigned int*>(dwGetDbcFunc + 1);
        sFullDbcName = reinterpret_cast<const char*>(dwDbcNameOff);
        sDbcName = sFullDbcName;
        sDbcName.erase(0,14);
        sDbcName.erase(sDbcName.end() - 4, sDbcName.end());
        sDbcName.insert(0,"tDB_");
        char TempValue2[10] = { 0 };
        sprintf_s(TempValue2,sizeof(TempValue2),"0x%X",dwValue);
        sDbcName.append(" = ");
        sDbcName.append(TempValue2);
        sDbcName.append(",");
        gpDumpLog->Add(sDbcName.c_str());
        ++iDBCount;
    
        gpDumpLog->Add("ntDB_COUNT = 0x%X", iDBCount );
        gpDumpLog->Add("};n");

    PS. inb4 "holy shit what does that do!"


    Originally Posted by Shynd View Post
    And if you were to take a sabbatical from WoW for a few months and then come back to it you'd still be able to read your code line by line because you'd still have every little thing memorized? Give me a break. Only shitty programmers don't comment their code, at least parts of it.

    That may be partly true but there's a difference between good and bad commenting. If you comment every single line like you suffer from OCD that's not really a good idea because it reduces readability. Furthermore, you shouldn't be commenting WHAT lines do (because any programmer reading your code should be able to figure that out, unless it is particularly obscure), but WHY. Also, I dunno what your code looks like but you can avoid the need for comments altogether sometimes if you don't use magic numbers and name everything properly and sensibly.

    eg The function above which isn't in one of the code files I have rewritten yet COULD be rewritten to look nice and not have to be commented at all. Examples of how to do this would be:
    * Convert magic numbers into const ints or enums
    * Move obscure functionality into seperate functions (ie the resolving of relative jumps)
    * Move string functionality into better named functions
    * etc.

    That function is a particularly difficult chunk of code to understand so it would probably still benifit from comments, but my point is while they are nice they're not always necessary. You should comment your code for other programmers to read, not for your mum to read, or at least that's my opinion.
    Last edited by Cypher; 10-05-2008 at 11:42 PM.

  6. #21
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, now I see where Shynd is coming from.

    Code from his blog:
    NoMorePasting.com

    That is EXACTLY what I was talking about. Magic numbers, OCD style commenting that explains what not why. etc.

    Shynd, just because you have comments doesn't mean you're doing them 'right/well'. (Subjective)

    Examples:

    s_curMgrPointer = Memory.ReadUInt(hProcess, Memory.ReadUInt(hProcess, 0xD495B0) + 0x2218); <-- what the hell are those constants? put them in const ints and name the damn things
    uint
    interact = Memory.ReadUInt(hProcess, (Memory.ReadUInt(hProcess, obj) + (34 * 4))); <-- same deal
    Memory.WriteMemory(hProcess, (CodeCave + 2), s_curMgrPointer); <-- etc
    Memory.WriteMemory(hProcess, (CodeCave + 21), (CodeCave + 0x100)); <-- etc
    Memory.WriteMemory(hProcess, (CodeCave + 26), (interact - (CodeCave + 30))); <-- etc
    Memory.WaitForSingleObject(hThread); <-- i would see commenting on this line as kinda pointless as it's obvious to any programmer but thats just me

  7. #22
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, Cypher, I know. That blog was abandoned because I wrote it as I was teaching myself new concepts, which is, it became obvious, a very poor idea. That code snippet is a prime example. I tested and tweaked it, including the array of bytes that represent the injected code, for a few hours, got it working, thrust in a few comments so that those that do not know what all the API calls do could follow along, slapped it on the blog, and moved on. When I went back through that project after not programming ANYTHING for like two straight weeks -- I'd grown frustrated with myself and my shitty programming techniques -- I had to actually open up OLLY, force that code to execute, and step through the C# and the injected bytes line-by-line to re-acquaint myself with it. That code that you've unknowingly stumbled upon is almost the entire reason that I'm so adamant about commenting, now. That code was written by a shitty programmer (me). The projects that I'm working on now are far better (though not perfect; I still have a bad habit of throwing in constants without naming them, especially when I'm tweaking something ).

    I think you'll agree when I say that, sooner or later, nearly every programmer learns to leave, as you said, "why comments" on anything that could possibly be questioned; and, in my experience, programmers tend to learn that from their own mistakes and hours wasted deciphering their own code, the use of which could have been made clear with a simple one-line comment.

  8. #23
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh I agree with that. You totally missed my point though. My point is comments should be used appropriately.

  9. #24
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which is what I thought I was agreeing with by saying everyone learns, sooner or later, to leave why comments. I fully agree that too much commenting can be unnecessary and/or confusing. No commenting, however, is worse. Especially when the language is VB =p

  10. #25
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shynd View Post
    Which is what I thought I was agreeing with by saying everyone learns, sooner or later, to leave why comments. I fully agree that too much commenting can be unnecessary and/or confusing. No commenting, however, is worse. Especially when the language is VB =p

    Well, it's not so much the language (putting aside its horrid syntax and obvious deficiencies) but rather the type of people that use it. Not saying you specifically, but rather, more the 'masses'.

  11. #26
    klesko's Avatar Member
    Reputation
    1
    Join Date
    Oct 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I am pretty new to this and was wondering why I would be getting a File Not Found error when using WowBasic when declaring a new instance of cWoWInstance.

    Any help would be greatly appreciated.

  12. #27
    bigtimt's Avatar Active Member
    Reputation
    41
    Join Date
    Mar 2008
    Posts
    100
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it reads the path to WoW from your computer's registry so there should not be any "file not found" problems unless ur registry isn't in english or there is no wow.exe in the world of warcraft folder... wowbasic 3.0 addresses this issue

  13. #28
    shauno's Avatar Member
    Reputation
    3
    Join Date
    Oct 2008
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very very cool library, playing with it now, I look forward to future releases

    Do you think this will ever have kind of .. hooks?
    So if you find the area around you and be able to target specific things and stuff like that?
    Last edited by shauno; 10-15-2008 at 10:44 PM.

  14. #29
    bigtimt's Avatar Active Member
    Reputation
    41
    Join Date
    Mar 2008
    Posts
    100
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by shauno View Post
    Very very cool library, playing with it now, I look forward to future releases

    Do you think this will ever have kind of .. hooks?
    So if you find the area around you and be able to target specific things and stuff like that?
    in wowbasic 3.0 there is a bunch of new things you can do with the library

  15. #30
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Shynd View Post
    Which is what I thought I was agreeing with by saying everyone learns, sooner or later, to leave why comments. I fully agree that too much commenting can be unnecessary and/or confusing. No commenting, however, is worse. Especially when the language is VB =p
    I assume self-commenting code is just not a possibility eh?

    Ask Cypher how most of my code looks, very very rarely do I ever comment anything. The code does it for me. And if you can't read code, then you couldn't understand what the hell was happening anyway, with or without comments.

    Cypher's code is usually fairly clean (for the exception of that DBC dumper he posted earlier), though he's retarded enough to write that code in the first place.

    P.S; EW!!!!! VB!!!! EWW!!!!

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [Release] Herbs to flag
    By Dave-evad in forum World of Warcraft Model Editing
    Replies: 9
    Last Post: 11-26-2006, 03:31 PM
  2. Burning Crusdade Release Date!
    By codydude815 in forum World of Warcraft General
    Replies: 22
    Last Post: 10-30-2006, 01:59 PM
  3. anti-warden Release #1
    By zhPaul in forum World of Warcraft Bots and Programs
    Replies: 40
    Last Post: 10-21-2006, 01:40 AM
  4. Burning Crusade Release
    By KOLOSSAL in forum World of Warcraft General
    Replies: 3
    Last Post: 10-10-2006, 12:33 AM
All times are GMT -5. The time now is 02:09 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search