Exemplo n.º 1
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     Main.NewText("Opened a link to the map! From there, click the 'Download' button.", Color.Green);
     Process.Start("http://www.mediafire.com/file/yzdqeips85ppk1a/Slender_The_8_Pages.twld/file");
     Process.Start("http://www.mediafire.com/file/1hq8vc6h55hsqjw/Slender_The_8_Pages.twld.bak/file");
     Process.Start("http://www.mediafire.com/file/y98ss4cb2vgk4vj/Slender_The_8_Pages.wld/file");
 }
Exemplo n.º 2
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     if (TerramonPlayer.starterNotChosen)
     {
         if (args.Length == 0)
         {
             caller.Reply("Ready to pick your Starter Pokémon? There are three options to choose from; [c/33FF33:Bulbasaur,] [c/00FFFF:Squirtle,] and [c/FF8C00:Charmander.]");
             caller.Reply("[c/C0C0C0:/choose (bulbasaur | squirtle | charmander)]");
             return;
         }
         if (args[0].ToLower() == "bulbasaur")
         {
             Main.NewText("You chose [c/33FF33:Bulbasaur, the Seed Pokémon.] Great choice!");
             TerramonPlayer.starterNotChosen = false;
             Item.NewItem(Main.LocalPlayer.getRect(), mod.ItemType("BulbasaurBall"));
         }
         if (args[0].ToLower() == "squirtle")
         {
             Main.NewText("You chose [c/00FFFF:Squirtle, the Tiny Turtle Pokémon.] Great choice!");
             TerramonPlayer.starterNotChosen = false;
         }
         if (args[0].ToLower() == "charmander")
         {
             Main.NewText("You chose [c/FF8C00:Charmander, the Fire Lizard Pokémon.] Great choice!");
             TerramonPlayer.starterNotChosen = false;
         }
     }
     else
     {
         Main.NewText("[c/FFA500:You've already chosen your Starter Pokémon!]");
     }
 }
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            var mod  = ModLoader.GetMod(args[0]);
            var type = mod == null ? 0 : mod.NPCType(args[1]);

            caller.Reply(type.ToString(), Color.Yellow);
        }
Exemplo n.º 4
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (args.Length < 2 || args.Length > 2)
            {
                caller.Reply("Usage: " + Usage, new Color(255, 0, 0));
                return;
            }
            float n0;
            bool  i0 = float.TryParse(args[0], out n0);
            float n1;
            bool  i1 = float.TryParse(args[1], out n1);

            if (i0 && i1)
            {
                caller.Reply(n0 + " - " + n1 + " = " + (n0 - n1));
            }
            else
            {
                if (i0)
                {
                    caller.Reply("'" + args[0] + "' needs to be a number.", new Color(255, 0, 0));
                    return;
                }
                if (i1)
                {
                    caller.Reply("'" + args[1] + "' needs to be a number.", new Color(255, 0, 0));
                    return;
                }
                caller.Reply("'" + args[0] + "' and '" + args[1] + "' need to be numbers.", new Color(255, 0, 0));
                return;
            }
        }
Exemplo n.º 5
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            double fullTime = Main.time;

            if (!Main.dayTime)
            {
                fullTime += 54000.0;
            }

            fullTime += int.Parse(args[0]);
            fullTime %= 86400.0;
            if (fullTime < 0)
            {
                fullTime += 86400;
            }

            Main.dayTime = fullTime < 54000;
            Main.time    = fullTime;
            if (!Main.dayTime)
            {
                Main.time -= 54000;
            }

            if (Main.netMode == NetmodeID.Server)
            {
                NetMessage.SendData(MessageID.WorldData);
            }
        }
Exemplo n.º 6
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     for (int i = 0; i < 9; i++)
     {
         Main.NewText(" ");
     }
 }
Exemplo n.º 7
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     if (args.Length > 0)
     {
         string name = string.Join(" ", args);
         if (name == "expert")
         {
             Main.expertMode = true;
             Main.NewText("SUCCESS: Expert Mode is now enabled!");
         }
         else if (name == "normal")
         {
             Main.expertMode = false;
             Main.NewText("SUCCESS: Expert Mode is now disabled!");
         }
         else
         {
             Main.NewText("ERROR: You need to use either normal or expert for the command arguments!");
         }
     }
     else
     {
         Main.NewText("ERROR: You have not specified a game mode!");
     }
 }
