Ejemplo n.º 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);
                 }
             }
         }
     }
 }
Ejemplo n.º 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);
                 }
             }
         }
     }
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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));
             }
         }
     }
 }
Ejemplo n.º 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));
                    }
                }
            }
        }
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 9
0
 public abstract void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "");
Ejemplo n.º 10
0
 public abstract void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "");
Ejemplo n.º 11
0
 public abstract void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "");
Ejemplo n.º 12
0
 public abstract void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg           = "");