-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.3.2.0 /push, /fasthouse, and opdoor
- Loading branch information
ballock1
committed
Apr 1, 2012
1 parent
236c944
commit e83bdf6
Showing
7 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System; | ||
using System.IO; | ||
using System.Net; | ||
using MCDek; | ||
|
||
|
||
namespace MCLawl | ||
{ | ||
public class CmdFastHouse : Command | ||
{ | ||
public override string name { get { return "fasthouse"; } } | ||
public override string shortcut { get { return "fh"; } } | ||
public override string type { get { return "other"; } } | ||
public override bool museumUsable { get { return false; } } | ||
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } } | ||
public override void Use(Player p, string message) | ||
{ | ||
if (p == null) { Player.SendMessage(p, "This command can only be used in-game!"); return; } | ||
if (!Directory.Exists("extra/copy")) | ||
Directory.CreateDirectory("extra/copy"); | ||
|
||
if (!File.Exists("extra/copy/house.copy")) | ||
{ | ||
Player.SendMessage(p, "FastHouse copy doesn't exist. Downloading..."); | ||
try | ||
{ | ||
using (WebClient WEB = new WebClient()) | ||
WEB.DownloadFile("http://dekemaserv.com/house.copy", "extra/copy/house.copy"); | ||
} | ||
catch | ||
{ | ||
Player.SendMessage(p, "Sorry, downloading failed. Please try again later."); | ||
return; | ||
} | ||
} | ||
Command.all.Find("retrieve").Use(p, "fasthouse"); | ||
Command.all.Find("paste").Use(p, ""); | ||
ushort[] loc = p.getLoc(false); | ||
Command.all.Find("click").Use(p, loc[0] + " " + loc[1] + " " + loc[2]); | ||
} | ||
public override void Help(Player p) | ||
{ | ||
Player.SendMessage(p, "/fasthouse - places a premade house at your location!"); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//Copyright 2012 MCDek-DekemaServ, Created by ballock1; | ||
|
||
using System; | ||
using MCDek; | ||
|
||
|
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 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