Need a help with code [C#] menu

User Tag List

Results 1 to 15 of 15
  1. #1
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a help with code [C#]

    I have read this forums topics and im stucked, im atm installing a IDA and hex rays to get offsets. But my problem is this:

    Code:
       Console.Clear();
                    Console.WriteLine("X: " + playerx);
                    Console.WriteLine("T: " + (playerx+ 5));
                    Console.WriteLine("Y: " + playery);
                    Console.WriteLine("T: " + (playery + 5));
                    Thread.Sleep(1000);
                    wow.WriteFloat(0xB9251C + 0x74, playerx + 5);
                    wow.WriteFloat(0xB9251C + 0x78, playery + 5);
                    wow.WriteFloat(0xB9251C + 0x7C, playerz + 5);
                    wow.WriteInt(0xB9251C + 0x1C, 4);
                    Thread.Sleep(3000);
    As you see, i get X and Y and Z coordinate normaly and when i try to write it to memory to do walking, nothing happens.


    What i did wrong? im new at memoryread&write thinks. I have some experince on clientless bots via VB6 but this is a bit new to me.

    Purri~

    Need a help with code [C#]
  2. #2
    Mr.Zunz's Avatar Contributor
    Reputation
    92
    Join Date
    Mar 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by purri View Post
    Code:
                    Console.WriteLine("X: " + playerx);
                    Console.WriteLine("T: " + (playerx+ 5));
                    Console.WriteLine("Y: " + playery);
                    Console.WriteLine("T: " + (playery + 5));
                    Thread.Sleep(1000);
                    wow.WriteFloat(0xB9251C + 0x74, playerx + 5);
                    wow.WriteFloat(0xB9251C + 0x78, playery + 5);
                    wow.WriteFloat(0xB9251C + 0x7C, playerz + 5);
                    wow.WriteInt(0xB9251C + 0x1C, 4);
                    Thread.Sleep(3000);
    What is this I don't even...

    Srsly wtf!? why + 5? >_>


  3. #3
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm thats how i use in my diablo bot what is the right way then?
    This is from my diabot, so you know why im bit confused
    Code:
    Public Sub D2GSsend0x03(reasingX As Long, reasingY As Long)
    ShowChat vbGreen, "Liikutaan X=" & reasingX & " Y=" & reasingY & " Pelaajan perässä."
    With Buf 
      .InsertWORD reasingX +5
      .InsertWORD reasingY +5
      .SendGPacket &H3
    End With

  4. #4
    BoogieManTM's Avatar Active Member
    Reputation
    52
    Join Date
    May 2008
    Posts
    193
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How big is a float?

  5. #5
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    float is 4 bytes long... why you ask? like:

    00 00 00 00 is float and
    00 00 00 00 00 00 00 00 is double , 8 bytes. and these has also words , not only numbers.
    Last edited by purri; 05-05-2010 at 05:00 PM. Reason: asd

  6. #6
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The magic number 5 is in that case the position offset he wants to walk to and isn't the size of a float :P

    As I already wrote in http://www.mmowned.com/forums/wow-me...walk-test.html you have to write your position to 'Click' at offset 0x80 and not to 'Destination' at 0x74.

    And I don't know why you mess up with that, but you have to actually write 4 (for CTMType.Move) to ActionType at 0x10 rather than 0x1C.

    Please read the thread of Steveiwonder, I think I explained the same things over there...
    At least, it's working for my bot if I do something like:
    Code:
        Memory.Write<Vector3>(Addresses.GlobalCTMStruct + 0x80, location);  // Write click position to offset 0x80!
        Memory.Write<float>(Addresses.GlobalCTMStruct, 0.5f);  // move until 0.5 yards away from WP
        Memory.Write<uint>(Addresses.GlobalCTMStruct + 0x10, (uint)ctmType);  // CTMType.Move = 4 to offset 0x10

  7. #7
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate, i got it working =)

    here is the code
    Code:
                    Console.Clear();
                    Console.WriteLine("Moving");
                    Thread.Sleep(1000);
                    wow.WriteFloat(0xB9251C + 0x80,((playerx+20)+(playery+20)));
                    wow.WriteFloat(0xB9251C + 0x0C, 0.5f);
                    wow.WriteInt(0xB9251C + 0x10, 4);
                    Thread.Sleep(3000);

  8. #8
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One final note: If you want to use that interaction distance stuff (with 0.5f) you have to write the float to the first value of the struct. At offset 0x0C you will write it to the timestamp.

  9. #9
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How i can make a vector ? i think for 0x80 click i must have a vecror like x,y,z combined to one ?

  10. #10
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ehrr yes I see what you mean...

    There's still a mistake in your way to write the click position.
    When I refer to writing your position to 0x80, I mean that you have to write x to 0x80, y to 0x84 and z to 0x88 what actually should be fairly obvious
    Vector3 is a struct defined by myself, because I didn't want to use the XNA framework (which has the same name for that type) just for that simple stuff... and I did because of being able to apply a StructLayoutAttribute.
    With my vector type I am able to Read/Write it directly from WoW's memory, how to implement reading/writing of structs is explained in one of Apoc's threads, just search if you haven't done that already.
    Alternatively, you may use BlackMagic.ReadObject for that.
    Last edited by Bananenbrot; 05-07-2010 at 09:50 AM.

  11. #11
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bananenbrot View Post
    Ehrr yes I see what you mean...

    There's still a mistake in your way to write the click position.
    When I refer to writing your position to 0x80, I mean that you have to write x to 0x80, y to 0x84 and z to 0x88 what actually should be fairly obvious
    Vector3 is a struct defined by myself, because I didn't want to use the XNA framework (which has the same name for that type) just for that simple stuff... and I did because of being able to apply a StructLayoutAttribute.
    With my vector type I am able to Read/Write it directly from WoW's memory, how to implement reading/writing of structs is explained in one of Apoc's threads, just search if you haven't done that already.
    Alternatively, you may use BlackMagic.ReadObject for that.
    when i write 0x80 my positon, does syntax are like X=500.162476 Y=4298.35449 Z=41.4769135?

  12. #12
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually don't know what your position is but yes :confused:
    Seriuosly, simple do
    Code:
    wow.WriteFloat(0xB9251C + 0x80, playerx + 20.0f);
    wow.WriteFloat(0xB9251C + 0x84, playery + 20.0f);
    // z is optional, wow sets it accordingly
    // wow.WriteFloat(0xB9251C + 0x88, playerz);
    wow.WriteFloat(0xB9251C, 0.5f);
    wow.WriteInt(0xB9251C + 0x10, 4);
    And after that, plz go searching and googling before you post anything else... It isn't that hard to figure out, isn't it?
    Read on C# value/reference types and how they are marshaled...
    And get to know how they are laid out in memory, your questions aren't much related to the purpose of this section (suprised that anybody has flamed in here yet^^)

  13. #13
    purri's Avatar Private
    Reputation
    1
    Join Date
    May 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, i allrdy made a waypoints and other thinks, i can run where i want with waypoints. I also made a code what looks current target and figures it name and are it on killing list and kill it. Only problem is where i can see when my current target hp? so i know when i need to end killing loop. I have looked in IDA and cant find anything what helps me

  14. #14
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    UnitHealth...? It's called lua. Use it.

  15. #15
    Steveiwonder's Avatar Active Member
    Reputation
    31
    Join Date
    Oct 2009
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I posted a similar question not so long ago here http://www.mmowned.com/forums/world-...walk-test.html - maybe something there can help you.

    But i'm guessing you have already seen this if followed forum rules

Similar Threads

  1. Need help with code on dk rune check for scourge strike please :)
    By godlike86 in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 04-30-2013, 05:49 AM
  2. [PQR] Need help with Code
    By spawnpl in forum WoW Bots Questions & Requests
    Replies: 2
    Last Post: 04-23-2013, 12:32 AM
  3. Need some help with fishing bot
    By ralphie123 in forum World of Warcraft Bots and Programs
    Replies: 3
    Last Post: 11-24-2006, 09:41 AM
  4. NEED SOME HELP with Model Editing
    By Dwarf in forum World of Warcraft Model Editing
    Replies: 4
    Last Post: 09-12-2006, 08:12 PM
All times are GMT -5. The time now is 07:25 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