Exemplo n.º 8
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            PlayerDeathReason damageSource;

            damageSource = PlayerDeathReason.ByCustomReason(caller.Player.name + " went suicidal.");
            caller.Player.KillMe(damageSource, 9999, 0);
        }
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (args.Length == 0)
            {
                // TODO Open console
                return;
            }

            List <string> parsedArgs = input.ParseLine();

            parsedArgs.RemoveAt(0);

            string commandName = parsedArgs[0];

            parsedArgs.RemoveAt(0);

            if (!CommandLoader.Instance.Exists(commandName))
            {
                Main.NewText($"Command '{commandName}' not found. Use /help for a list of available commands.");
                return;
            }

            Command command = CommandLoader.Instance.New(commandName);

            MOPlayer moPlayer = caller.Player.GetModPlayer <MOPlayer>();

            if (!command.CanUse(moPlayer))
            {
                return;
            }

            command.Run(moPlayer, commandName, input, parsedArgs);
        }
Exemplo n.º 10
0
        protected override void ActionLocal(CommandCaller caller, Player player, string input, string[] args)
        {
            if (TBAMultiplayerConfig.EnableDebugCommands)
            {
                TBAPlayer tPlayer = TBAPlayer.Get(caller.Player);

                if (input.Contains("DayOrk"))
                {
                    tPlayer.Stand = StandLoader.Instance.FindGeneric(x => x is SREKTStand);
                    Main.NewText("What the~");
                    return;
                }

                if (StandLoader.Instance.FindGeneric(x => input.Contains(x.StandName.ToString()) && x.CanAcquire(TBAPlayer.Get(caller.Player))) != null)
                {
                    tPlayer.Stand = StandLoader.Instance.FindGeneric(x => input.Contains(x.StandName.ToString()));
                }
                else
                {
                    Main.NewText("Incorrect stand name, please use /listStands to see their names");
                }
            }
            else
            {
                DisabledDebugCommands();
            }
        }
Exemplo n.º 11
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            var  player  = caller.Player;
            bool anyKeys = false;

            for (int i = 0; i < player.inventory.Length; i++)
            {
                if (keys.Contains(player.inventory[i].type))
                {
                    while (player.inventory[i].stack != 0)
                    {
                        player.inventory[i].stack--;
                        player.QuickSpawnItem(GetKeyItem(player.inventory[i].type));
                    }
                    player.inventory[i] = new Item();
                    anyKeys             = true;
                }
            }
            if (!anyKeys)
            {
                Main.NewText("No key in your inventory!", 255, 255, 0);
            }
            else
            {
                Main.NewText("Exchange weapons succeed!", 40, 255, 40);
            }
        }
Exemplo n.º 12
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            /*int player;
             * for (player = 0; player < 255; player++) {
             *      mod.Logger.Info(player);
             *      if (Main.player[player].active && Main.player[player].name == args[0]) {
             *              break;
             *      }
             * }
             * if (player == 255) {
             *      throw new UsageException("Could not find player: " + args[0]);
             * }//*/

            mod.Logger.Info("Displayed Buff Info");
            //var modPlayer = Main.player[player].GetModPlayer<MyPlayer>();
            Player   player    = Main.player[Main.myPlayer];
            MyPlayer modPlayer = player.GetModPlayer <MyPlayer>();

            /*string bAtk = modPlayer.boostAttack.ToString();
             * string bDef = modPlayer.boostDefense.ToString();
             * caller.Reply("Pokemmon Buffs: +" + bAtk + "x Atk / +" + bDef + "x Def");//*/

            /*string s = "";
             * if(modPlayer.attackList.Count <= 0)
             * {
             *      for(var i=0; i<modPlayer.attackList.Count ; i++)
             *      {
             *              s += modPlayer.attackList.get(i).ToString() +", ";
             *      }
             * }
             * else
             *      s = "No Current Buffs";
             * caller.Reply(s);//*/
            return;
        }
