Thursday, 15 December 2011

I can haz my own script?

I want to do some coding, can you teach me?
Short Answer? No I can not, but i can help you get set up.

How?
Follow the white rabbit
wha???

Get Notepad++ i highly recommend it. Its free and works great!

After you have installed it and you want to have a look at someone elses code, firstly go and get it. You can view anyones source code, its rather easy to get especially from a bookmarklet, Take for example my drone bookmarklet 
"javascript:%28function%28%29%7Bvar%20a%3Ddocument.createElement%28%22script%22%29%3Ba.type%3D%22text%2Fjavascript%22%3Ba.src%3D%22http://www.creallaborate.com/guessx/mw/scripts/gxsdrone.js%3F%22%2BMath.random%28%29%3Bdocument.getElementsByTagName%28%22head%22%29%5B0%5D.appendChild%28a%29%7D%29%28%29%3B" 
you can see the part that starts with http:// and ends with .js.

All scripts will start with http and end with .js some can end with .txt, but for this i am going to use the drone location as an example http://www.creallaborate.com/guessx/mw/scripts/gxsdrone.js copy and paste that into your web browser it will display a page similar to this:
Copy and paste that into Notepad++ and save it as a .js extentsion

Why? because it turns a page from this

to this.

What did it just do?

It did syntax highlighting and makes it awhole lot easier to code and fix things.

For Mafiawars you dont really need to open with javascript:(function(){ and close with })() because MW already knows its javascript but i prefer too.

Commenting is always good because you can read the script writers notes which sometimes explain things, other times they comment bits of code out to try fix it when there is a code change. Heres a quick example:


if that is loaded into mafiawars it will give you two popups, first one saying "Hello Worlds" and then after you clicked ok, you'd then get "well done" When testing code or trying to fix it, adding an alert with a simple "return;" after it will firstly alert you when you get to that part of the code and then the "return;" will stop the code from continuing which is good because then you can update that part of code without it running thru everything else and going haywire.

When the browser is reading a scriipt it reads it from top to bottom.

most things get wrapped up into a function, and to read these pics you will need to click on them to make them bigger.

