[some crappy code] PyMode menu

Shout-Out

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [some crappy code] PyMode

    I decided to quit wow because it just sucks waaay too much time and cataclysm seems to be epic failure so far, so here is latest version of my wow tool.

    Some basic info:
    - in-process
    - written in c#
    - very incomplete, mostly experimenting stuff
    - outdated.. it is for 3.3.0 I think but I'm not sure
    - using Cypher's loader (not included in git, dunno about license and stuff, can be replaces easily with your own)
    - there might be some pieces of code from this site.. I'm not sure how much but definitelly something from Apoc and Kynox, so thanks for that

    Features
    - object manager
    - can cast spells
    - can read cooldowns and auras
    - direct x drawing (basic, experimental, kind-of retarded)
    - c# script engine (used to be IronPython, later boo but c# + visual studio just rocks)

    And thats about it probably.. some pieces of code are really crappy.. for example (within .net loader):

    Code:
    		// TODO: figure out how to inject this with parameters
    		#ifdef _DEBUG
            	ESCS( pAppDomainSetup->put_ApplicationBase( _bstr_t( L"D:\\Development\\Projects\\PyMode\\bin\\Debug\\" ) ) );
    		#else
    			ESCS( pAppDomainSetup->put_ApplicationBase( _bstr_t( L"D:\\Development\\Projects\\PyMode\\bin\\Release\\" ) ) );
    		#endif
    Yea I know, I deserve to be slapped in my face with a fish.. but whatever.

    Screenies:
    http://dl.dropbox.com/u/1799304/Wow/lady%20dw.jpg
    http://dl.dropbox.com/u/1799304/Syne...its%20done.png
    http://dl.dropbox.com/u/1799304/Mmowned/holy.png
    http://dl.dropbox.com/u/1799304/Projects/pymode3.png

    Source:
    Kryso's PyMode at master - GitHub


    Feel free to use wherever you want
    Tea and cake or death?!

    [some crappy code] PyMode
  2. #2
    andykh's Avatar Contributor
    Reputation
    128
    Join Date
    Dec 2007
    Posts
    302
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really doesn't matter or affect your tool at all, but just by curiosity.. as you may know, most Python Modules and software are named PyXXX, so calling it PyMode is really misleading since its made in c#

    EDIT:
    Here is an example of what I mean, as you can see, there's a big amount of stuff called PyMode already, and they are all Python-related
    Last edited by andykh; 08-07-2010 at 10:04 PM.


  3. #3
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even his own post is already on google.. weird.


  4. #4
    andykh's Avatar Contributor
    Reputation
    128
    Join Date
    Dec 2007
    Posts
    302
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by suicidity View Post
    Even his own post is already on google.. weird.
    It wasn't.. there.. 10 minutes ago.. I.. I is scared.

    the google be watching us.


  5. #5
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, originally it was supposed to create new scripting environment within wow with use of python.. python went away but name didnt
    Tea and cake or death?!

  6. #6
    fusspawn's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    54
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hmm.

    Ive been busy updating your work to the latest wow build.
    I can get it running the gui up and loaded.

    Compiling scripts however.

    Code:
    lock ( SyncRoot ) {
                    foreach ( Type type in types ) {
                        if ( !type.IsClass || !type.IsSubclassOf( typeof( Script ) ) ) {
                            Log.WriteLine( "\tIgnoring '" + type.FullName + "'" );
                            continue;
                        }
    
                        toRegister.Enqueue( type );
                        
                    }
                }
    
                // WTF, If we never Dequeue the items itll always hang?
                while (toRegister.Count > 0)
                    Thread.Sleep(0);
                
    
    
                Log.WriteLine();
                Log.WriteLine( "Finished" );
    mainly
    // WTF, If we never Dequeue the items itll always hang?
    while (toRegister.Count > 0)
    Thread.Sleep(0);

    doesnt make any sense. Itll always just hang there sleeping the thread.

    I tried to loop over the Enqueued results and called the Register(Type T) func on the exposed types. But thats a client crash.. Any ideas?

    ---------- Post added at 07:52 PM ---------- Previous post was at 07:43 PM ----------

    Okay.. Seems the scripts are compiling fine. I can click back to the Gui and see them, and the gui is still responsive. Just wow throws up its usuall report error box and locks out.

    ---------- Post added at 07:54 PM ---------- Previous post was at 07:52 PM ----------

    Current Code im trying.

    Code:
    lock ( SyncRoot ) {
                    foreach ( Type type in types ) {
                        if ( !type.IsClass || !type.IsSubclassOf( typeof( Script ) ) ) {
                            Log.WriteLine( "\tIgnoring '" + type.FullName + "'" );
                            continue;
                        }
    
                        //toRegister.Enqueue( type );
                        Register(type);
                    }
                }

  7. #7
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's there because you don't want to create scripts in GUI thread, but in wow thread - script object is instantiated immediately after registering. If you don't do that, scripts using any code that is calling wow functions in constructor will fail.

    PyMode/Scripting/ScriptManager.cs at master from Kryso's PyMode - GitHub
    Tea and cake or death?!

  8. #8
    fusspawn's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    54
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aha, Knew I was missing something stupid it was 4am when i grabbed the source god knows what time it was when i got to looking at that.

    Other than a few Eww moments the codes not so bad at all. If i should fix/Improve this to 3.5.5a would you have any issues with it being posted? Or would you rather it remained something people fixed for themselfs.

  9. #9
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Feel free to post this wherever you want, just include credits somewhere.
    Tea and cake or death?!

  10. #10
    Opirity's Avatar Contributor
    Reputation
    139
    Join Date
    Apr 2010
    Posts
    462
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on the pic with your shammy, what is like the UI for your awesome when you heal? the scrolling combat text?

  11. #11
    fusspawn's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    54
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Itll be in this thread only.

    Im still having a crash issue when it starts. I can get it to run by not allowing the AssemblyManager.Analyze(CurrentAssembly); in the PyCoreMain startup.

    Quite why its doing this is byond me at the moment and is still giving me a headache. I think i still have a few invalid pointers and thats causing it. Its just working out what ones a few of the names threw me while being valid names to what they represent. What there link into the wow client is has me thrown.
    Code:
    Party: Okay so its party related, but what the starts of the partys Guid list or?
    RaidCount: I just havent found out how to access this one yet.
    ulong** Raid: So its a pointer to a pointer  to the guid of something todo with the raiggroup. Joys. Ill find out thisone later
    FocusGuid: Havent found out how to extract this one out of the client yet either.
    InstanceDif: Again havent found this one.
    
    SpellBookPointers.Spell and SpellBookPointers.Spell count Im lacking to.
    MovementPointers.ActiveInputControl : I dont even know what this one is yet, More searching required.
    Anyone working on this other than me that has found any of the ones im missing would you contact me. Id gladly contribute back anything i had fixed/found.

  12. #12
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Movement is not working iirc.

    Party and Raid are used for party pointers (find references and see how they are used) and can be found within GetGUIDFromKeyword (or something like that) along with RaidCount and FocusGuid. InstanceDifficulty is in lua_GetInstanceDifficulty (or whatever it is called ). Spells are referenced in lua_GetSpellCount.

    By disabling analyzing assembly you disable most endscene handlers.. so almost nothing will work Also not all pointers are in Pointers file (however most of them should be there).

    ephecat: what shaman? http://www.tukui.org/ + all addons from here http://github.com/Kryso
    Tea and cake or death?!

  13. #13
    Opirity's Avatar Contributor
    Reputation
    139
    Join Date
    Apr 2010
    Posts
    462
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i mean the fonts in your screen like the awesome

    +1088 when healing and stuff

    when you do damage or heal with spells

  14. #14
    fusspawn's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    54
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, Ive tracked the source of the client crash down. (My head hurts.)

    It comes down to the objectmanager endscene pulse.

    During the update loop EnumObjects is called. But while iterating the results something odd happens.

    to start of the GetObjectPtr() function always returns IntPtr.Zero; Always.
    then after around 5/6 objects. It simply crashes the client.

    Ie Enum => Loop => First 5/6 Objects GetObjectPtr() returns IntPtr.Zero; After around the 5th or 6th object (seemingly random) GetObjectPtr() crashes the client. Why I do not know. But its happening during that function call :/


    Code:
    if ( localPlayerGuid != 0 ) {
                    Logger.WriteLine("Enum");
                    EnumVisibleObjects( ( guid, filter ) => {
                        Logger.WriteLine("PreGetObjectPtr");
                        IntPtr pObject = GetObjectPointer( guid, filter );
                        Logger.WriteLine("GetObjectCalled");
    
                        if (pObject == IntPtr.Zero)
                        {
                            //This code is Always run its always IntPtr.Zero and ive no clue why.
                            Logger.WriteLine("NoObjectPointer");
                            return 1;
                        }
    
                        //We Never get this far. 
                        Logger.WriteLine("GotObject");
                        switch ( *( ( WowObjectType* )pObject + 5 ) ) { .........

  15. #15
    Cheatz0's Avatar Member
    Reputation
    14
    Join Date
    May 2009
    Posts
    36
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had this problem just yesterday. You might be using the wrong pointer. There are 2 different ones posted in the infodump thread. One of the functions always return 0(i think) and one works correctly. When i checked my patterns i realised I had the wrong pointer, which i just took from the infodump without doublechecking The correct one should be 0x004D4DB0.

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 8
    Last Post: 01-06-2009, 06:08 PM
  2. Replies: 15
    Last Post: 07-22-2008, 07:38 AM
  3. Some Morph Codes
    By Festigio in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-25-2007, 07:49 PM
  4. [AU3] Need some coding help.
    By Tink in forum Community Chat
    Replies: 4
    Last Post: 12-25-2007, 12:10 AM
All times are GMT -5. The time now is 08:26 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