C# blackmagic & SWTOR [SOLVED] menu

User Tag List

Results 1 to 11 of 11
  1. #1
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C# blackmagic & SWTOR [SOLVED]

    Hello,

    Yesterday i decided to create a teleport hack in C# using blackmagic for memory manipulation and come across a problem that its passing my knowledge of c#
    So im here seeking some help to see whats wrong from some professional on ownedcore.

    First of all i have the pointers to get the X,Y,Z updated! I can move using cheat engine, but wanted to create a program to do it.
    Second on this example code i will post im not using the pointers, but im using the final address that CE is gaving me for easy reading.


    This is just for testing purpose, and to get were my error hapens.
    Program content is:
    - 1 label1
    - 1 timer1

    So heres the Code:
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Magic;
    
    namespace TEST
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                timer1.Start();
            }
    
            private void timer1_Tick(object sender, EventArgs e)
            {
                BlackMagic sw = new BlackMagic();
                if (sw.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle("Star Wars: The Old Republic")))
                {
                    //MessageBox.Show("Success");
                    float x = sw.ReadFloat(0xF3F6476C); // this address is the current X address
                    label1.Text = "Current X:" + x;
                }
                else
                {
                    MessageBox.Show("Failed");
                }
            }
        }
    }
    So, everything is good to go, when i just start the program, im getting always the same error.
    "ReadFloat Failed"

    even other tests i made with readuint, readdouble, etc all are giving me "read**** Failed"

    So what can be happening? Whats the major problem with C# memory manipulating and SWTOR?


    PS - I tryed the exact same code with other game with diferent offset, and its working flawless, just not on SWTOR.

    Any help on the understanding whats happing is greatly aprreciated, already blow up my mind trying to find whats the problem.

    Thanks for your time reading this.
    Best Regards
    GRB

    [SOLVED]
    Thanks zzj for ur help.
    Last edited by GRB; 02-10-2012 at 09:33 AM.

    C# blackmagic & SWTOR [SOLVED]
  2. #2
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GRB View Post
    So what can be happening? Whats the major problem with C# memory manipulating and SWTOR?
    My guess is that you are opening the wrong process since there are two processes. I have not used the method to open the process you are using though. Otherwise the incorrect offset, but you said you used that offset in CE.


    --edit
    To find out if its the correct one, print out the process id of the process you open. sw.processid <--- or something. Then open your task manager and look at the top swtor.exe pid. The bottom one is the incorrect one I believe.
    Last edited by dook123; 02-10-2012 at 08:40 AM.
    ------------------------------
    If not me than who?

  3. #3
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by dook123 View Post
    My guess is that you are opening the wrong process since there are two processes. I have not used the method to open the process you are using though. Otherwise the incorrect offset, but you said you used that offset in CE.


    --edit
    To find out if its the correct one, print out the process id of the process you open. sw.processid <--- or something. Then open your task manager and look at the top swtor.exe pid. The bottom one is the incorrect one I believe.
    Its opening the right process, since only one of those processes have a window called "Star Wars: The Old Republic".

  4. #4
    zzj's Avatar Member
    Reputation
    2
    Join Date
    Jan 2012
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you actually need the swtor.exe process that does not have any window title

  5. #5
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by zzj View Post
    you actually need the swtor.exe process that does not have any window title
    I do? Mind to explain please?

    I dont think i do, since CE uses only one of those processes. Why would i need both of them for C#?


    [Solved]

    Thanks zzj, i actually need the other one, and not the windows one! thank you very much + rep.
    Last edited by GRB; 02-10-2012 at 09:32 AM.

  6. #6
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GRB View Post
    I do? Mind to explain please?

    I dont think i do, since CE uses only one of those processes. Why would i need both of them for C#?


    [Solved]

    Thanks zzj, i actually need the other one, and not the windows one! thank you very much + rep.
    If you would have taken my advice you would have found it was the incorrect one as well.
    ------------------------------
    If not me than who?

  7. #7
    zewt's Avatar Member
    Reputation
    13
    Join Date
    Nov 2008
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i just have a drop down so user can select either one to find which one is right ;P

    then read memory based off the chosen process ID


    HTML Code:
         public void getProcesses()
            {
                Process[] tempProcesses;
                int[] IDsList;
                comboProcess.Items.Clear();
                tempProcesses = Process.GetProcesses();
                IDsList = new int[tempProcesses.Length];
                int i = 0;
    
                foreach (Process pro in tempProcesses) {
                    //if (pro.MainWindowTitle != "")
                   // {
                    if (pro.ProcessName == "swtor")
                    {
                        comboProcess.Items.Add(pro.Id);
                        IDsList[i] = pro.Id;
                        i++;
                    }
                   // }
                   // else
                   // {
                    //    comboProcess.Items.Add(pro.ProcessName);
                    //    IDsList[i] = pro.Id;
                   //     i++;
                   // }
               }
    
            }

  8. #8
    MartinRFC's Avatar Member
    Reputation
    7
    Join Date
    Aug 2008
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by zewt View Post
    i just have a drop down so user can select either one to find which one is right ;P

    then read memory based off the chosen process ID


    HTML Code:
         public void getProcesses()
            {
                Process[] tempProcesses;
                int[] IDsList;
                comboProcess.Items.Clear();
                tempProcesses = Process.GetProcesses();
                IDsList = new int[tempProcesses.Length];
                int i = 0;
    
                foreach (Process pro in tempProcesses) {
                    //if (pro.MainWindowTitle != "")
                   // {
                    if (pro.ProcessName == "swtor")
                    {
                        comboProcess.Items.Add(pro.Id);
                        IDsList[i] = pro.Id;
                        i++;
                    }
                   // }
                   // else
                   // {
                    //    comboProcess.Items.Add(pro.ProcessName);
                    //    IDsList[i] = pro.Id;
                   //     i++;
                   // }
               }
    
            }
    Awesome

    With this you must add this reference btw
    HTML Code:
    using System.Diagnostics;
    Does anyone have a good way of determining which process is the correct one?
    Last edited by MartinRFC; 02-10-2012 at 10:32 PM.

  9. #9
    Artek72's Avatar Member
    Reputation
    1
    Join Date
    Jan 2011
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Get the first process by window name "Star Wars: The Old Republic".
    Save the Pid.
    The "swtor.exe" with a different pid is the right one.

  10. #10
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Process proc = Process.GetProcessesByName("swtor").FirstOrDefault(p => string.IsNullOrWhiteSpace(p.MainWindowTitle));

  11. #11
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apoc any chance to start having dump files from swtor, like they exist on wow?

    I know ur the men to do it.

Similar Threads

  1. How To Make Your Server Public With Out Hamachi Problem Solved
    By bomber1392 in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 12-12-2007, 03:35 AM
  2. Solve this for rep!
    By Gelormino in forum Community Chat
    Replies: 21
    Last Post: 09-22-2007, 01:14 PM
  3. Giant Speakers Or Amps
    By Dhorak in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 08-25-2007, 12:00 AM
  4. if you solve this i will reward you
    By Ark in forum Gaming Chat
    Replies: 39
    Last Post: 08-08-2007, 12:56 PM
All times are GMT -5. The time now is 05:29 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search