After making changes or writing a script you need to host it somewhere, Userscripts is a good site and allows you to do live editing etc If you sign up to there and upload a script you will notice your script gets a number in the address bar, you can use that number to use the userscript site as a temp host for your bookmarklet (http://userscripts.org/scripts/source/YOURNUMBERGOESHERE.user.js) With uploading scripts to userscripts.org you must include the following at the begining of your script: change the name and description.
With the actual part of making the bookmarklet you yourself have to figure out what the code is, but you can usually piggy back off the ingame code or other peoples code.

When i started out i was mainly modding other peoples code and hard coding in speed options that the script writers hadnt allowed. One of my bigger mods that was maybe known was Brawler Lite where i ended up removing sections of code from Aruns Brawler (Original author) and moving things around and adding my own tweak(s). Inwhich i probably learnt the most of coding from, i was lucky because i had a fully commented script so it explained what everything did. I later did minor updates on OGP (for new districts/cities) and linked those that asked me for it if Lefty hadnt updated his yet.

Its nice to link your modification of a script to its original author and let them know, if they like your idea they might take it on to there original with a credits to you link. Its also good to make it clear that your modification is a modification, so you dont confuse people and they get mad at the original author.

Most script writers are happy to hear your ideas on a script or code input on a current script, some will give you help on your own.

Most things are google-able i have learnt much from going thru other peoples scripts and googling some of there code and seeing examples of how it runs. An example was setTimeout(functionnamehere,5000); where 1000 = 1 second, so that bit of code would launch the function in 5 seconds.

Bit of a slack article but i hope it has shown you how to get a basic setup to improve your coding, im happy to try and help just ask.

Friday, 9 December 2011

Them Ebil Script0rs!


These are my most common questions on skype.

"Do i know of a script that does this or that?" Or "Can you adapt a script"


Todays article comes from teh letter S. (for sleep)

I use a script, she/he uses a script, that clan uses a script. Their cheating!

Are we cheating by using scripts? I'mma go with an extract from Zynga "There are good scripts and bad scripts, we shall not define either" - MW Live?? But Zynga's ToS 3rd party section doesn't play friendly towards scripts and states quite alot of things.

I agree with Zynga on the good/bad scripts, Most scripts automate everyday tasks that are so repeatative that without the scripts, people would of abandoned that task along time ago...
 
MWAP is probably the most well known autoplayer and has been around for along time (2.5-3years), it can pretty much play the game as an ordinary person and covers 99.9% of all activity, its had very good positive reviews over the years and they are just starting on there new venture rx6 which currently has a free 1 week trial and boasts about having the fastest fighting, which for people that have alot of stamina that is definitly a +1.

OGP & MWADDON are most likely tied an interesting second, both offer their unique services, David Cabrera who wrote and keeps MWADDON up to date is pretty good at keeping on top of Zynga changes and came into the script playing field last year. While Lefty Thumbbreaker manages OGP and is working on a new version of it and has been around for quite awhile infact so long i have no idea, (i suppose i could ask him with him been on my friends list and all).

Many hours have been put into the above scripts and many other scripts, all 3 scripts can be set to do as you wish, from completing jobs/citys to fighting and robbing mastery, they can also be used to "sit" on a player while you goto work or "have better things to do"

Are they evil? I cant say id consider them evil, their purpose built to do nearly every action in the game and if they dont, they usually take sugguestions on improvements/new options etc, However...yes if the user sets them up to do that action that makes another users play "not nice" which then brings us on to others scripts.

Other scripts do things their exactly purpose built for, like Chucker, started in nov-dec 2009 by Arun it was originally named chucker-a-crap it was written so you could select an inventory item and send it to other people, it sent thousands of gifts over the period of hours which saved you from doing that action over and over, this was before Zynga made multiple gifting but is still a preferred gift sending tool, its currently kept uptodate by Simony. Arun also wrote brawler (which i believe pre-dated Pfighter by Scruffy), Which was revolutionary and worked the fightlist over and over, when Arun finished up/disappeared, Spockholm stepped up and released Assassin-a-nator which now does brawlers job for you.


Spockholm has been around for along time aswell (mid 2009) and has written nearly a script for everything "theres a spocklets for that" and with 277,946 fans and growing there is no doubt that "Logical Awesome, my codes are perfect." is a excellent quote to describe his code.


Other other other scripts: These are scripts that aim to exploit bugs in the code, and usually only work for a few days depending on the bug. Some of these never seem to have an author or was done by one that didnt want to have their name traced back to, reason being is because they are exploiting and if it goes wrong accounts can be banned and then they get blamed.

A recent example is the butler exploit, which many seemed to of got a message about:

This was done by either fast clicking the collect button or having a script hit the collect button fast for you. BTW Zynga i never even got to ruby level so why did i get an email, pitty ya's didnt credit me 3 of them tho :(

"Warning! The code you are adding is not from a trusted source (no Spockholm Code) !!!\r\nMalicious code can do anything with your account, from reading your stats to sending your items. \r\nDo you really want to add that unknown script?"


Like everything else there are also scripts that are either written or modded (duuh) to steal your stats and compromise your security, they preform the actions of sending the information back to their server and doing whatever they do with it. One i mentioned earlier was written by Scruffy called Pfighter, it sent the info back to his database which was made public and you could search for users/clans and see the lowest points someone had that beat that user or you could see the highest skillpoints that someone had lost to them was. It worked rather well however people were needed to use the script and alot of people kinda freaked when they learnt about stat sending. Which inturn killed the most current information on people that were in the database. Other scripts like the ratpacks mod(sorry im not linking, but is google-able) of scripts send all info back to their server even the ratchucker, chucking + statstealing isnt required for nothing and is datamining IMO.

Awhile back Alex, from unlockedmw.com thought about putting a script libarary together to catalog all the scripts that are/were out in MW land, Not all scripts get shared around or get the exposure that some of them deserve, Recently i was linked to Lucifers scripts because the person was unsure of if to trust his scripts or not, i checked them all over and was quite happy to say they were safe (in the sense of no datamining) to use. I am also happy to look over scripts and say if there is anything in them to steal info from your account or not, i can also mod that part out if the script works better than other variations of it and host it. I am all for sharing another scriptors work as there are brillant minds out there that sometimes just need some encouragement to produce some great scripts.

So please share your scripts here as most popular news outlets for mafiawars players dont seem to advertise anyone else other than those that they think should be. You can anonymously comment here on a script you want checked or just linked too Or goto my facebook page, and leave a comment on the wall adding descriptions is always nice too and i will try with Alexs help to get a library up of all the scripts for MW old/new. Some scripts that have been left to gather dust as the original author has abandoned we are still keen to look at, some of them might even be fixed so let us know about them.

Kudos to those that figure out which clan the above shots are from, each is from different clans, just as big as each other and both have the stats behind them. From new to old players most use a script in one way or another some for good and some for bad. Are they cheating? or just been smart about possible future RSI?

Sunday, 4 December 2011

Bro! I haz a glitch 4 u!

Firstly: This is written in my opinion, if some info is incorrect please feel free to contribute the correct info so i can make changes. My spelling is not the best, nor is my puncuation or my recongisation of there, their and they're.

So...

This article is going to be referencing exploits, glitches, hacking, white hats & black hats. SRSLY?!

A great many things over the last little while prompted me to write this article, but mostly people. I am not a "hacker" this game had a massive userbase that spanned all over the world and had unique players that their everyday lives and tradeskill varied.

I want to point out a few definitions, to clear opinions on what some people think, I have to thank Paul who is in Zynga Security for this info he gave it to me about this time last year, he also gave me quite a number of good reference points that can be used in things outside of MW ;) that have been mighty useful.