Exemplo n.º 13
0
        // based on jopojelly's Cheat Sheet
        public override CommandReply Action(CommandCaller caller, string[] args)
        {
            string killType = (args.Length > 0 ? args[0] : "");
            int    killed   = 0;

            for (int i = 0; i < Main.npc.Length; i++)
            {
                NPC npc = Main.npc[i];

                if (CommandUtils.IsValidNPC(npc))
                {
                    if (killType.Equals("friendly") && !CommandUtils.IsFriendlyNPC(npc))
                    {
                        continue;
                    }
                    if (killType.Equals("hostile") && CommandUtils.IsFriendlyNPC(npc))
                    {
                        continue;
                    }

                    npc.StrikeNPCNoInteraction(npc.lifeMax, 0, -npc.direction, crit: true);
                    NetMessage.SendData(MessageID.StrikeNPC, -1, -1, null, i, npc.lifeMax, 0f, -npc.direction, 1);
                    killed++;
                }
            }

            return(new CommandReply(caller.Player.name + " killed " + killed + " NPCs!"));
        }
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            string fileName = args[0].Trim();

            if (fileName.Length == 0)
            {
                return;
            }
            Vector2[] bounds = EnvironmentDevTool.corners;

            if (bounds[0].X < bounds[1].X && bounds[0].Y < bounds[1].Y)
            {
                Rectangle area = new Rectangle((int)bounds[0].X, (int)bounds[0].Y, (int)(bounds[1].X - bounds[0].X), (int)(bounds[1].Y - bounds[0].Y));
                for (int i = area.X; i <= area.X + area.Width; i++)
                {
                    for (int j = area.Y; j <= area.Y + area.Height; j++)
                    {
                        Tile t = Framing.GetTileSafely(i, j);
                    }
                }
            }
            else
            {
            }
        }
Exemplo n.º 15
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     if (args.Length == 0)
     {
         ModContent.GetInstance <BossExpertise>().SetExpertMode(!Main.expertMode);
     }
     else if (args.Length == 1)
     {
         if (args[0].Equals("true", StringComparison.OrdinalIgnoreCase))
         {
             ModContent.GetInstance <BossExpertise>().SetExpertMode(true);
         }
         else if (args[0].Equals("false", StringComparison.OrdinalIgnoreCase))
         {
             ModContent.GetInstance <BossExpertise>().SetExpertMode(false);
         }
         else
         {
             Main.NewText(Language.GetTextValue("Mods.BossExpertise.ExpertCommandUsage"));
         }
     }
     else
     {
         Main.NewText(Language.GetTextValue("Mods.BossExpertise.ExpertCommandUsage"));
     }
 }
Exemplo n.º 16
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     foreach (Stand st in StandLoader.Instance.Stands)
     {
         Main.NewText(st.StandName);
     }
 }
Exemplo n.º 17
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            Mod                myMod    = ModLoader.GetMod("VipixToolBox");
            Player             player   = Main.player[Main.myPlayer];
            VipixToolBoxPlayer myPlayer = player.GetModPlayer <VipixToolBoxPlayer>(myMod);

            /*
             * bool choice;
             * if (!bool.TryParse(args[0], out choice))
             *      throw new UsageException(args[0] + " is not a valid value\ncenterUI accepts <true|false>");
             * else	myPlayer.centerUI = choice;*/
            if (args[0] == "fixed")
            {
                myPlayer.centerUI = 0;
            }
            else if (args[0] == "mouse")
            {
                myPlayer.centerUI = 1;
            }
            else if (args[0] == "free")
            {
                myPlayer.centerUI = 2;
            }
            else
            {
                throw new UsageException(args[0] + " is not a valid value\ncenterUI accepts <fixed|mouse|free>");
            }
        }
Exemplo n.º 18
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            Vector2 pos = Main.playerDrawData[Main.myPlayer].position;

            Main.NewText(pos);
            //ModContent.GetInstance<StarSailorMod>().speechBubbles.Add(new SpeechBubble("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", (int)pos.X, (int)pos.Y - 250, 700, 300));
        }
Exemplo n.º 19
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            OriPlayer oPlayer = caller.Player.GetModPlayer <OriPlayer>();

            oPlayer.debugMode ^= true;
            Main.NewText("Toggled debug mode to " + oPlayer.debugMode);
        }
