Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. else if (message.StartsWith(".sbp"))
  2. {
  3. string[] buycmd = message.Split(' ');
  4. string filebuyprice = buycmd[1];
  5. Bot.SteamFriends.SendChatMessage(OtherSID, type, "Changed my buy price to " + filebuyprice);
  6. if (buycmd.Length > 1)
  7. {
  8. string json = File.ReadAllText("settings.json");
  9. dynamic jsonObj = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
  10. jsonObj["Bots"][0]["BuyPricePerKey"] = filebuyprice;
  11. string output = Newtonsoft.Json.JsonConvert.SerializeObject(jsonObj, Newtonsoft.Json.Formatting.Indented);
  12. File.WriteAllText("settings.json", output);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement