Jump to content

Patcher doesn't work #2


Go to solution Solved by AxCE,

15 posts in this topic

Recommended Posts

Posted (edited)

Hello.

This is like the fourth time i have a problem with this shit. So im making a patcher for HappyWheels.

When i Null a void it doesnt change anything in the game. (I tried with many voids)

For ex. This (its a part of my tweak.xm):

 

%hook HomingMine-(void)explode {if(GetPrefBool(@"key3")) {}return %orig;}%end[/code]That pisses me off!

Pleas Help. Thanks.

 

I forgot.

My Tweak.xm:

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iosgods.happyw.plist"

 

inline bool GetPrefBool(NSString *key) {

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

#include <Foundation/Foundation.h>

 

%hook Session

 

-(float)gravity {

if(GetPrefBool(@"key1")) {

return -5.00f;

}

return %orig;

}

 

%end

 

%hook CharacterB2D

 

-(void)headSmash:(float)argument1 {

if(GetPrefBool(@"key2")) {

argument1 = 0.0f;

}

return %orig;

}

 

%end

 

%hook CharacterB2D

 

-(void)chestSmash:(float)argument2 {

if(GetPrefBool(@"key2")) {

argument2 = 9999999.0f;

}

return %orig;

}

 

%end

 

%hook CharacterB2D

 

-(void)pelvisSmash:(float)argument3 {

if(GetPrefBool(@"key2")) {

argument3 = 999999.0f;

}

return %orig;

}

 

%end

 

%hook HomingMine

 

-(void)explode {

if(GetPrefBool(@"key3")) {

}

return %orig;

}

 

%end

 

%hook ArrowGunRef

 

-(bool)dontShootPlayer {

if(GetPrefBool(@"key4")) {

return TRUE;

}

return %orig;

}

 

%end

 

%hook HarpoonGunRef

 

-(bool)startDeactivated {

if(GetPrefBool(@"key5")) {

return TRUE;

}

return %orig;

}

 

%end

 

 

/* Popup with a link

 

Varieties of a UIAlertView Popup can be found here: http://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/

 

*/

 

 

%hook AppDelegate // Change this with your Application's Delegate. AppController, UnityAppController, GameDelegate etc.

 

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.

UIAlertView *igcredits = [[uIAlertView alloc] initWithTitle:@"happyw Cheats"

message:@"\nhappyw Cheats by axce for iOSGods.com"

delegate:self

cancelButtonTitle:@"Thanks"

otherButtonTitles:@"Visit Us", nil];

[igcredits show];

[igcredits release];

return %orig();

}

 

%new

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

 

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Visit Us"])

{

[[uIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://iosgods.com/]];

}

}

%end

Updated by AxCE
Posted

Copy paste the code, then select them all and click on the "code" tag

In the preview post is it right? Idk how to fix that:/

Posted (edited)

Copy paste the code, then select them all and click on the "code" tag

amm on which code tag? This one. code]/code? With the[

Sorry idk how to make it right????

Updated by AxCE
Posted

amm on which code tag? This one

[/code*]Without*

No need to write it, there's a pre-made tag on top of what you're writing. It's a paper with < > on it

Posted

No need to write it, there's a pre-made tag on top of what you're writing. It's a paper with < > on it

I cant find it? Im on my phone btw..
Posted

I cant find it? Im on my phone btw..

Oh it's not there when your on moble-mode. Next to the URL iosgods.com, keep your finger on the refresh button until a "request desktop site" pops up. Or just do it on your pc :p

Posted

Oh it's not there when your on moble-mode. Next to the URL iosgods.com, keep your finger on the refresh button until a "request desktop site" pops up. Or just do it on your pc :p

im in london atm no pc :)Ill try.
Posted

im in london atm no pc :)Ill try.

There's a button next to the search bar click scroll right and there will be a request desktop site

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