Skip to content
Guest Big Announcement

how to i hook somthing with 12 arguments

Featured Replies

how would i write all these args in the tweak.xm after the

%hook ADVBusinessData

-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice;(double) unlockType:(int) {

       WHAT DO I PUT HERE?????

}

IMG_0145_zpsjvauu1g4.jpg

 

 

Solved by MrDemoManHax

  • Author

Check the mshook topic

 

Give name for each and type return to few that you need to work

i duno how you mean can you give an example?

Updated by MrDemoManHax

  • Author

would it look like this???????

 

%hook ADVBusinessData
-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice:(double) unlockType:(int) {
   arg5 = 0;
   arg6 = 1e+53;
   arg7 = 1e+69;
   arg8 = 0;

%orig(arg5, arg6, arg7, arg8);
}
%end

Updated by MrDemoManHax

  • Author

would it look like this???????

 

%hook ADVBusinessData

-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice:(double) unlockType:(int) {

   arg5 = 0;

   arg6 = 1e+53;

   arg7 = 1e+69;

   arg8 = 0;

%orig(arg5, arg6, arg7, arg8);

}

%end

dont work :wallbash: :wallbash: :wallbash: :wallbash:

  • Author

ok it like this and i get one error now it says: error: expected function body after function declarator   initWithName:(char*)arg1

                                                                                                                                                                   ^

%hook ADVBusinessData
-(id)arg0 initWithName:(char*)arg1 img:(char*)arg2 business_id:(char*)arg3 tier:(int)arg4 baseThreat:(float)arg5 baseEarning:(double)arg6 baseCapacity:(double)arg7 baseBuildTime:(double)arg8 basePrice:(double)arg9 baseSellPrice:(double)arg10 unlockType:(int)arg11 {
   arg0 = %orig;
   arg5 = 0;
   arg6 = 1e+53;
   arg7 = 1e+69;
   arg8 = 0;
%orig( arg5, arg6, arg7, arg8 );
}
%end

Updated by MrDemoManHax

I don't do MS this actually looks like the biggest clusterf**k I've seen in my life I have no idea

%hook ADVBusinessData
-(id)arg0 initWithName:(char*)arg1 img:(char*)arg2 business_id:(char*)arg3 tier:(int)arg4 baseThreat:(float)arg5 baseEarning:(double)arg6 baseCapacity:(double)arg7 baseBuildTime:(double)arg8 basePrice:(double)arg9 baseSellPrice:(double)arg10 unlockType:(int)arg11 {
   arg5 = 0;
   arg6 = 1e+53;
   arg7 = 1e+69;
   arg8 = 0;
}
%end

Try it or do it 1 at time, maybe something is wrong. (Arg6 and arg7)

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.