You are viewing our Forum Archives. To view or take place in current topics click here.
#31. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
xAcme wrote
Bitwise wrote
IDA wrote
Bitwise wrote
Botch wrote These are some very interesting releases man, if people would actually pay attention to what you are releasing I'm sure you would be worshipped as a god on here lol.

It's really too bad I don't have Ghosts, otherwise I would be using these as we speak


What games do you mod? I'll find these on other cods.


what about MW3 would be good


Here;

PlayFX

void playFx(float*origin, int effectIndex)
{
       int entity = G_Temp(origin, 0x56);
       *(int*)(entity + 0xA0) = effectIndex;
       *(int*)(entity + 0xD8) = 0x00;
       *(float*)(entity + 0x40) = 0.00f; *(float*)(entity + 0x44) = 0.00f;
       *(float*)(entity + 0x3C) = 270.0f;
}


Earthquake

void quake(float scale, int duration, float*source, int radius)
{
      int entity = G_Temp(source, 0x5F);
      *(int*)(entity + 0x5C) = radius;
      *(float*)(entity + 0x54) = scale;
      *(float*)(entity + 0x58) = (float)duration;
      *(int*)(entity + 0xD8) = 0x00;
}

Did you release this for mw2 yet?


MW2;

PlayFX
//XREF's not showing -_- will edit once someone binary search's "playfx" and tells me the xref.
Earthquake

int (*G_Temp)(float*source,int r4) = (void(__cdecl*)(float*,int))0x8220EE88;

void quake(float scale, int duration, float*source, int radius)
{
      int entity = G_Temp(source, 0x5C);
      *(int*)(entity + 0x60) = radius;
      *(float*)(entity + 0x58) = scale;
      *(float*)(entity + 0x5C) = (float)duration;
}
#32. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Not letting this die out. There just has to be some programmers on this website? Somewhere out off all the leeching pathetic skids, there just has to be ONE guy who knows how to use this...
#33. Posted:
xAcme
  • Junior Member
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Bitwise wrote Not letting this die out. There just has to be some programmers on this website? Somewhere out off all the leeching pathetic skids, there just has to be ONE guy who knows how to use this...

Ah, did not see that you posted that. Thanks for the release <3
#34. Posted:
IDA
  • Powerhouse
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
Right lets try keep this on the first page, surely someone must know how to use it ?
#35. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Here is PlayFX & Earthquake for the 3ARC engines;

void doEarthquake(float scale, int duration, float*source, float radius)//bo2
{
   int eq = G_Temp(source, 0x69);// G_Temp = 0x8238B8C8
   *(float*)(eq + 0x54) = scale;
   *(float*)(eq + 0x58) = radius;
   *(int*)(eq + 0x5C) = duration;
}

void doEffect(int effectIndex, float*source)//bo2
{
   int eq = G_Temp(source, 0x56);// G_Temp = 0x8238B8C8
   *(int*)(eq + 0xD4) = effectId;
   *(__int64*)(eq + 0x40) = 0;
   *(float*)(eq + 0x3C) = 270f;
}

void doEarthquake(float scale, int duration, float*source, float radius)//bo1
{
   int eq = G_Temp(source, 0x58);// G_Temp = 0x823258B8
   *(float*)(eq + 0x54) = scale;
   *(float*)(eq + 0x58) = radius;
   *(int*)(eq + 0x5C)  = duration;
}

void doEffect(short effectIndex, float*source)//bo1
{
   int eq = G_Temp(source, 0x46);// G_Temp = 0x823258B8
   *(short*)(eq + 0xBC) = effectIndex;
   *(__int64*)(eq + 0x40) = 0;
   *(float*)(eq + 0x3C) = 270.0f;
}


So there. I have released it for every game now...

To keep this OP for ghosts...Here is my ghost class.

#include "data.h"
char* (*va)(char*fmt,...) = (char*(__cdecl*)(char*,...))0x82568748;
void (*SV_GSSC)(int clientIndex, unsigned int type, char*fmt) = (void(__cdecl*)(int,unsigned int, char*))0x824D3A48;
int (*G_ModelIndex)(char*name) = (int(__cdecl*)(char*))0x82428F50;
int (*GTemp)(float*source, int r4) = (int(__cdecl*)(int,int))0x8242B430;
void (*G_FreeEntity)(int ent) = (void(__cdecl*)(int))0x8242AC00;
float (*flrand)(float min, float max) = (float(__cdecl*)(float,float))0x82429B00;
int (*G_EffectIndex)(char*effectName) = (int(__cdecl*)(char*))0x8215C6B0;

