Closed haykam821 closed 6 years ago
Recent comments on this PR by @Mega-Mewthree made me change hats.json
to data.json
. The structure is slightly different and the array that got replaced when you ran the hat price generator is now a pair in that JSON file (hatPrices
). Hat aliases are also located, and named hatAliases
.
In order to use automatic hats, just set the
--hat
argument to a hat ID. These hats will be bought and equipped when the following conditions are met:spawn
method.9
, or the resource obtainment packet.The method handling this is
tryHatOn
, which takes a hat ID as its argument, and will returntrue
if there are the same or more points than the cost of the hat according tohats.json
.In order to set a hat on a bot, use the
!hat
comment, with the first argument being the hat ID again.In order to create/update
hats.json
, you must simply open upgetHatPriceJSON.js
and hardcodehatInfo
to the hat array as found in the Moomoo.io client'sbundle.js
, and then run it. Thehats.json
file will be overwritten to an array, with the index being the hat ID, and the value being the price (in points/gold).