Exemplo n.º 20
0
        public override CommandReply Action(CommandCaller caller, string[] args)
        {
            int npcType = 0;
            int amount  = 0;

            if (!int.TryParse(args[0], out npcType))
            {
                npcType = CommandUtils.GetNPCType(args[0]);
            }

            if (!CommandUtils.IsValidNPC(npcType))
            {
                throw new UsageException($"Invalid NPC type: {npcType}");
            }

            for (int i = 0; i < Main.npc.Length; i++)
            {
                NPC npc = Main.npc[i];

                if (CommandUtils.IsValidNPC(npc) && (npc.type == npcType || npc.TypeName.Equals(args[0])))
                {
                    npc.StrikeNPCNoInteraction(npc.lifeMax, 0, -npc.direction, crit: true);
                    NetMessage.SendData(MessageID.StrikeNPC, -1, -1, null, i, npc.lifeMax, 0f, -npc.direction, 1);
                    amount++;
                }
            }

            return(new CommandReply($"{caller.Player.name} killed {amount} NPC{(amount == 1 ? "" : "s")}!"));
        }
Exemplo n.º 21
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            int items       = 0;
            int npcs        = 0;
            int tiles       = 0;
            int walls       = 0;
            int buffs       = 0;
            int mounts      = 0;
            int projectiles = 0;
            int commands    = 0;

            typeof(ModNPC).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModNPC))).Select(t => npcs++);
            typeof(ModItem).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModItem))).Select(t => items++);
            typeof(ModTile).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModTile))).Select(t => tiles++);
            typeof(ModWall).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModWall))).Select(t => walls++);
            typeof(ModBuff).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModBuff))).Select(t => buffs++);
            typeof(ModMountData).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModMountData))).Select(t => mounts++);
            typeof(ModProjectile).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModProjectile))).Select(t => projectiles++);
            typeof(ModCommand).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(ModCommand))).Select(t => commands++);

            Main.NewText(items);
            Main.NewText(npcs);
            Main.NewText(tiles);
            Main.NewText(walls);
            Main.NewText(buffs);
            Main.NewText(mounts);
            Main.NewText(projectiles);
            Main.NewText(commands);
        }
Exemplo n.º 22
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            int tlx = int.Parse(args[0]);
            int tly = int.Parse(args[1]);
            int brx = int.Parse(args[2]);
            int bry = int.Parse(args[3]);

            for (int i = tlx; i <= brx; i++)
            {
                for (int j = tly; j <= bry; j++)
                {
                    if (Framing.GetTileSafely(i, j).type == TileID.Titanium)
                    {
                        List <Vector2> positions = new List <Vector2>();
                        SpreadPlacer(i, j, i, j, ModContent.TileType <AsteroidRock>(), positions);
                        Vector2 sum = Vector2.Zero;
                        foreach (Vector2 v in positions)
                        {
                            sum += v;
                        }
                        sum /= positions.Count;
                        PlaceGravSource((int)Math.Round(sum.X), (int)Math.Round(sum.Y));
                    }
                }
            }
        }
Exemplo n.º 23
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (args[1] != "239")
            {
                throw new UsageException("Incorrect pass", Color.Red);
            }

            StandoPlayer pl    = caller.Player.GetModPlayer <StandoPlayer>();
            int          Level = int.Parse(args[0]);

            if (Level < 1)
            {
                Level = 1;
            }
            else if (Level > 100)
            {
                Level = 100;
            }

            pl.StandXP         = 0;
            pl.StandLevel      = Level;
            pl.StandNeedToUpXP = (int)(Math.Pow(pl.StandLevel, 1.4) * 3000); // New xp to level up
            CombatText.NewText(new Rectangle((int)pl.player.position.X, (int)pl.player.position.Y, pl.player.width, pl.player.height), Color.Aquamarine, "New LVL!", true, false);
            int proj = Projectile.NewProjectile(Main.player[Main.myPlayer].Center, new Vector2(0, -8f), ProjectileID.RocketFireworksBoxYellow, 0, 0f);

            Main.projectile[proj].timeLeft = 30;
        }
Exemplo n.º 24
0
 public override void Action(CommandCaller caller, string input, string[] args)
 {
     if (NetData.IsPlayerServerOwner(PlayerData.MyPlayer))
     {
         if (args.Length > 0)
         {
             string name = string.Join(" ", args);
             if (name.Length <= 20)
             {
                 DUtils.Chat($"Changed {Main.worldName}'s name to '{name}'!", true, Color.CornflowerBlue.R, Color.CornflowerBlue.G, Color.CornflowerBlue.B);
                 Main.worldName = name;
             }
             if (name.Length > 20)
             {
                 Main.NewText("ERROR: You cannot have a name longer than 20 characters.");
             }
         }
         else
         {
             Main.NewText("ERROR: You have not specified a name.");
         }
     }
     else
     {
         Main.NewText("ERROR: You are not the server host.");
     }
 }
