Nebula-Developers / Moomoo-AI-Bot-Sender

A Moomoo Bot Sender with AI.
https://discord.gg/ZYND2Xd
GNU General Public License v3.0
10 stars 17 forks source link

Automatically buy and equip hats #18

Closed haykam821 closed 6 years ago

haykam821 commented 6 years ago

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:

The method handling this is tryHatOn, which takes a hat ID as its argument, and will return true if there are the same or more points than the cost of the hat according to hats.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 up getHatPriceJSON.js and hardcode hatInfo to the hat array as found in the Moomoo.io client's bundle.js, and then run it. The hats.json file will be overwritten to an array, with the index being the hat ID, and the value being the price (in points/gold).

haykam821 commented 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.