Cmds/Suggestions

Cmds/Suggestions

Postby creamchef » 04 Mar 2013, 22:01

This i kind of both cmd requests and suggestions.
/write (font) So you could write in different fonts? Idk if thats possible, but it would be cool if that was made.
/tempfly- A player could buy this, would last a few seconds, would be useful in zombie survival or maybe lava?
Btw some of these cmds might be kind of pointless.. but it would be cool to see new cmds add for a more customizable server.
Maybe more gamemode cmds.
/timer- simple timer cmd..
/teams add (color)
/teamspawn (color)
/join team
Players might be able to make a cool server or gamemodes with simple team commands.
These are just suggestions, hope there will be some new cmds in the next update, that would be awesome :DD
Owner of Infection Time![Zombie Survival]
creamchef
 
Posts: 60
Joined: 09 Jul 2012, 23:54

Re: Cmds/Suggestions

Postby ismellike » 05 Mar 2013, 01:06

The /team command already exists, use it with ctf.

I can do the rest so look for it in a few mins.

-edit: except for the /write [font] lol
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Cmds/Suggestions

Postby ismellike » 05 Mar 2013, 03:14

Ok so here is the tempfly, getting some iffy results with the timer cmd, trying to add some other things.

Code: Select all
using System;
using System.Threading;

namespace MCDzienny
{
    public class CmdTfly : Command
    {
        public override string name { get { return "tfly"; } }
        public override string shortcut { get { return "tf"; } }
        public override string type { get { return "mod"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
        public CmdTfly() { }

        public override void Use(Player p, string message)
        {
            try { Convert.ToInt32(message.Split(' ')[0]); }
            catch
            {
                Player.SendMessage(p, message.Split(' ')[0] + " is definantly not a number...");
                return;
            }
            int msg;
         msg = Convert.ToInt32(message.Split(' ')[0]);
            int time;
            time = msg * 1000;
            if (msg >= 50)
            {
                Player.SendMessage(p, "Why would you need to fly this long!??!");
                return;
            }
            if (p.money < msg)
            {
                Player.SendMessage(p, "You need " + msg.ToString() + " " + Server.moneys + " to tfly this long.");
            }
            else
            {
                p.money = p.money - msg;
                Player.GlobalMessage(p.color + p.name + " %eis temporarily flying for " + msg.ToString() + " seconds");
                Command.all.Find("fly").Use(p, "");
                Thread.Sleep(time);
                Command.all.Find("fly").Use(p, "");
                Player.SendMessage(p, "You now have " + p.money + " " + Server.moneys);
            }
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/tfly [time], fly to your money's desire.");
        }
    }
}
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Cmds/Suggestions

Postby creamchef » 05 Mar 2013, 03:35

Wow,i a appreciated it, you've been helping me a lot lately, thank you.
Owner of Infection Time![Zombie Survival]
creamchef
 
Posts: 60
Joined: 09 Jul 2012, 23:54

Re: Cmds/Suggestions

Postby creamchef » 05 Mar 2013, 04:31

creamchef wrote:Wow,i a appreciated it, you've been helping me a lot lately, thank you.

Also how would you change the amount of money it takes per second?
Owner of Infection Time![Zombie Survival]
creamchef
 
Posts: 60
Joined: 09 Jul 2012, 23:54

Re: Cmds/Suggestions

Postby ismellike » 05 Mar 2013, 05:42

Did you want to make it more or less, or how did you want to change it?
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Cmds/Suggestions

Postby creamchef » 05 Mar 2013, 12:13

A little bit more. Like maybe 2 or 3 per second
Owner of Infection Time![Zombie Survival]
creamchef
 
Posts: 60
Joined: 09 Jul 2012, 23:54

Re: Cmds/Suggestions

Postby ismellike » 06 Mar 2013, 00:24

Ok here it goes, just change the cps (cost per second) to what you want it to be....

Code: Select all
using System;
using System.Threading;

namespace MCDzienny
{
    public class CmdTfly : Command
    {
        public override string name { get { return "tfly"; } }
        public override string shortcut { get { return "tf"; } }
        public override string type { get { return "mod"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
        public CmdTfly() { }

        public override void Use(Player p, string message)
        {
            try { Convert.ToInt32(message.Split(' ')[0]); }
            catch
            {
                Player.SendMessage(p, message.Split(' ')[0] + " is definantly not a number...");
                return;
            }
            int msg;
         msg = Convert.ToInt32(message.Split(' ')[0]);
            int time;
         int cps;
           cps=msg*2;
          //Just change the 2, right now it is 2 moneyz per second.
            time = msg * 1000;
            if (msg >= 50)
            {
                Player.SendMessage(p, "Why would you need to fly this long!??!");
                return;
            }
            if (p.money < cps)
            {
                Player.SendMessage(p, "You need " + msg.ToString() + " " + Server.moneys + " to tfly this long.");
            }
            else
            {
                p.money = p.money - cps;
                Player.GlobalMessage(p.color + p.name + " %eis temporarily flying for " + msg.ToString() + " seconds");
                Command.all.Find("fly").Use(p, "");
                Thread.Sleep(time);
                Command.all.Find("fly").Use(p, "");
                Player.SendMessage(p, "You now have " + p.money + " " + Server.moneys);
            }
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/tfly [time], fly to your money's desire.");
        }
    }
}
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas


Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 5 guests

cron