Created
May 2, 2011 18:48
-
-
Save vbfox/952123 to your computer and use it in GitHub Desktop.
Simple LINQPad script to spawn blocks in Minecraft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This LINQPad script is usin the "C# Statement(s)" mode | |
// It requires a reference to System.Windows.Forms.dll | |
// and an import of the System.Windows.Forms namespace | |
// | |
// To use it click Execute, switch to minecraft and wait 5s. | |
var item = 20; | |
var user = "vbfox"; | |
var stacks = 54; | |
var itemsPerStack = 64; | |
var chatKey = "{ENTER}"; | |
Thread.Sleep(5*1000); | |
for(int i = 0; i < stacks; i++) | |
{ | |
SendKeys.SendWait(chatKey); | |
Thread.Sleep(50); | |
SendKeys.SendWait(string.Format("/give {0} {1} {2}", user, item, itemsPerStack)); | |
Thread.Sleep(10); | |
SendKeys.SendWait("{ENTER}"); | |
Thread.Sleep(50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment