#Fixing my pack it small!

1 messages · Page 1 of 1 (latest)

sand ravine
#

Can someone please help me fix a couple problems due to my dev not helping and with new update about block location and location?

#

I just dont know how to use vector

fervent mauve
#

just send code

#

and whoever knows how to solve the problem will come solve it

sand ravine
#

Need help turning these into working code

// system.runInterval(() => {
//   const startingPos = new Location(
//     getScore("startPos", "Money") + 13,
//     120,
//     -500
//   );```

```js
//   let lastLocation = {}

//       system.runInterval(() => {
//       for (const player of world.getPlayers()) {
//           if (!player.hasTag("tp")) {
//               lastLocation[player.id] = player.location
//               continue
//           }
//           if (!lastLocation[player.id]) {
//               lastLocation[player.id] = player.location
//               continue
//           }
//           if (player.getDistance(lastLocation[player.id]) > 2 && lastLocation) {
//               player.teleport(lastLocation[player.id], player.dimension, player.rotation.x, player.rotation.y)
//               player.tell(`§cYou are not allowed to teleport`)
//           }
//           lastLocation[player.id] = player.location
//       }
//   }, 1)
//  world.events.entityHit.subscribe((data) => {
//      const player = data.entity;
//      const hitEntity = data.hitEntity;
//      if (!hitEntity) return;
//      if (!player.hasTag(`Admin`)) {
//          if (
//              !player.headLocation.isNear(
//                  new Location(
//                      hitEntity.location.x,
//                      hitEntity.location.y,
//                      hitEntity.location.z
//                  ),
//                  8
//              )
//          ) {
//              world.sendMessage(
//                  `§l§c${player.name
//                  }§r§7 Attempted To Use A Reach At §c§l${player.location.x.toFixed(
//                      0
//                  )} ${player.location.y.toFixed(0)} ${player.location.z.toFixed(
//                      0
//                  )}§r§7 Report Them To Staff!`
//              );
//              player.addTag(`reach`);
//          }
//      }
//  }); ```
#
// const location = [{ x: -11, y: 81, z: -122 }];
world.events.beforeItemUseOn.subscribe((event) => {
  const { source: player, item } = event;
  for (const loc of location) {
    // if (event.blockLocation.equals(new BlockLocation(loc.x, loc.y, loc.z))) {
    //   Main(player);  
    //   event.cancel = true;
    // }
  }```

// world.events.buttonPush.subscribe((data) => {
// const { source: player } = data;
// if (data.block.location.equals(new BlockLocation(7, 82, -115))) {
// if (
// getScore(player.name, "Money") >= 30000 &&
// !player.hasTag("VaultOwner")
// ) {
// console.warn(Player ${player.name} has purchased a vault!);
// player.addTag(Purchased);
// player.tell(§aYou have purchased a vault!);
// player.runCommandAsync(scoreboard players remove @s Money 30000);
// return;
// }
// if (
// !player.hasTag(VaultOwner) &&
// getScore(player.name, "Money") <= 29999
// ) {
// player.tell(§cYou do not have enough money!);
// }
// }
// if (player.hasTag("VaultOwner")) {
// player.tell(§cYou already own a Vault);
// }
// });```

#

i think it easy cause it like one line per things

#

cause it like block location and location

#

I dont want people to do it if u can you can but I am also wanna learn new version

indigo galleon
#

my god

#

Funny thing is not a single character of this code is made by him

fervent mauve
#

Made by his dev, he said

indigo galleon
#

devs*

#

There's like 20 people on his dev credits lol

#

Yes it was wap who helped

#

How did u tell

#

💀

#

Maybe so

crimson mango
#

Fixed it?

indigo galleon
#

no