示例#1
0
 public override void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "")
 {
     if (worldEdit.bothPointsSet)
     {
         for (int x = worldEdit.editBlock1.X; x <= worldEdit.editBlock2.X; x++)
         {
             for (int y = worldEdit.editBlock1.Y; y <= worldEdit.editBlock2.Y; y++)
             {
                 int random = r.Next(totalChance);
                 int block = 0;
                 int current = 0;
                 foreach (KeyValuePair<int, double> pair in chances)
                 {
                     int blabla = current + (int)Math.Round((pair.Value / totalChance) * totalChance);
                     if (random >= current && random <= blabla)
                     {
                         block = pair.Key;
                         bot.room.DrawBlock(Block.CreateBlock(block >= 500 ? 1 : 0, x, y, block, player.id));
                         break;
                     }
                     current += (blabla - current);
                 }
             }
         }
     }
 }
示例#2
0
 public override void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "")
 {
     if (worldEdit.bothPointsSet)
     {
         for (int x = worldEdit.editBlock1.X; x <= worldEdit.editBlock2.X; x++)
         {
             for (int y = worldEdit.editBlock1.Y; y <= worldEdit.editBlock2.Y; y++)
             {
                 int random  = r.Next(totalChance);
                 int block   = 0;
                 int current = 0;
                 foreach (KeyValuePair <int, double> pair in chances)
                 {
                     int blabla = current + (int)Math.Round((pair.Value / totalChance) * totalChance);
                     if (random >= current && random <= blabla)
                     {
                         block = pair.Key;
                         bot.room.DrawBlock(Block.CreateBlock(block >= 500 ? 1 : 0, x, y, block, player.id));
                         break;
                     }
                     current += (blabla - current);
                 }
             }
         }
     }
 }
示例#3
0
        public override void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "")
        {
            List <Point> blocks = shape.getBlocks(size, x, y, bot);

            foreach (Point p in blocks)
            {
                bot.room.DrawBlock(Block.CreateBlock(blockId >= 500 ? 1 : 0, p.X, p.Y, blockId, player.id));
            }
        }
示例#4
0
 public override void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "")
 {
     int id = blockId;
     if (arg != "")
         int.TryParse(arg, out id);
     if (worldEdit.bothPointsSet)
     {
         for (int x = worldEdit.editBlock1.X; x <= worldEdit.editBlock2.X; x++)
         {
             for (int y = worldEdit.editBlock1.Y; y <= worldEdit.editBlock2.Y; y++)
             {
                 bot.room.DrawBlock(Block.CreateBlock(id >= 500 ? 1 : 0, x, y, id, player.id));
             }
         }
     }
 }
示例#5
0
        public override void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "")
        {
            int id = blockId;

            if (arg != "")
            {
                int.TryParse(arg, out id);
            }
            if (worldEdit.bothPointsSet)
            {
                for (int x = worldEdit.editBlock1.X; x <= worldEdit.editBlock2.X; x++)
                {
                    for (int y = worldEdit.editBlock1.Y; y <= worldEdit.editBlock2.Y; y++)
                    {
                        bot.room.DrawBlock(Block.CreateBlock(id >= 500 ? 1 : 0, x, y, id, player.id));
                    }
                }
            }
        }
示例#6
0
 public override void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "")
 {
     List<Point> blocks = shape.getBlocks(size, x, y, bot);
     foreach (Point p in blocks)
     {
         int random = r.Next(totalChance + 1);
         int block = 0;
         int current = 0;
         foreach (KeyValuePair<int, double> pair in chances)
         {
             int blabla = current + (int)Math.Round((pair.Value / totalChance) * totalChance);
             if (random >= current && random <= blabla)
             {
                 block = pair.Key;
                 bot.room.DrawBlock(Block.CreateBlock(block >= 500 ? 1 : 0, p.X, p.Y, block, player.id));
                 break;
             }
             current += (blabla - current);
         }
     }
 }
示例#7
0
        public override void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "")
        {
            List <Point> blocks = shape.getBlocks(size, x, y, bot);

            foreach (Point p in blocks)
            {
                int random  = r.Next(totalChance + 1);
                int block   = 0;
                int current = 0;
                foreach (KeyValuePair <int, double> pair in chances)
                {
                    int blabla = current + (int)Math.Round((pair.Value / totalChance) * totalChance);
                    if (random >= current && random <= blabla)
                    {
                        block = pair.Key;
                        bot.room.DrawBlock(Block.CreateBlock(block >= 500 ? 1 : 0, p.X, p.Y, block, player.id));
                        break;
                    }
                    current += (blabla - current);
                }
            }
        }
示例#8
0
 public override void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "")
 {
     List<Point> blocks = shape.getBlocks(size, x, y, bot);
     foreach (Point p in blocks)
         bot.room.DrawBlock(Block.CreateBlock(blockId >= 500 ? 1 : 0, p.X, p.Y, blockId, player.id));
 }
示例#9
0
 public abstract void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "");
示例#10
0
 public abstract void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "");
示例#11
0
 public abstract void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "");
示例#12
0
 public abstract void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg           = "");