Exemplo n.º 25
0
 void Help(CommandCaller caller)
 {
     caller.Reply("/tt help");
     caller.Reply("  Display this information.");
     caller.Reply("/tt hand");
     caller.Reply("  Get information about item that you hold.");
 }
Exemplo n.º 26
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (args.Length > 0)
            {
                if (!CommandManager.GetCommand(caller, args[0], out ModCommand mc))
                {
                    throw new UsageException("Unknown command: " + args[0], Color.Red);
                }
                if (mc != null)
                {
                    caller.Reply(mc.Usage);
                    if (!string.IsNullOrEmpty(mc.Description))
                    {
                        caller.Reply(mc.Description);
                    }
                }
                return;
            }

            var help = CommandManager.GetHelp(caller.CommandType);

            caller.Reply(caller.CommandType + " Commands:", Color.Yellow);

            foreach (var entry in help)
            {
                caller.Reply(entry.Item1 + "   " + entry.Item2);
            }

            if (Main.netMode == 1)
            {
                //send the command to the server
                ChatHelper.SendChatMessageFromClient(new ChatMessage(input));
            }
        }
Exemplo n.º 27
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            int type;

            if (!int.TryParse(args[0], out type))
            {
                var name = args[0].Replace("_", " ");
                var item = new Item();
                for (var k = 0; k < ItemLoader.ItemCount; k++)
                {
                    item.SetDefaults(k, true);
                    if (name == Lang.GetItemNameValue(k))
                    {
                        type = k;
                        break;
                    }
                }

                if (type == 0)
                {
                    throw new UsageException("Unknown item: " + name);
                }
            }

            int stack = 1;

            if (args.Length >= 2)
            {
                stack = int.Parse(args[1]);
            }

            caller.Player.QuickSpawnItem(type, stack);
        }
        ////////////////

        /// @private
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (args.Length == 0)
            {
                throw new UsageException("No arguments supplied.");
            }

            bool isVerbose;

            if (!bool.TryParse(args[0], out isVerbose))
            {
                throw new UsageException("Invalid 'verbose' argument supplied (must be boolean).");
            }

            IList <string> reply = new List <string>(ModLoader.Mods.Length);
            IDictionary <BuildPropertiesViewer, Mod> modList = ModListHelpers.GetLoadedModsAndBuildInfo();

            foreach (var kv in modList)
            {
                string modInfo = ModListCommand.GetBasicModInfo(kv.Value, kv.Key);

                if (isVerbose)
                {
                    string verboseModInfo = ModListCommand.GetVerboseModInfo(kv.Value, kv.Key);
                    if (!string.IsNullOrEmpty(verboseModInfo))
                    {
                        modInfo += ", " + verboseModInfo;
                    }
                }

                reply.Add(modInfo);
            }

            caller.Reply(string.Join("\n", reply));
        }
Exemplo n.º 29
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            int stack = 1;

            if (args.Length >= 1)
            {
                stack = int.Parse(args[0]);
            }
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatySword>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatySword>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyDrill>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyDrill>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyChainsaw>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyChainsaw>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyJackhammer>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyJackhammer>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyMageHelmet>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyMageHelmet>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyMageBreastplate>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyMageBreastplate>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyMageLeggings>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyMageLeggings>().item.Name, 0, 255, 0);
            caller.Player.QuickSpawnItem(GetInstance <SuperCheatyWings>().item, stack);
            Main.NewText(caller.Player.name + " Spawned " + stack + "x " + GetInstance <SuperCheatyWings>().item.Name, 0, 255, 0);
        }
Exemplo n.º 30
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            Main.NewText("World pos: " + Main.LocalPlayer.position.X + " " + Main.LocalPlayer.position.Y);
            Point tilePos = Main.LocalPlayer.position.ToTileCoordinates().ToVector2().ToPoint();

            Main.NewText("Tile pos: " + tilePos.X + "x " + tilePos.Y + "y");
        }