Jump to content

1 post in this topic

Recommended Posts

Posted (edited)

Can somebody help me hook this function to repeat itself. Like I'm doing attack multiplier to hit the enemy multiple times.

[Address(RVA = "0x1639E4C", Offset = "0x1639E4C", VA = "0x101639E4C")]
public void SendAttackToEnemy(List<int> moblist, int skill, int card, int flag)

 

#import "Menu.h"
#include <substrate.h>
#import <mach-o/dyld.h>

uint64_t getRealOffset(uint64_t offset){
return _dyld_get_image_vmaddr_slide(0)+offset;
}
int (*org_SendAttackToEnemy)(void*, int moblist, int skill, int card, int flag);
int SendAttackToEnemy(void* this_, int moblist, int skill, int card, int flag) {
  return org_SendAttackToEnemy(this_, moblist, skill, card, flag) * 20;
}
%ctor {
  MSHookFunction((void *)getRealOffset(0x101639E4C), (void *)SendAttackToEnemy, (void **)&org_SendAttackToEnemy);
}

 

Kindly correct my code cause it's not working. planning to repeat the function 20 times. 

Updated by nyc709

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines