Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock > WarRock Guides, Tutorials & Modifications
You last visited: Today at 20:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[TUTORIAL]Making your own structure!

Discussion on [TUTORIAL]Making your own structure! within the WarRock Guides, Tutorials & Modifications forum part of the WarRock category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 38
Received Thanks: 21
[TUTORIAL]Making your own structure!

Hello people,

I am going to show you how to write your own structures.

What is a structure?
A structure is nothing more then a collection of offsets.
Every structure has its own size.
For example, the current cPlayerInfo structure has a size that cannot be modified, 0x1CF8.

Values
By most things, the standard value of a item in a structure is 4.
This value can be modified by using different types.
Here is a list:
Code:
DWORD = 4
char[x] = filled in at x
WORD = 2
__int32 = 4
BYTE = 1
float = 4
Creating a GAP
A GAP will be used to go to a specific offset. Note that a gap cannot be a negative value so everything needs to be in order!

Example of a gap:
Code:
struct CPlayerInfo
{
/* 7416 in heximal = 1CF8. This gap will fill up the whole cPlayerInfo structure.*/
char xUnknown[7416]; //0x00
}; //size = 0x1CF8 (7416)
The real work
We are going to make a cPlayer structure for example.
We have the following offsets:
Code:
#define OFS_Y                0x102E4
#define OFS_X                0x102EC
#define OFS_Z                0x102F4
#define OFS_AUTOPLANT        0x10358
#define OFS_AUTODEFUSE       0x1035C
To start, we need to jump directly to 0x102E4.
Grab calc.exe, set it on programmer mode (for windows 7) and tick Hex. Type in 102E4 and then tick Dec. Your answer will be 66276.
So we create a GAP to 0x102E4.
Code:
struct CPlayer
{
char xUnknown1[66276]; //0x00
/*value here will be 0x102E4. since Y is a float, we define it as a float.*/
float Y; //0x102E4
};
but wait! how do we continue!?
With a little bit of calculating.
Your next value will be 0x102E4 + 4 (size of float) = 0x102E8. This value is not enough to reach .102EC so we will create another, and another, and so on.
Code:
struct CPlayer
{
char xUnknown1[66276]; //0x00
/*value here will be 0x102E4. since Y is a float, we define it as a float.*/
float Y; //0x102E4
/*102E4 + 4 = 102E8. 102EC - 102E8 = 4, so we need 4 more*/
char xUnknown2[4]; //0x102E8
/*Here will be 102EC*/
float X; //0x102EC
/*the last one*/
char xUnknown3[4]; //0x102F0
float Z; //0x102F4
};
Now we create another gap to 10358.
Calc -> 102F4 + 4 = 102F8. 10358 -102F8 = 60
Code:
struct CPlayer
{
char xUnknown1[66276]; //0x00
/*value here will be 0x102E4. since Y is a float, we define it as a float.*/
float Y; //0x102E4
/*102E4 + 4 = 102E8. 102EC - 102E8 = 4, so we need 4 more*/
char xUnknown2[4]; //0x102E8
/*Here will be 102EC*/
float X; //0x102EC
/*the last one*/
char xUnknown3[4]; //0x102F0
float Z; //0x102F4
char xUnknown4[60] //0x102F8
DWORD AutoPlant; //0x10358
/*DWORD = 4 bytes, 10358 + 4 = 1035C, so we don't need a gap*/
DWORD AutoDefuse; //0x1035C
};
The size of the structure is the last offset you used. In this case it will be 1035C (201534 bytes)

Finalize

Now we clean up our code if you don't need the explaination anymore, put the size after the breakpoint and it will look like this:

Code:
struct CPlayer
{
char xUnknown1[66276]; //0x00
float Y; //0x102E4
char xUnknown2[4]; //0x102E8
float X; //0x102EC
char xUnknown3[4]; //0x102F0
float Z; //0x102F4
char xUnknown4[60] //0x102F8
DWORD AutoPlant; //0x10358
DWORD AutoDefuse; //0x1035C
}; //size = 0x1035C (201534)
And there it is! your own structure!

Credits
Spike2147 -> Writing this tutorial
_BuRn3R_ -> Sample structure

If you have questions, I will try to answer them!

Spike2147
spike2147 is offline  
Thanks
2 Users
Old 05/07/2012, 14:27   #2
 
elite*gold: 0
Join Date: Apr 2012
Posts: 21
Received Thanks: 0
ich habe leider von anfang nicht verstanden was eine structure denn genau ist bzw was ich damit anfangen kann.

I didnt get what a structure exactly is !
DELUXEOWN is offline  
Old 05/07/2012, 18:58   #3
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Why don't you just do it this way?

Based on:
Code:
#define OFS_Y                0x102E4
#define OFS_X                0x102EC
#define OFS_Z                0x102F4
#define OFS_AUTOPLANT        0x10358
#define OFS_AUTODEFUSE       0x1035C
Code:
struct {
#if (OFS_Y) > 0
BYTE padding1[OFS_Y];
#endif
float y;
#if (OFS_X - OFS_Y - sizeof(y)) > 0
BYTE padding2[OFS_X - OFS_Y - sizeof(y)];
#endif
float x;
#if (OFS_Z - OFS_X - sizeof(x)) > 0
BYTE padding3[OFS_Z - OFS_X - sizeof(x)];
#endif
float z;
#if (OFS_AUTOPLANT - OFS_Z - sizeof(z)) > 0
BYTE padding4[OFS_AUTOPLANT - OFS_Z - sizeof(z)];
#endif
DWORD autoplant;
#if (OFS_AUTODEFUSE - OFS_AUTOPLANT - sizeof(autoplant)) > 0
BYTE padding5[OFS_AUTODEFUSE - OFS_AUTOPLANT - sizeof(autoplant)];
#endif
DWORD autodefuse;
// and so on...
}
e/ /btw, what you're calling a "gap" is padding.
Raz9r is offline  
Reply


Similar Threads Similar Threads
Tutorial on making GM account
12/20/2012 - Silkroad Online - 24 Replies
Can someone write up a step by step on how to edit the pk2 file with a hex editor that will allow you to make a GM account. Any help is appreciated.
[TUTORIAL]How to make a Structure
05/07/2012 - WarRock - 0 Replies
#closerequest, wrong section.
[Tutorial]Making No Recoil
12/12/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 11 Replies
Hello, before making you very own anti recoil, you will need a few items. 1. SFF unpacker/packer by Revenger 2. Scr_001.sff All right, so when you have those, run the unpacker and find your SFF file. http://i31.tinypic.com/5pnbcz.jpg
[TUTORIAL]Making a NPC
07/09/2009 - CO2 Private Server - 0 Replies
Idk if this has been made already but i wanted to contribute to Epvpers... k heres where we start if (CurrentNPC == NPCID) { SendPacket(General.MyPackets.NPCSay("Here's where you put the NPC dialog")); SendPacket(General.MyPackets.NPCLink("BlahBla h", 1)); SendPacket(General.MyPackets.NPCLink("BlahBla h", 255)); ...
[TUTORIAL] Making you own PRIVATESERVER
05/16/2009 - MapleStory - 45 Replies
NOTE: CREDITS GOES TO azzybish in Odin MS Forum What you need: mySQL mySQL Query Browser OdinMS.rar WampServer localhost.exe Java JDK 6 Update 10



All times are GMT +1. The time now is 20:18.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.