Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL Upgrade = NO;
- @interface AlertMethods
- -(void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
- @end
- %hook Player
- -(void)Jump:(int)jump { //10
- if ((Upgrade == YES)) {
- jump = 1;
- %orig(jump);
- }
- else {
- %orig;
- }
- }
- -(int)GetSkill {
- if ((Upgrade == YES)) {
- return 1;
- }
- else {
- %orig;
- }
- }//30
- %end
- %hook MainLayer
- -(int)GetSkill:(int)skill {
- if ((Upgrade == YES)) {
- skill = 1;
- %orig(skill);
- return 1;
- }
- else {
- %orig;
- }
- }
- %end
- //50
- %hook OptionMenu
- -(void)OpenOption {
- %orig;
- UIAlertView *OptionAlert= [[UIAlertView alloc]initWithTitle:@"Open Option/Change"
- message:@"Do u want to Enable/Disable(Change) the tweak for this game or do u want to continue with settings" delegate:self
- cancelButtonTitle:@"Settings" otherButtonTitles:@"Change", nil];
- [OptionAlert show];
- [OptionAlert release];
- [OptionAlert setTag:2];
- }
- %end
- %hook AppDelegate
- -(void)applicationDidFinishLaunching:(id)application {
- %orig; //70
- UIAlertView *ChangeAlert= [[UIAlertView alloc]initWithTitle:@"Upgrade"
- message:@"Do u want to play the upgraded(tweaked) version of Head Soccer?" delegate:self
- cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
- [ChangeAlert show];
- [ChangeAlert release];
- [ChangeAlert setTag:1];
- }
- %new
- -(void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
- if ((alertView.tag == 1)) {
- if (buttonIndex == 0)
- {
- Upgrade = NO;
- }
- else
- {
- Upgrade = YES;
- }
- }
- else {
- if (buttonIndex == 1)
- {
- if ((Upgrade == YES)) {
- Upgrade = NO;
- }
- else {
- Upgrade = YES;
- }
- }}}
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement