Jump to content

Need Help Thanks :) - ERROR: %orig found outside of hook or subclass


10 posts in this topic

Recommended Posts

Posted
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.JustinPet26.restauranttown.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%hook GameState
-(int) playerGems {
if(GetPrefBool(@"kGems")) {
return 999999;
}
return %orig;
}
-(int) playerMoney {
if(GetPrefBool(@"kCoins")) {
return 9999999;
}
return %orig;
}
-(int) overallReputation {
if(GetPrefBool(@"kRep")) {
return 999;
}
return %orig;
}
-(int) playerLevel {
if(GetPrefBool(@"kPlevel")) {
return 80;
}
return %orig;
}
-(BOOL) perfumesUnlocked {
if(GetPrefBool(@"kPerf")) {
return TRUE;
}
return %orig;
}
-(int) storageCapacity {
if(GetPrefBool(@"kStorage")) {
return 5000;
}
return %orig;
}
%end

%hook ProfileObject
-(BOOL) unlocked {
if(GetPrefBool(@"kItems")) {
return TRUE;
} 
return %orig;
}
%end

%hook @class Level
-(BOOL) isUnlocked {
if(GetPrefBool(@"kSlevel")) {
return TRUE;
} 
return %orig;
}
%end

%hook MerchandiseObject
-(int) xpAdded {
if(GetPrefBool(@"kXp")) {
return 1500;
}
return %orig;
}
%end

%hook GameLayer
-(double) remainingExpandTime {
if(GetPrefBool(@"kExpand")) {
return 0;
}
return %orig;
}
%end

%hook AppDelegate
-(void)applicationDidBecomeActive:(id)argument {
NSUserDefaults *validate = [NSUserDefaults standardUserDefaults];
NSString *alreadyRun = @"already_run";
if ([validate boolForKey:alreadyRun])
return;
[validate setBool:YES forKey:alreadyRun];

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hack Successful" message:@"Hacked by JustinPet26 for iOSGods.com" delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end

Some one tell me why this isn't compiling? It's fine :@

 

ERROR: %orig found outside of hook or subclass

Posted

%hook @class Level
-(BOOL) isUnlocked {
if(GetPrefBool(@"kSlevel")) {
return TRUE;
}
return %orig;
}
%end

 

why CLASS?

Posted

%hook @class Level

-(BOOL) isUnlocked {

if(GetPrefBool(@"kSlevel")) {

return TRUE;

}

return %orig;

}

%end

 

why CLASS?

 

I had to add that in, i compiled it and gave me error because @class wasn't there, so i added it then i get the %orig error -.- ahh i'm so confused

OVK8H9u.png?1

 

the error without the @class

Posted

I did he said same thing as you to remove @class but it has to be there for some reason.

Screw you THEOS.


okay well..

I completely removed the %hook Level section from tweak.xm

and now compiles, ehh it can live without it i guess haha :)

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