Wednesday, October 6, 2010

Headers and Scripts

So, you may of heard about Headers or Scripts every now and then across the game. This is a pretty simple breakdown of how they work.

When you do something in Mobsters, whether it's doing a mission, punching someone, purchasing property or equipment, banking cash, ANYTHING, it is executing a link. In the old days, we could just right click and 'copy link location', but the architecture of this game doesn't allow that. So what to do? Install a Header Grabber!

I personally use one called 'FireBug'. It's a Firefox plugin, and it will 'grab' the script that is being executed, allowing you to copy and paste it in your address bar for quick access to whatever it is you are doing.

While there are many uses, I seem to only find good use of headers when I'm presented with any situation that requires me to click the same button over and over again. Such as healing, missions, attacking/punching, and spending skill points.

Let's kill the confusion and jump into what I'm talking about here.


Step 1.) Install Firebug For Firefox

Step 2.) Follow the steps in the following video for instructions on how to install Firebug, and how to use it to grab your headers:





That's about it as far as how to use Firebug, now let's break this header down to something you can actually understand.

Here is an example Mission header:

http://mob-dynamic-lb4.mobsters05.com/mob/do_job?user_id=1234567890&job_id=200002&session_id=aed3ba7a4c90858273793d4cd103b36b031791a1&auth_key=dd317f05163dh8f31edf078e8d70dafd3671b750&nocache=1286387807638

In this example, the header tells the mobsters a few different things: What it needs to do (do_job) , who is doing it (user_id), what job to do (job_id) and it needs the authorization code (auth_key).

The auth_key is myspace's way of telling Mobsters, that the user_id is the one that is authorized to do it, this prevents you from typing in anybody's user id into the header and start doing missions for them.

In all headers, the session_id and the nocache are not used at all.

Here is an example Punch header:

http://mob-dynamic-lb4.mobsters05.com/mob/attack?user_id=1234567890&target_id=0987654321&punch_in_face=true&session_id=50a694705478ec7579d0e765675b2ef1a6536c50&auth_key=c182dce647h52d27f938aedbf5dc68c4c4c167a0&nocache=1286388095255

In this example, the header tells the mobsters a few different things: What it needs to do (attack) , who is doing it (user_id), who to attack (target_id), what type of attack (punch_in_face) and it needs the authorization code again (auth_key).

Here is an example of purchasing property:

http://mob-dynamic-lb4.mobsters05.com/mob/buy_land?user_id=123456789&land_id=01&amount=10&session_id=aed3ba7a4c90858273793d4cd103b36b031791a1&auth_key=c182dce647d52d27f938aedbf5dc68c4c4c167a0&nocache=1286388722808

In this example, the header tells the mobsters: What it needs to do (buy_land) , who is doing it (user_id), which property to purchase (land_id), how many of these you are buying (amount) and it needs the authorization code again (auth_key).

Again, remember that the session_id and the nocache are NOT important, you can actually remove them from the code completely before executing it if you want.

One thing to keep in mind, YOUR AUTH_KEY WILL EXPIRE EVERY 24 HOURS SO DON'T BOOKMARK THESE FOR LONG TERM USE.

Now, the video shows you how to install an auto clicker to automatically refresh the browser for you, automating these scripts. That is one method of doing it. Another method would be to install an 'auto refresh' plugin like ReloadEvery, but the easiest method, is just go to SUMOB.COM and click on the header repeater link and follow their instructions.