A hacker is someone who likes to tinker with electronics or computer systems. Hackers like to explore and learn how computer systems work, finding ways to make them do what they do better, or do things they weren’t intended to do.

White Hat – These are considered the good guys. White hat hackers don’t use their skills for illegal purposes. They usually become Computer Security experts and help protect people from the Black Hats.


Black Hat – These are considered the bad guys. Black hat hackers usually use their skills maliciously for personal gain. They are the people that hack banks, steal credit cards, and deface websites.

Script kiddies – These are the wannabe hackers. They are looked down upon in the hacker community because they are the people that make hackers look bad. Script kiddies usually have no hacking skills and use the tools developed by other hackers without any knowledge of what’s happening behind the scenes.

Intermediate hackers – These people usually know about computers, networks, and have enough programming knowledge to understand relatively what a script might do, but like the script kiddies they use pre-developed well-known exploits (- a piece of code that takes advantage of a bug or vulnerability in a piece of software that allows you to take control of a computer system) to carry out attacks


Elite Hackers – These are the skilled hackers. They are the ones that write the many hacker tools and exploits out there. They can break into systems and hide their tracks or make it look like someone else did it.

//Referencing white hats & black hats is now over*

Now having read the above how many can you say that you came across that jepodised your facebook account? sure theres some people out there but not as many as you thought. Also one more reference point, also from Paul.

Glitch - The term derives from the German glitschig, meaning 'slippery'

A computer glitch is the failure of a system, usually containing a computing device, to complete its functions or to perform them properly. In public declarations, glitch is used to suggest a minor fault which will soon be rectified and is therefore a euphemism by comparison to bug, which is a factual statement that a programming fault is to blame for a system failure.

Glitch = Random f***up nearly impossible to repro

Bug - an actual programming fault

So to get one thing straight, when people say they have a glitch, they actually have a bug. (I also swear, that Paul probably banged his head thru a wall (or several) over the number of times he tried to hammer the above two references across, But Thank you Paul i really did appreciate the above knowledge.)

Exploit - when we exploit a bug for our own greed
Also i want to include this: My personal dealings with the staff & contractors at Zynga have been good, they are infact human and are everyday normal good people. The problem is a systematic failure of management starting at the very top, Inwhich i can also state that my own personal dealings with the boss dog "CEO Mark Pincus" has been exceptionally good aswell. (He was pretty dam prompt in rectifying the problem too) But yes there are issues that others face and that are also quick to write off the whole place based on their experience.

Mafiawars from day one has been full of bugs, some good and some well... not so good. Who to blame? You can't blame one person, because when programming something brandnew and for the first time of something you have never done, how do you the programmer know that you are wrong? I personally can say that, I am my own worst tester for scripts i write/mod, i dont have every user environment possible and everything always works for me, because i wrote it so i "technically know what its meant to be doing" however a user doesnt know so therefore can run the code unintentionally therefore finding the bugs. It was said that Mafiawars was a copy of Mobwars, In my opinion and from what most will say, it looks very similar, but hey there was also the courtcase where Zynga payed them out...

I asked some "die-hard players" if they could remember the first bugs they stumbled across/was told about at the time. They shared ones like "once the job is finished keep clicking it and you get skillpoints for every click" this was speedup by the fact that the very first job in NY used to have a xp ratio of 2.0, If you know anything about making a super ceral account you know that for a brandnew account with that kind of payout will keep you leveling for quite a bit, and all the time you are getting free skillpoints. Alot of accounts that were in the know, had an instance increase of stats overnight to around the 5-10k combined mark, others went alot higher. I can go on about many of the begining bugs, but i won't however over the time that the game was released up untill now i have to admit that the number of bugs Zynga has actively worked on has shown, i remember when i could find 5-10 a week, now i struggle to find one a fortnight/month. New features and events theres always a bug, even if its instant mastery they usually get fixed fast so not to spoil, But remember its brandnew code, so even Zynga dont know what to expect untill its released, However the infamous copy and paste events that all had the same problems & bugs shouldn't of had the same problems that they did!

