u/Oreo-belt25

▲ 2 r/bloxd

Can someone please give me to code to apply Slowness 100?

For some reason, the AI is struggling with the command hard

We cannot find the correct argument to call the level to an applied status affect.

We want slowness 100 to be applied for 3 seconds, so that players at the start of a 1v1 cant run at each other immediately.

reddit.com
u/Oreo-belt25 — 1 day ago
▲ 3 r/bloxd

do press to get boards count as api calls?

I'm really starting to run up against the caps bloxd has that cause the "Interrupted" error and I'd really like to optimize any way I can.

For example, I have a press code block that takes away 48 splash Healing II Potions, and gives a enchanted fur chestplate.

Would it be less heavy on the code if I replaced the "take away 48 healing pots" in the code block with a "press to sell All Splash Healing II Potion" board?

Also, how does the interrupted logic work? Like, if a code block is interrupted half way through, will it wait a second and then finish the second half of the code block?

reddit.com
u/Oreo-belt25 — 2 days ago
▲ 3 r/bloxd

How to press to lobby for schematics?

How do you make a press to lobby for a schematic published game?

It's fairly easy for worlds, but since custom published games have "lobby 1" "lobby 2" and so on, I can't seem to figure it out.

The coding docs said it is possible with a | pipe symbol, but I can't figure it out.

Also, I notice that custom published games don't have protections against duplicate names. Is that part of the problem I'm running into?

reddit.com
u/Oreo-belt25 — 2 days ago
▲ 1 r/bloxd

How do people make those 1v1 queues?

How do people make those 1v1 queue code blocks?

You know, the ones that when 2 players press them, it tp's them into an arena.

But if more than 2 players press it, it tp's the next pair into a new arena.

And it also somehow checks if the first arenas are still occupied?

How do they pull that off?

reddit.com
u/Oreo-belt25 — 3 days ago
▲ 2 r/bloxd

Is there a way to make armour invisible?

So, cosmetics have been released; backpacks, helmets, etc.

But armour covers these items.

This is such a problem, that I've even seen pkayers run around on PvP servers without helmets on or chestplates on.

So what I'd like to ask; is there a way to have players "wear" armour and get the stats, without having the armour visually apparent.

reddit.com
u/Oreo-belt25 — 3 days ago
▲ 3 r/bloxd

UHC Arena Open Source Code

Since I recieved so much help from this community in making my custom arena map, I feel it's only fair I share it here.

You can find the map it's used on here: https://www.reddit.com/r/bloxd/comments/1tgaw02/uhc_arena_map/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

This code:

-Makes blocks of the arena invincible -Makes nets, compressed stone and dim spikes disappear after 10 seconds. -makes broken stone respawn after 2 minutes for Hole PvP(with additional code to stop it from bugging out with the net/spike code) -Removes empty rice bowls from inventory after you eat rice -Creates a scoreboard when you hit G -Writes to player DbID so that scores persist between sessions -When you kill a player, it will announce to chat your health -Tracks your killstreak

Huge shout out to u/BloxdioCannoli for all his help!


const blocksToRemove = []
const blocksToReplace = []
const cantChanges = ["Smooth Diorite", "Cedar Log", "Iron Watermelon", "Smooth Stone", "Block of Gold", "Chiseled Block of Quartz", "Red Wool", "Invisible Solid", "Patterned Gray Glass", "Stone Bricks", "Beacon", "Engraved Stone", "White Wool", "Engraved Andesite", "Black Portal", "Code Block", "Invisible Sky Light"]

//This code makes the blocks in the list invincible on the client side.
onPlayerJoin = (id) => {
  for (const item of cantChanges) {
    api.setCantChangeBlockType(id, item)
  }
  setLeaderboardClientOption(id)
  refreshLbValues(id)
  const bestKillstreak = api.getPlayerDbValue(id, "bestKillstreak") ?? 0
  api.setClientOption(id, "RightInfoText", `🔥 Killstreak: 0 | Best: ${bestKillstreak}`)
}

