Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit 528ec1c

Browse files
author
nickthegamer5
committed
Added !reset command
1 parent 2b5e926 commit 528ec1c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Command | Action
2424
`!setup` | Used to setup/reset a game
2525
`!shutdown` | Used to shutdown the bot (Admin only)
2626
`!help` | Display commands
27+
`!reset` | Reset the game
2728

2829
### Features
2930
- Auto login (Currently unsecure, mostly just for testing)

SteamBattleBot/SteamFunctions.cs

+13
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,19 @@ void OnChatMessage(SteamFriends.FriendMsgCallback callBack)
259259
break;
260260
#endregion
261261

262+
#region !reset
263+
case "!reset":
264+
steamFriends.SendChatMessage(callBack.Sender, EChatEntryType.ChatMsg, "Resetting stats back to 100...");
265+
foreach (Structures.PlayerStructure player in players) // Loop the list
266+
{
267+
if (player.id == callBack.Sender.AccountID)
268+
{
269+
player.setupGame();
270+
}
271+
}
272+
break;
273+
#endregion
274+
262275
#region !help
263276
case "!help":
264277
Console.WriteLine("!help command revied. User: {0}", steamFriends.GetFriendPersonaName(callBack.Sender));

0 commit comments

Comments
 (0)