Poor coding: Poor coding contributes to bugs, however since you have a team of coders, you cant expect them to know every single peice of code or remember all of it, let alone having new team members. The classice example of this was with the reintroduction of robbing, the old formula was that if you won, you got a percentage of the total number of properties that, that person owned, During this Zynga had a lot of server side corupted accounts, One persons energy account had a large number (100's of thousands) of one property, So runing off there old formula if you robbed that one property and won, you got a percentage of 100's of thousands of it, which gave a payout that got most people the money achievement, it was a bug, not an exploit.

Queing 3rd party scripters: These guys (girls?) have contributed to some bugs been able to be replicated with ease, They have also contributed pieces of code and bookmarklets that have improved most peoples play.
What are you looking at? The above was written by Team Spockholm, as you can see by the pic they processed quite a few mysterybags and were well rewarded, imagine how many accounts that it was ran on. (My figures showed over 400) It was rather simple to set up and the pay off was beyond worth it, (P.s can i haz me some 10,000 smoothies? or maybe 10,000 red angels?)

Other scripts were made, i even modded one that opened invisible bags from the crimespree which speed the mastery up there greatly.

Another well known script stayed secret for nearly a year, its known as the cloning glitch, it was discovered in november of 2009 by a 13 year old boy, who then sold loot to the traders who then distrubuted it/traded/sold whatever on, on a side note the boy made over $40k USD and i applaude him, if ya still around and reading this, well done. A month before this glitch was known people started noticing that others were reporting not all items had been sent, or the trader would notice the person said they had all items even when the trader hadnt finished sending, Battles were held over this with accusations flying left right and center. Turbo gifter a trader tool (script) was exaimed and tested over and over. Finally rewritten and the cloning script went nuts, between myself and a few friends we had over 2000 lotto sets, which at the time were not quite as rare as hens teeth but may as well of been, we traded them off to get the best current loot before the cloning stuff was well known and fixed.

Their hasnt been in my opinion any good scripts to do nearly as good as the cloning script or the mbag one, some of the bugs being exploited dont always need a script, however the scripts are easier than having to walk people thru everything manually.

One script writer was allegedly chased down by Zynga for releasing a script that used nothing to upgrade propertys in whichever city.

Scripters/Script modifyiers in general can release/mod a script to perform what they like aslong as it is within the bounds of the game, IMO they have improved alot of players greater game experience and saved many from pointless overclicking. I wouldn't advise running to them and asking about the latest exploit or can they write a script for you that would exploit a bug, because the majority will turn you down flat. Do they know every exploit? I'm going to say no, but they do see the code so probably can spot the bugs to exploit far easier than most people, Do they bother to exploit them? Well i'm sure we all have our own little fun from time to time ;) From Bobby Heartrate (whos scripts i first started using) right thru to Arch-Angel Nemesis, Vern, Esa, Joyka, Arun, Spockholm, UnlockedMW & PS-MWAP i'd like to thank ya's all.

Got health?
I heard about there been a health glitch out awhile ago, but could never figure it, it dates back along time tho. How did someone gain this much? Upon being asked the person laughed and said "why would i pay for that much health, its just silly" the above person sent me the pic (thru others to remain hidden) for this blogpost they were only discovered when someone took them into a NY boss fight(and saw that persons health). I was reminded about this a few weeks back and tried unsuccesfully to find the bug. I found info about it purely by chance after i saw it posted somewhere (which was quickly deleted might i add). The method was simple and for a total of 65rps you could double your current health everytime permanently. Zynga have since patched this and stated that the big whales were rolled and were given a ingame msg. However as with all Zynga rollbacks (clawbacks) they overlooked some people.

Hacking: Knowing some of the backgrounds of the guys in the security team that stake out the Zynga servers with an iron fist. My advice is, if you tamper with things your not meant too, your bound to be caught, these are the guys that don't code MW, their jobs are security! and thats what their good at.

Overlookings: In the begining there werent any rollbacks, untill shivs bug. But it wasnt really mentioned or talked about anywhere. Many exploits that had a huge effect Zynga will get out the rollingpin and roll it backwards, They miss alot of people, and people started noticing this with the baht glitch. Zynga have players divided up into "grouplings" its what the players refer to as servers, Zynga states they only release to a percentage of people and never to one groupling, When Zynga is releasing a new feature (not event) its usually for a test run before releasing to everyone, just incase it has a serious bug in it. Some of the grouplings do get missed and have different code that is outdated, some people still have minipacks!!! others got stuck on permanent whitescreens for one period. IMO it would be nice if Zynga regrouped all the players again so we all had the same updated code, and new fight/hitlist people. Different grouplings, Different code. Some people can exploit certain bugs that you can't because their code is different due to them being in a different groupling.

Also it is well known, that some staff at Zynga do "miss" somethings. One person was credited with over 600,000 skillpoints of which they made themselves welknown by. Others later preyed on customer support and use it well to their advantage, One CS person pumped an account from having only 6000 of stamina to a new permanent total of 22,000 stamina, Others use CS for unreleased loot items and of course how can i not forget Reward Points.

Bitching: With the slower finding of bugs to exploit, people are getting a wiff of one from "a friend" or see someone "hint" at one written somewhere and are doing their best to find it so they too can benefit from it. Its getting to the point that people are posting "Theres a bug here, that does this! but i can't figure it out!! HELP!" I talk to Zynga, its a known fact. If i deem the exploit too great and over beneficial for the general playerbase i have no problem with reporting it, No i didn't pass the health one over, but yes i was going to. If it is a security issue i will without a question hand it straight over, A simple bug to exploit and have fun with is just that FUN, Messing with people and stealing credit card info etc is theft and is not funny or "cool" in anyform.

If you have a bug that is being exploited and you think its unfair, you can goto the Offical Zynga forums and either PM a Supermod, or post it in their bugs section. Zynga do fix things if they have enough info, sadly they dont have a crystal ball that tell thems the answer to "people are gaining 1000's of skillpoints from levelups" or "the slot machine is giving out free RP's" the info they need is "This is the bug that is getting exploited, and these are the steps on how to exploit it, and if you do it correctly you will get free skillpoints and RP"

Mafiawars has been well documented in nearly all shapes and forms, You can find info out about most things by searching, the most recent article i could find relating to this was posted here http://unlockedmw.com/2011/09/mafia-wars-cheats/

Thursday, 1 December 2011

"Our Little Monkey Friend"

Recently alot of people are noticing and commenting that they are having issues with their scripts not working, on further investigation, it was found that it was actually a conflict between an already running script and the another script they had tried to load.

Usually when a script is written it is written not to run in conjunction with any other scripts that are already running, so once you introduce a new script there will be issues.

This year for scripts they (the authors) have taken a massive leap forward in terms of coding, with an end result of the unframing of Mafiawars not really needed to run the majority of them. But with this happening and all of them offering a simple import script option, these are the scripts that are conflicting with them. Not all scripts conflict! some get on quite nicely, however some scripts remove elements (Code) that other scripts depend on, if the script cannot find the element that another has removed, it causes a conflict and either stops!!! or doesnt work how the script is intended.

MW Addon  (found here)
Spockholms  (found here)
UnlockedMW   (found here)

With the scripts that offer a script import service, All of these need Grease Monkey to be able to load the script.


What is Grease Monkey. Grease Monkey (or GM as its known for short) is a Mozilla Firefox extension that allows users to install scripts that make on-the-fly changes to HTML web page content on the DOMContentLoaded event, which happens immediately after it is loaded in the browser, when Greasemonkey scripts are persistent, the changes made to the web pages are executed every time the page is opened, making them effectively permanent for the user running the script (Unless disabled).

Greasemonkey can be used for adding new functions to web pages (for example, Loading any of the above 3 scripts), fixing rendering bugs, combining data from multiple webpages, and numerous other purposes (Source). There are also a few different variations of Greasemonkey but essentially they all do the same thing.

I use Firefox 5 (not 6,7,8 or whichever version they want to release every other week) I'm going to assume that you already have GM installed. If so you should notice the little monkey face somewhere on your browser (and i say somewhere because every version seems to put it somewhere else)

How to tell you have it enabled is by seeing it in a nonfaded detail compared to a faded pic
Enabled

Disabled

If you click on it, it will enable/disable it. If you click on the arrow by the side of it it will give you the next lot of options.

If you click on "Manage User Scripts..." you get the next screen

I highlighted the scripts in a red box, and their options on the right in a yellow box, Here you have control of which one or more you want running at the same time. The options are exactly what they say, but right now we are only interested in "Disable/Enable & Remove" you can see i have 3 scripts disabled and only one enabled, when you change these options any page with the script loaded on it will require a refresh for the option to take effect. If you find yourself no longer using one and want to delete it, then simply click remove.

If you are having issues with one of these scripts simply disable it, and refresh the tab, sometimes scripts cause issues because Zynga changes code and the scripts need to be manually updated to reflect the changes and the authors dont always have spare time to do so straight away