//This is the scoreboard, kill announcement, and killstreak tracking code
onPlayerKilledOtherPlayer = (killingPlayer, killedPlayer) => {
  const kills = (api.getPlayerDbValue(killingPlayer, "kills") ?? 0) + 1
  const deaths = (api.getPlayerDbValue(killedPlayer, "deaths") ?? 0) + 1

  api.setPlayerDbValue(killingPlayer, "kills", kills)
  api.setPlayerDbValue(killedPlayer, "deaths", deaths)

  refreshLbValues(killingPlayer)
  refreshLbValues(killedPlayer)

  const health = api.getHealth(killingPlayer)
  const killingPlayerName = api.getEntityName(killingPlayer)
  const killedPlayerName = api.getEntityName(killedPlayer)
  api.broadcastMessage(`${killingPlayerName} killed ${killedPlayerName} with ${health} HP remaining!`, { color: "white" })

  const killstreak = api.getCurrentKillstreak(killingPlayer)
  const bestKillstreak = api.getPlayerDbValue(killingPlayer, "bestKillstreak") ?? 0

  if (killstreak > bestKillstreak) {
    api.setPlayerDbValue(killingPlayer, "bestKillstreak", killstreak)
  }

  api.setClientOption(killingPlayer, "RightInfoText", `🔥 Killstreak: ${killstreak} | Best: ${Math.max(killstreak, bestKillstreak)}`)
}

//This code makes empty rice bowls disappear from your inventory, so the Instant Rice works properly.
onPlayerFinishChargingItem = (playerId, used, itemName) => {
  if (used && itemName === "Bowl of Rice") {
    api.removeItemName(playerId, "Bowl", 1)
  }
}

//This code makes nets, Diamond Spikes, and Extra Compressed Messy Stone disappear after 10 seconds. It also makes Stone respawn after 2 minutes.
onPlayerChangeBlock = (playerId, x, y, z, fromBlock, toBlock) => {
  if (toBlock == "Net" || toBlock == "Diamond Spikes" || toBlock == "Extra Compressed Messy Stone") {
    blocksToRemove.push({
      x: x,
      y: y,
      z: z,
      expiry: Date.now() + 10000
    })
  }
  if (toBlock == "Air" && fromBlock == "Stone") {
    blocksToReplace.push({
      x: x,
      y: y,
      z: z,
      block: fromBlock,
      expiry: Date.now() + 120000
    })
  }
}

//This code allows players to type !restock in chat to get more potions if they are in the designated area.
onPlayerChat = (i, msg) => {
  if (msg == "!restock") {
    let pos = api.getPosition(i)
    if (pos[1] >= 0 && pos[1] <= 10) {
      api.giveItem(i, "Splash Instant Healing Potion II", 20)
      api.giveItem(i, "Splash Weakness Potion II", 6)
      api.sendMessage(i, "Items restocked!", { color: "lime" })
    } else {
      api.sendMessage(i, "ERROR: Must be between y-values 0 and 10 to restock.", { color: "red" })
    }
    return false
  }
}

//This code creates conditions to allow the stone respawn to override the nets, spikes and extra comp stone respawn timers.
tick = () => {
  const currentTime = Date.now()

  for (let i = blocksToRemove.length - 1; i >= 0; i--) {
    const block = blocksToRemove[i]
    if (currentTime >= block.expiry) {
      const currentBlock = api.getBlock(block.x, block.y, block.z)
      if (currentBlock == "Net" || currentBlock == "Diamond Spikes" || currentBlock == "Extra Compressed Messy Stone") {
        api.setBlock(block.x, block.y, block.z, "Air")
      }
      blocksToRemove.splice(i, 1)
    }
  }

  for (let i = blocksToReplace.length - 1; i >= 0; i--) {
    const block = blocksToReplace[i]
    if (currentTime >= block.expiry) {
      const currentBlock = api.getBlock(block.x, block.y, block.z)
      if (currentBlock == "Air" || currentBlock == "Net" || currentBlock == "Diamond Spikes" || currentBlock == "Extra Compressed Messy Stone") {
        api.setBlock(block.x, block.y, block.z, block.block)
      }
      blocksToReplace.splice(i, 1)
    }
  }
}