const char*mflags[6] = { "none", "noclip", "ufo", "noclip2", "freeze", "freeze controls" };
class Mod
{
   public:
      struct bit { int playerId; int cFx; float*origin[3]; float*angle[3]; bool tbag;}; //Size about...0x1B?
      enum : int { x, y, z }coord_t;
      typedef enum : int { none, noclip, ufo, noclip2, freeze, freeze_controls=8 }mFlag;
      Mod(int clientIndex, bool update);
      ~Mod();
      int playerState();
      int gentity();
      int clients();
      void playEffects(char*effectName,int effectId);
      ~playEffects();
      bool weaponState();
      bool ADS();
      bool Recoil();
      bool switchingWeapons();
      bool pickUpWeapons();
      bool Offhand();//Grenades, ect
      void setPlayerHealth(int amount);
      void setSpreadOverride(int spread);
      void resetSpreadOverride();
      void toggleMFlag(mFlag flag);
      void randomTele();
      void tBag();
      void setRedBox(bool enabled);
      void disableKillstreak(bool enabled);
      void setModel(char*modelName);
      void setGamertag(char*gamertag);
      void setClantag(char*clantag);
      void setViewModel(char*viewModelName);
      void disablePMFlag(bool enabled);
      bool Jump();
      bool Sprint();
      bool Alive();
      bool Hurt();
      void findString(int ep, int size, char*id);
}

Mod::Mod(int clientIndex, bool update = false)
{
   bit.playerId = clientIndex;
   if(update)
      bit.origin[x] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x1C); bit.angle[x] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x13C);
      bit.origin[y] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x20); bit.angles[y] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x140);
      bit.origin[z] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x24); bit.angles[z] = data().ReadFloat(0x832F1200 + (clientIndex * 0x3700) + 0x144);
}
Mod::~Mod()
{
   bit.playerId &= ~bit.playerId;
   bit.origin = {0f}; bit.angle = {0f};
}
int Mod::playerState()
{
   return 0x832F1200 + (bit.playerId * 0x3700)
}
int Mod::gentity()
{
   return 0x8336AD80 + (bit.playerId * 0x280);
}
int Mod::clients()
{
   return 0x839DD780 + 0x207E90 + (bit.playerId * 0x6FA00);
}
void Mod::playEffects(char*effectName,int effectId=0)
{
   bit.cFx = GTemp(bit.origin, 0x5B);
   data().WriteInt32(bit.cFx + 0x9C, (!effectId ? G_EffectIndex(effectName) : effectId));
   data().WriteInt64(bit.cFx + 0x40, 0x00);
   data().WriteFloat(bit.cFx + 0x3C, 270.0f);
}
Mod::~playEffects()
{
   G_FreeEntity(bit.cFx); memset((void*)(bit.cFx), 0x00, 0x270);
}
/* Lol
      Example of usage;
      Mod lol(0);
      bool isdizriet = lol.ADS(); //This will enable ADS and return true
      
*/
bool Mod::weaponState()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x80);
   return (return (data().checkInt32(playerState() + 0x420, 0x80));//Will return true if the flag holds 0x80
}
bool Mod::ADS()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x20);
   return (data().checkInt32(playerState() + 0x420, 0x20));
}
bool Mod::Recoil()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x400);
   return (data().checkInt32(playerState() + 0x420, 0x400));
}
bool Mod::switchingWeapons()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x800);
   return (data().checkInt32(playerState() + 0x420, 0x800));
}
bool Mod::pickUpWeapons()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x8000);
   return (data().checkInt32(playerState() + 0x420, 0x8000));
   
}
bool Mod::Offhand()
{
   if(data().ReadInt32(playerState() + 0x420)!=0) data().WriteInt32(playerState() + 0x420, 0x00);
   data().WriteInt32_XOR(playerState() + 0x420, 0x1000);
   return (data().checkInt32(playerState() + 0x420, 0x1000));
}
void Mod::setPlayerHealth(int amount)
{
   data().WriteInt32(gentity() + 0x1A8, amount);
}
void Mod::setSpreadOverride(int spread)
{
   data().WriteInt32(playerState() + 0x430, spread);
   data().WriteInt32(playerState() + 0x434, 0x02);
}
void Mod::resetSpreadOverride()
{
   data().WriteInt32(playerState() + 0x434, 0x01);
   data().WriteFloat(playerState() + 0x428, 255.0f);
}
void Mod::toggleMFlag(Mod::mFlag flag)
{
   if(data().ReadInt32(playerState() + 0x331C)!=0) data().WriteInt32(playerState() + 0x3120, 0x00);
   data().WriteInt32_XOR(playerState() + 0x3120, (int)flag);
   if((int)flag & 8) flag -= 3;
   SV_GSSC(bit.playerId, 1, va("e \"%s %s\"", mflags[(int)flag], (data().checkInt32(playerState() + 0x3120, (int)flag) ? "on" : "off")));
}
void Mod::randomTele()
{
   data().WriteFloat(playerState() + 0x1C, bit.origin[x] + flrand(0, 0x99f));
   data().WriteFloat(playerState() + 0x20, bit.origin[y] + flrand(5,0x99f));
   data().WriteFloat(playerState() + 0x24,bit.origin[z] + flrand(10,0x99f));
}
void Mod::tBag()
{
   for(;;)
   {
      if(!bit.tbag) break; goto end;
      data().WriteInt32_ORd(playerState + 0xC, (0x04 | 0x02));
   }
   end:
      data().WriteInt32_AND(getPlayerState + 0xC, ~0x06);
}
void Mod::setRedBox(bool enabled)
{
   data().WriteInt32(playerState + 0x10, (enabled ? 0x10 : 0x00));
}
void Mod::disableKillstreak(bool enabled)
{
   data().WriteUInt32(playerState + 0xA60 + 0xC, 0x03); //When the player press's dpad right, a checkerboard will be displayed instead of it doing the actual action :P
}
void Mod::setModel(char*modelName)
{
   data().WriteInt16(gentity() + 0x170, G_ModelIndex(modelName));
}
void Mod::setGamertag(char*gamertag)
{
   if(strlen(gamertag) > 31) printf("Gamertag to long, max length is 31\n"); goto end;
   data().WriteString(playerState() + 0x309C, gamertag);
   SV_GSSC(bit.playerId, 1, va("e \"Gamertag set to %s\"", data().ReadString(playerState() + 0x309C)));
   end: return;
}
void Mod::setClantag(char*clanTag)
{
   if(strlen(gamertag) > 4) printf("Clantag to long, max length is 4\n"); goto end;
   data().WriteString(playerState() + 0x310C, clanTag);
   SV_GSSC(bit.playerId, 1, va("e \"Clantag set to %s\"", data().ReadString(playerSTate() + 0x310C)));
   end: return;
}
void Mod::setViewModel(char*viewModelName)
{
   data().WriteInt32(playerState() + 0x3054, G_ModelIndex(viewModelName));
}
void Mod::disablePMFlag(bool enabled)
{
   data().WriteInt32_Shifted(playerState() + 0xC, (enabled ? LEFT : RIGHT), 16);
}
bool Mod::Jump()
{
   if(data().ReadInt32(playerState() + 0xC) != 0) data().WriteInt32(playerState() + 0xC, 0x00)
   data().WriteInt32_XOR(playerState() + 0xC, 0x02);
   return (data().checkInt32(playerState() + 0xC, 0x02));
}
bool Mod::Sprint()
{
   if(data().ReadInt32(playerState() + 0xC) != 0) data().WriteInt32(playerState() + 0xC, 0x00)
   data().WriteInt32_XOR(playerState() + 0xC, 0x04);
   return (data().checkInt32(playerState() + 0xC, 0x04));
}
bool Mod::Alive()
{
   return (data().ReadInt32(gentity() + 0x1A8) > 0);
}
bool Mod::Hurt()
{
   return (data().ReadInt32(gentity() + 0x1A8) > 0 && data().ReadInt32(gentity() + 0x1A8) < 35);
}
void Mod::findString(int ep, int size, char*id)
{
   for(int i = 0; i != size; i++)//Goes through evert state within the structure
      if(strstr((char*)(ep + i),id)) cout << hex << i << " = " << id << endl;
      else continue;
}


