Just posting some of the old information from my bot for all you people still actively working on TwelveSky2 that may want to start to work on a memory based botting system.
To start with here are some of the structs I used for making my bot. This is the first time I had ever done something like this, so they are nowhere near professional or fully completed, but there fully working for main bot functions you may need(unless the game client changed drastically at some point):
Up to date Addresses:
MyCharacter Struct: 0x118BF14
Using the above:
Now if you want to access a piece of information from your character struct you can do it like this, using this example would be a speedhack:
List of Functions to trigger in the game client:
The skillbar struct I used to read whatever skill was on the skillbar slot, so that the bot would automatically know where the skill was that needed to be used, so the user would not have to designate a Key for the skill. Here is my nooby C++ function that made for this. I could defiantly be a lot better for any of you C++ pros out there that may read this but with my limited coding skills this what I came up with:
Usage of the above function went something like this:
Using all of the above it has determined what faction your current character belongs to, associated your character with that factions AOE skill(no def weapons included, but could be added), and scans the skillbar for the ID of the associated AOE skill.
At this point you can make a bot to auto execute the AOE skill without having to designate a key for the slot the skill is located on:
Possibly more to come, I just posted this in hopes maybe I can get my interest in these things sparked back up again, maybe spark up some interest in other people here to dabble with it a bit and possibly get a bit of credit for once(na, doesn't matter).
Anyways, I have limited knowledge in these matters and just dabble with stuff here and there, reading info I find on gamehacking/coding forums and going from there.
Yet again big thanks to Megabyte for helping understand how to use structs in a bot. I read so many source codes for Source Engine games and COD games in the past trying to understand how they did it, but I never understood how to make use of the start address for the struct in C++ before this.
I may post some info on locating new addresses for the structs and a small sample project for an Auto-AOE bot with updated addresses.
Hopefully somebody will enjoy reading this(for purposes regarding bot making and not other reasons) and hopefully I can stop being lazy/distracted and further my knowledge in these areas as I really enjoy doing it when everything clicks.
Good luck.
Tools that I used:
Cheat Engine 6: You know where to find this.
Reclass: New version can be on UknownCheats.com
Ollydebug
To start with here are some of the structs I used for making my bot. This is the first time I had ever done something like this, so they are nowhere near professional or fully completed, but there fully working for main bot functions you may need(unless the game client changed drastically at some point):
Code:
struct SkillBar{
DWORD Slot1ID; //0000
DWORD Slot1Count; //0004
DWORD Slot1Type; //0008
DWORD Slot2ID; //000C
DWORD Slot2Count; //0010
DWORD Slot2Type; //0014
DWORD Slot3ID; //0018
DWORD Slot3Count; //001C
DWORD Slot3Type; //0020
DWORD Slot4ID; //0024
DWORD Slot4Count; //0028
DWORD Slot4Type; //002C
DWORD Slot5ID; //0030
DWORD Slot5Count; //0034
DWORD Slot5Type; //0038
DWORD Slot6ID; //003C
DWORD Slot6Count; //0040
DWORD Slot6Type; //0044
DWORD Slot7ID; //0048
DWORD Slot7Count; //004C
DWORD Slot7Type; //0050
DWORD Slot8ID; //0054
DWORD Slot8Count; //0058
DWORD Slot8Type; //005C
DWORD Slot9ID; //0060
DWORD Slot9Count; //0064
DWORD Slot9Type; //0068
DWORD Slot10ID; //006C
DWORD Slot10Count; //0070
DWORD Slot10Type; //0074
DWORD Slot11ID; //0078
DWORD Slot11Count; //007C
DWORD Slot11Type; //0080
DWORD Slot12ID; //0084
DWORD Slot12Count; //0088
DWORD Slot12Type; //008C
DWORD Slot13ID; //0090
DWORD Slot13Count; //0094
DWORD Slot13Type; //0098
DWORD Slot14ID; //009C
DWORD Slot14Count; //00A0
DWORD Slot14Type; //00A4
};
#pragma pack(1)
struct MyCharacter{
BYTE Exists; //0000
BYTE Unknown0; //0001
BYTE Unknown1; //0002
BYTE Unknown2; //0003
char unknown3[16];
DWORD Contribution; //0014
char unknown4[20];
BYTE Unknown5; //002C
BYTE Unknown6; //002D
char CharName[13]; //002E
char unknown8[108];
BYTE AnimFreeze; //00A7
BYTE Animation; //00A8
BYTE AnimID; //00A9
BYTE MoveSpeed; //00AA
float AnimationFloat; //00AB
float CharX; //00AF
float CharZ; //00B3
float CharY; //00B7
float CharXLock; //00BB
float CharZLock; //00BF
float CharYLock; //00C3
float FaceDirection; //00C7
float RotateDirection; //00CB
char unknown9[12];
DWORD MaxHP; //00DB
DWORD CurHP; //00DF
DWORD MaxMP; //00E3
DWORD CurMP; //00E7
DWORD SkillEffect1; //00EB
DWORD SkillEffect2; //00EF
DWORD SkillEffect3; //00F3
DWORD SkillEffect4; //00F7
DWORD SkillEffect5; //00FB
DWORD SkillEffect6; //00FF
DWORD SkillEffect7; //0103
DWORD SkillEffect8; //0107
DWORD SkillEffect9; //010B
DWORD SkillEffect10; //010F
DWORD SkillEffect11; //0113
DWORD SkillEffect12; //0117
DWORD SkillEffect13; //011B
DWORD SkillEffect14; //011F
DWORD SkillEffect15; //0123
DWORD SkillEffect16; //0127
char unknown10[68];
BYTE Unknown11; //016F
DWORD CanAttack1; //0170
DWORD CanAttack2; //0174
DWORD CanAttack3; //0178
char unknown12[204];
DWORD Unknown13; //0248
};
struct Monsters{
DWORD Exists; //0000
char unknown0[8];
float AttackFloat; //000C
DWORD MobID; //0010
BYTE Unknown1; //0014
BYTE Animation; //0015
BYTE Unknown2; //0016
BYTE Unknown3; //0017
char unknown4[4];
float MobX; //001C
float MobZ; //0020
float MobY; //0024
float MobXLock; //0028
float MobZLock; //002C
float MobYLock; //0030
float Rotation; //0034
char unknown5[16];
DWORD MobHP; //0048
char unknown6[12];
DWORD Attacking; //0058
DWORD CanAttack1; //005C
DWORD CanAttack2; //0060
DWORD Hit; //0064
char unknown7[148];
DWORD Unknown8; //00FC
};
struct DroppedItems{
DWORD Exists; //0000
char unknown0[12];
DWORD ItemID; //0010
char unknown1[80];
float ItemX; //0064
float ItemZ; //0068
float ItemY; //006C
char unknown2[8];
DWORD Unknown3; //0078
};
struct ItemList{
DWORD ItemID; //0000
char unknown0[180];
DWORD Rarity; //00B8
DWORD Type; //00BC
char unknown1[232];
DWORD Unknown2; //01A8
};
struct Faction{
int faction;
};
struct CurFood{
int curfood;
};
extern SkillBar * Skillbar1;
extern MyCharacter * MyChar;
extern Monsters * Mobs;
extern DroppedItems * GroundItems;
extern ItemList * List;
extern Faction * MyFaction;
extern CurFood * CurFeed;
MyCharacter Struct: 0x118BF14
Using the above:
Code:
SkillBar *Skillbar1 = (SkillBar *)0xSkillBarADDR; Monsters *Mobs = (Monsters *)0xMobStructADDR; MyCharacter *MyChar = (MyCharacter *)CharStructADDR; DroppedItems *GroundItems = (DroppedItems*)DroppedItemsADDR; Faction *MyFaction = (Faction*)FactionADDR; CurFood *CurFeed = (CurFood*)PetFoodADDR;
Code:
MyChar->MoveSpeed = 200;
Code:
void UseSkill(int Arg1, int Arg2, int Arg3, int Arg4)
{
UINT_PTR adr = 0x00476600;
__asm
{
PUSH Arg1
PUSH Arg2
PUSH Arg3
MOV EDX,[EBP-8]
PUSH Arg4
MOV ECX,[EBP-10]
CALL adr
}
}
void UseConsole(int Arg1, const char* Arg2)
{
UINT_PTR adr = 0x00522C80;
__asm
{
PUSH Arg1
PUSH Arg2
MOV ECX,0x012E3900
CALL adr
}
}
void UseFruit(int Arg1, int Arg2)
{
UINT_PTR adr = 0x00422D40;
__asm
{
PUSH Arg1;
MOV ECX,[0x116519C]
PUSH Arg2
MOV ECX,0x0059EAA0
CALL adr
}
}
void FullRecover()
{
UINT_PTR adr = 0x004A5570;
__asm
{
CALL adr
}
}
void Loot()
{
UINT_PTR adr = 0x004763A0;
__asm
{
CALL adr
}
}
The skillbar struct I used to read whatever skill was on the skillbar slot, so that the bot would automatically know where the skill was that needed to be used, so the user would not have to designate a Key for the skill. Here is my nooby C++ function that made for this. I could defiantly be a lot better for any of you C++ pros out there that may read this but with my limited coding skills this what I came up with:
Code:
int GetIDFromSB(int ID)
{
int ReturnSlot;
if(Skillbar1->Slot1ID == ID)
{
return ReturnSlot = 0;
}
else if(Skillbar1->Slot2ID == ID)
{
return ReturnSlot = 1;
}
else if(Skillbar1->Slot3ID == ID)
{
return ReturnSlot = 2;
}
else if(Skillbar1->Slot4ID == ID)
{
return ReturnSlot = 3;
}
else if(Skillbar1->Slot5ID == ID)
{
return ReturnSlot = 4;
}
else if(Skillbar1->Slot6ID == ID)
{
return ReturnSlot = 5;
}
else if(Skillbar1->Slot7ID == ID)
{
return ReturnSlot = 6;
}
else if(Skillbar1->Slot8ID == ID)
{
return ReturnSlot = 7;
}
else if(Skillbar1->Slot9ID == ID)
{
return ReturnSlot = 8;
}
else if(Skillbar1->Slot10ID == ID)
{
return ReturnSlot = 9;
}
else if(Skillbar1->Slot11ID == ID)
{
return ReturnSlot = 0xA;
}
else if(Skillbar1->Slot12ID == ID)
{
return ReturnSlot = 0xB;
}
else if(Skillbar1->Slot13ID == ID)
{
return ReturnSlot = 0xC;
}
else if(Skillbar1->Slot14ID == ID)
{
return ReturnSlot = 0xD;
}
}
Code:
int CharFaction = MyFaction->faction;
int AOEID = GetAOEID(CharFaction);
int AOESlot = IMBClass.GetIDFromSB(AOEID);
int GetAOEID(int faction)
{
int aoeID;
if(faction == 0)
{
aoeID = IMBClass.SWIRLINGPHOENIX;
}
else if(faction == 1)
{
aoeID = IMBClass.DEADLYAVALANCHE;
}
else if(faction == 2)
{
aoeID = IMBClass.BATTLESONG;
}
return aoeID;
}
At this point you can make a bot to auto execute the AOE skill without having to designate a key for the slot the skill is located on:
Code:
UseSkill(0, 0, 0, AOESlot); // First Arg is Skillbar# and last is SkillbarSLot#, can't remember what the other 2 args are, don't need to be used anyhow.
Possibly more to come, I just posted this in hopes maybe I can get my interest in these things sparked back up again, maybe spark up some interest in other people here to dabble with it a bit and possibly get a bit of credit for once(na, doesn't matter).
Anyways, I have limited knowledge in these matters and just dabble with stuff here and there, reading info I find on gamehacking/coding forums and going from there.
Yet again big thanks to Megabyte for helping understand how to use structs in a bot. I read so many source codes for Source Engine games and COD games in the past trying to understand how they did it, but I never understood how to make use of the start address for the struct in C++ before this.
I may post some info on locating new addresses for the structs and a small sample project for an Auto-AOE bot with updated addresses.
Hopefully somebody will enjoy reading this(for purposes regarding bot making and not other reasons) and hopefully I can stop being lazy/distracted and further my knowledge in these areas as I really enjoy doing it when everything clicks.
Good luck.
Tools that I used:
Cheat Engine 6: You know where to find this.
Reclass: New version can be on UknownCheats.com
Ollydebug