[Request] /makeout

[Request] /makeout

Postby M_____S » 05 Dec 2012, 06:23

Self-Explanatory.

Makeout with another user;

/makeout <playername>

Or with everybody

/makeout frenzy

I hope you can complete this request, as most of my server members want something like this :D


~M_____S
M_____S
 
Posts: 5
Joined: 24 Oct 2012, 16:49

Re: [Request] /makeout

Postby ismellike » 06 Dec 2012, 03:30

hah I got a makeout command, but its not exactly /makeout frenzy like that

Code: Select all
using System;

namespace MCDzienny
{
   public class CmdMakeout : Command
   {
     
      public override string name { get { return "makeout"; } }

      public override string shortcut { get { return "mo"; } }

      public override string type { get { return "other"; } }
   
      public override bool museumUsable { get { return false; } }

      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public CmdMakeout() { }     
   
public override void Use(Player p, string message)
        {
            Player who = Player.Find(message);

            if (who == null) Player.GlobalMessage(p.prefix + p.color + p.name + ": %fIm making out with myself ._. anyone join?");
            else
      Player.GlobalMessage(who.color + who.name + " %eIs making out with"+ " " +p.color+ p.prefix + p.color + p.name);
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/makeout: Makeout with yourself");
       Player.SendMessage(p, "/makeout [name]: Makeout with others");
        }
    }
}
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: [Request] /makeout

Postby M_____S » 18 Jan 2013, 22:26

ismellike wrote:hah I got a makeout command, but its not exactly /makeout frenzy like that

Code: Select all
using System;

namespace MCDzienny
{
   public class CmdMakeout : Command
   {
     
      public override string name { get { return "makeout"; } }

      public override string shortcut { get { return "mo"; } }

      public override string type { get { return "other"; } }
   
      public override bool museumUsable { get { return false; } }

      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public CmdMakeout() { }     
   
public override void Use(Player p, string message)
        {
            Player who = Player.Find(message);

            if (who == null) Player.GlobalMessage(p.prefix + p.color + p.name + ": %fIm making out with myself ._. anyone join?");
            else
      Player.GlobalMessage(who.color + who.name + " %eIs making out with"+ " " +p.color+ p.prefix + p.color + p.name);
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/makeout: Makeout with yourself");
       Player.SendMessage(p, "/makeout [name]: Makeout with others");
        }
    }
}


Or that works too. Thanks ismellike! :D
M_____S
 
Posts: 5
Joined: 24 Oct 2012, 16:49

Re: [Request] /makeout

Postby Conor » 18 Jan 2013, 23:59

M_____S wrote:
ismellike wrote:hah I got a makeout command, but its not exactly /makeout frenzy like that

Code: Select all
using System;

namespace MCDzienny
{
   public class CmdMakeout : Command
   {
     
      public override string name { get { return "makeout"; } }

      public override string shortcut { get { return "mo"; } }

      public override string type { get { return "other"; } }
   
      public override bool museumUsable { get { return false; } }

      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public CmdMakeout() { }     
   
public override void Use(Player p, string message)
        {
            Player who = Player.Find(message);

            if (who == null) Player.GlobalMessage(p.prefix + p.color + p.name + ": %fIm making out with myself ._. anyone join?");
            else
      Player.GlobalMessage(who.color + who.name + " %eIs making out with"+ " " +p.color+ p.prefix + p.color + p.name);
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/makeout: Makeout with yourself");
       Player.SendMessage(p, "/makeout [name]: Makeout with others");
        }
    }
}


Or that works too. Thanks ismellike! :D


Just a little tip, if you want to avoid hidden players being found out, you will want the command to act as if the player is offline.

So you can change the below code from (1) to (2) to make this work for you.

(1)
Code: Select all
if (who == null)


(2)
Code: Select all
if (who == null || who.hidden)
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor


Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 2 guests

cron