/*
Auto-generated command skeleton class.
Use this as a basis for custom commands implemented via the MCDzienny scripting framework.
File and class should be named a specific way. For example, /update is named 'CmdUpdate.cs' for the file, and 'CmdUpdate' for the class.
*/
// Add any other using statements you need up here, of course.
please note: i have had a copy and pasting issue where it reads the description as a part of the code and it messes it up. you might have to manually enter it in.
hope this helps!
// As a note, MCDzienny is designed for .NET 3.5.
using System;
namespace MCDzienny
{
public class CmdObjective : Command
{
// The command's name, in all lowercase. What you'll be putting behind the slash when using it.
public override string name { get { return "objective"; } }
// Command's shortcut (please take care not to use an existing one, or you may have issues.
public override string shortcut { get { return "obj"; } }
// Determines which submenu the command displays in under /help.
public override string type { get { return "other"; } }
// Determines whether or not this command can be used in a museum. Block/map altering commands should be made false to avoid errors.
public override bool museumUsable { get { return false; } }
// Determines the command's default rank. Valid values are:
// LevelPermission.Nobody, LevelPermission.Banned, LevelPermission.Guest
// LevelPermission.Builder, LevelPermission.AdvBuilder, LevelPermission.Operator, LevelPermission.Admin
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
// This is where the magic happens, naturally.
// p is the player object for the player executing the command. message is everything after the command invocation itself.
public override void Use(Player p, string message)
{
Player.SendMessage(p, "In order to survive you have to build a shelter within the time limit to survive the lava wave. You are given 3 lives at the start of each round. If you come into contact with the lava, then you lose 1 life and spawn at the starting point. If you lose all 3 of your lives, then you become a ghost. Ghosts cannot edit any blocks and appear headless. If you survive the lava wave, then you are rewarded with coins. Coins can buy you stuff that can aid your survival. You can even buy ranks! Type &d/store &efor more information. By surviving you also earn XP. XP is earned by the amount of air around you at the end of each round. By earning XP, you level up. By leveling up, up get grief protection (lower ranks can't edit your blocks). Lava can also melt through blocks, so be careful!");
}
// This one controls what happens when you use /help [commandname].
public override void Help(Player p)
{
Player.SendMessage(p, "/objective - Explains how the game works.");
}
}
}
Users browsing this forum: No registered users and 4 guests