Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Second Hack Tutorial

Sup everyone! Nice to see you're still learning. Today we'll see how to
hack PTD2, in a continuation of the PTD1 tutorial. If you haven't checked
it out, I heavily recommend it, for it contains all the starting stuff. For this
one, I will assume that you already know what AS and P-Code are, what a
decompiler is for and that your hacking folder is already set up.
Today, we're going to-

How do I disable the shiny popup?????


Uh, that is a bit of an advanced hack, but it's easier in the second-

Can you hack Shiny Mew in PTD1???


No, it's an unhackable, there's some that-

Why do I have the Annoying role!?!?


Dude I'm not a mod, ask Psy Guy and stop DMing me already.

Enfin bref1. Today, I will show you how to work PTD2 in Jpexs, and a
little hack that I know you'll appreciate. Perhaps even more than a Shiny
Rate hack.
Today, we're getting rid of this:

1 French for “Anyways”.


You hate it, I hate it, and if Sam has given up on PTD then he's given up
on all money he can still make with it. Today, we reclaim our playing time.
You will need a .swf file of PTD2. I will not directly show you how to grab
one, other than you need to Inspect the samdangames website. However
there is a trick, for if you're not careful, you might download the pre-game
loader instead of the full game. I did give you the URL of the PTD1 file in
my previous tutorial; if you're smart unlike me, you'll know how to tweak
it to get the full PTD2 game.

Second Hack Time!


Let's open our good old friend Jpexs, and our freshly-downloaded PTD2
.swf. Already you can notice the folder style is a little different.
If you open up “Scripts”, there's nothing in there but irrelevant things.
Where are the sprites? The texts? And where is the code??
PTD2 is straightforward in its ways. But to tweak the code, one must first
discover it.
Opening “binaryData”, you will be greeted with rows upon rows of
hexadecimals like these. If you've used Cheat Engine a lot, you might be
familiar with this system. What, do we need to learn hex coding to hack
this game? Well, not exactly.

*click*

Oh, so that's where it is! Sneaky little thing.


Well. Now that we know where to look, let's get to hacking.
Again, the gist of what you want is right in there. Notice how everything is
named in a straightforward manner; no more §_-nI§ or class_898 mystery
folders! Ain't that a gift from Sam? That's why many prefer to hack PTD2,
everything is just so much more intuitive.
Alright, so. To remove an advertisement message, we have to find out
what dictates it. And for that, we turn to our old friend.

Hm, what could we search? “Ad”, “popup”, perhaps “sponsor”? Let's try it
out.

Always in P-Code, mind. If you could get away with AS search in PTD1,
this time it will fry up your poor computer. Hope you like frozen stuff.
It might be scary to find up so much stuff, but let's act logically. Your
results might likely be on top of the list, for everything below is graphic
stuff. You're not looking for anything sound-related, for controls or stuff
outside of “code”: see, you've already eliminated a good chunk of search
results. Save yourself a lot of time searching all of these, and try to think
about what are the most likely options.
We did find some stuff related to the ad, but how can we be sure it's the
right file? If you have doubts, you can try another file, or another search.
Personally, I don't see anything here I could use to get rid of the ad popup.
Maybe you do, and that's good. There's not only one way to achieve a
given result: this tutorial is not a rulebook to follow at all costs, only a
guide. If something doesn't work as intended, but you tweak it so that it
does anyway, then it's great: it shows your resourcefulness. And that's
something no tutorial can teach you.
I just remembered, the Trainer Pass thing allows you to bypass ads
altogether, right? Let's see if we can maybe…

OwO? What's this? Let's remove some lines...


(In PTD2, you can directly edit AS, which is quite refreshing. For numbers
and values, do stick to P-Code, it's safer.)

Don't forget to save. Which brings us to a lil technical point, which is that
if you've opened binary data as SWF data, you need to save twice.
The blue area is the “inside” of the SWF data. When you modify
something in there, it needs to be translated back into hexadecimals as
seen before. So you need to save once while you're in the blue area (the
Jpexs header will read “SWF Data”), and then once more when you're in
the orange area so that the file as a whole saves (the header will show the
filepath of your .swf). If you want to Save As another version, you can do
it in the orange area.
Aight, let's test it out!
...black screen. Well, no one said it'd be easy! When it fails, try again.
Code is capricious, remember. This time, we'll try something else.
Let's look at the code again. The way the ad system works is that if the
adCount value reaches 0, it will display an ad. With adMax being 10, you
get an ad every 10 levels. What if we turned adCount to 999? That means
it'd take 999 levels to get one ad. And just to be sure, let's give ourselves
trainer_pass = true.

Wait, are you sure you know what you're doing?


I said that this tutorial is not a rulebook. Even pro hackers make mistakes.
(Except PsyGuy, cause PsyGuy has all the answers.) I don't have all the
solutions etched in my mind, so I'm trying out as much as you are. There's
nothing wrong with being wrong, as a lot of this stuff is try and retry. You
won't get it perfect on the first try, even if you know your code really well.
No one's gonna do the work for you.

But isn't that what you're doing, writing tutorials?


Anyway, let's test our file a second time.
And would you look at that! I've been at it for 5 minutes, running into wild
Pokemon and exiting right away, and still no ad! With 999 encounters
needed to get one, it's pretty much nullified.
Again, this is only one way to do it, there are likely others. Don't hesitate
to try out stuff, make test versions and go wild at it. As long as you back
everything up, you should be safe. Have fun!

You might also like