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); } } } } }
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); } } } } }
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)); } }
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)); } } } }
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)); } } } }
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); } } }
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); } } }
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)); }
public abstract void DrawArea(Bot bot, Player player, WorldEdit worldEdit, string arg = "");
public abstract void Draw(Bot bot, Player player, WorldEdit worldEdit, int x, int y, string arg = "");