function refreshLbValues(pId) {
  const kills = api.getPlayerDbValue(pId, "kills") ?? 0
  const deaths = api.getPlayerDbValue(pId, "deaths") ?? 0
  const mobileStatus = api.isMobile(pId) ? "Mobile" : "PC"
  api.setTargetedPlayerSettingForEveryone(pId, "lobbyLeaderboardValues", {
    kills: [{ str: `${kills}` }],
    deaths: [{ str: `${deaths}` }],
    mobile: [{ str: mobileStatus }]
  })
}

function setLeaderboardClientOption(pId) {
  const lbNameStyle = { color: "lightgray", fontWeight: "800" }
  api.setClientOption(pId, "lobbyLeaderboardInfo", {
    name: {
      displayName: [{ icon: "Name Tag" }, { str: "Name", style: lbNameStyle }],
      sortPriority: 0,
    },
    kills: {
      displayName: [{ icon: "Knight Sword" }, { str: "Kills", style: lbNameStyle }],
      sortPriority: 0,
    },
    deaths: {
      displayName: [{ icon: "Kill Spikes" }, { str: "Deaths", style: lbNameStyle }],
      sortPriority: 0,
    },
    mobile: {
      displayName: [{ icon: "Code Block" }, { str: "Device", style: lbNameStyle }],
      sortPriority: 0,
    },
  })
}```
reddit.com
u/Oreo-belt25 — 4 days ago
▲ 1 r/bloxd

How to make a !Restock command?

How do you make a !Restock command to give you 20 Splash Instant Healing Potion II and 6 Splash Weakness Potion II?

And is it possible to lock it to only be usable when the player is between y10 and y0?

reddit.com
u/Oreo-belt25 — 5 days ago
▲ 1 r/bloxd

How to make a message saying "Player killed you with # Health!"

You know how many arena games have a code that, when you die or are killed by a player, chat will read "Player killed Player with # Health Remianing"

Can somebody please help me do that?

reddit.com
u/Oreo-belt25 — 5 days ago
▲ 3 r/bloxd

How to make a Simple Scoreboard?

How can I make a simple scoreboard, that tracks kills and deaths when you press G?

I know in the past, people had to jerryrig it to store the data in the moonstone chest, but the devs recently added an update that lets you write data directly to the players, right? Can somebody please help me do this?

reddit.com
u/Oreo-belt25 — 5 days ago
▲ 3 r/bloxd

How to Create more Bloxd Alts *Without Email!*

Here's a tutorial on how I create my bloxd alts.

It uses the Chrome web browser.

Do note: alts created this way are not linked, so if you ever clear your cookies or get a new PC, you will permanently lose access to that alt.

Nevertheless, I find it useful to have a few linked accounts with email, and then I use these cookied alts to protect unimportant things.

youtu.be
u/Oreo-belt25 — 6 days ago

So, correct me if I'm wrong, but the logic plague is essentially extreme manipulation of logic that can cause an AI to turn to the Flood's side.

But Cortana is a scan of a human brain.

So if the logic plague can infect AI's, and human AI's are just digitized brains, could the logic plague theorhetically infect living people?

Could the Flood play with our nuerons as easily as it plays with bytes? 🤔

I mean, obviously its just easier to infect a living person with an infection form, but it raises the question; could the Gravemind infect say, a Spartan via it's neural interface, or convince mass amounts of people to join it's cause via the media?

We also know people like Seargent Johnson had some ability to resist physical infection, so why didn't the flood try to logic plague him?

reddit.com
u/Oreo-belt25 — 22 days ago