Last edited by Bitwise ; edited 1 time in total
#36. Posted:
Dumb_Modz
  • TTG Addict
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 2,206
Reputation Power: 10
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 2,206
Reputation Power: 10
I'm sure there are people like me who can understand what the code does by reading it, but have no idea where or how to get the info needed to make things like this.
#37. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Dumb_Modz wrote I'm sure there are people like me who can understand what the code does by reading it, but have no idea where or how to get the info needed to make things like this.


To find Scr_PlayFX, you can simply string search "playfx" and find for the string that contains forward or upward, and jump the xref. And then reverse the function, and you will notice G_Temp is the main thing for spawning the effect, the instruction bl branch's to a location, and returns the result into r3, and continues on with the rest of the current code. The rest I don't need to explain, it's basic powerpc...and if you don't know basic powerpc you shouldn't be trying to find things like this.

To find GScr_Earthquake, on 3ARC engine they use the same strings as cod4. So you can easily string search "Radius" and look for where it has a string along the lines of "Radius is invalid, must be more than 0". on IW you're going to have to do binary pattern searching to find it. After you have found it, once again reverse, and you will se it use's the same method as playfx, G_Temp.

There you have it.
#38. Posted:
Thames
  • Challenger
Status: Offline
Joined: Mar 31, 201410Year Member
Posts: 196
Reputation Power: 8
Status: Offline
Joined: Mar 31, 201410Year Member
Posts: 196
Reputation Power: 8
Bitwise never fails to impress Nice one bro
#39. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Snowden wrote Bitwise never fails to impress Nice one bro


Thanks I guess lol, I don't release anything anymore and quit modding again. So someone seriously needs to make use of this so I didn't waste my time.
#40. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Just wanted to say, I saw I didn't update this to tu11 so I just did. I also re-mapped out Earthquake and I am 100% sure it's all correct (Since before radius was being set to duration, can't have that happening now can we)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.