Following the incident the defendant handed himself in to Masterton Police Station and made a statement about the offence.
The victim sustained a big red mark on his forehead but was otherwise uninjured.
In explanation Lange, who is unemployed, told police that he didn't know why he had shot at the victim.
He said it was really stupid and he was sorry and wanted to apologise to the complainant.
Judge Thomas Broadmore said he regarded the offence as quite serious given that the potential consequences for the victim could have been much worse.
Lange was fined $250, ordered to pay a further $250 for emotional harm reparation and directed to pay court costs of $132.89.
An order was made by the court for the air pistol to be destroyed.