DanteDEVS / MurderMysteryLED

MurderMystery PocketMine Plugin, Originally by LeyKey, Transferred to PM3 to PM5 by ItsToxicGG & DanteDevs
Apache License 2.0
12 stars 6 forks source link

Features request and some unfinished features #20

Closed Smorted closed 1 month ago

Smorted commented 7 months ago

⋅⋅⋅ the sword still cannot be thrown with tapping or holding it.

DanteDEVS commented 7 months ago

throwable sword is on hold, if u can read, /mm sword is the little test for it, at the moment throwable sword only stands still dont move and i have yet found a solution.

ItsToxicGG commented 7 months ago

throwable sword is on hold, if u can read, /mm sword is the little test for it, at the moment throwable sword only stands still dont move and i have yet found a solution.

on hold? whats up with throwable sword?

ItsToxicGG commented 7 months ago
  • make it shuffle the player names and skins when the game starts so its harder to know who is who, so when the detector role is active he can see the name in the players list then he know the skin, it'll be much better this way.
  • add a win announcement for the whole server with the names of the winning players
  • add sounds to events such as when an innocent player is killed or when the detective is killed
  • add a claim sound to the player when he successfully collects a bow or an arrow
  • adjust the gold ingot to be only 1 in the inventory, currently i don't know why but its always 2pcs instead of one (same stack we have the number "2" on top of the item)

⋅⋅⋅ the sword still cannot be thrown with tapping or holding it.

for the third one

u talking about this?

            foreach($this->players as $ingame){
                $this->playSound($ingame, "game.player.die");
            }

its already in killplayer so idk what u mean, please explain more.

ItsToxicGG commented 7 months ago

Ok smorted this is all changes ive added for ur request

  1. Complete
  2. Complete [Kinda]
  3. Idk isnt this already added?
  4. Complete
  5. Uncomplete [Will check on it now or later]
  6. Uncomplete [Will check on it now or later]
Smorted commented 7 months ago
  • make it shuffle the player names and skins when the game starts so its harder to know who is who, so when the detector role is active he can see the name in the players list then he know the skin, it'll be much better this way.
  • add a win announcement for the whole server with the names of the winning players
  • add sounds to events such as when an innocent player is killed or when the detective is killed
  • add a claim sound to the player when he successfully collects a bow or an arrow
  • adjust the gold ingot to be only 1 in the inventory, currently i don't know why but its always 2pcs instead of one (same stack we have the number "2" on top of the item)

⋅⋅⋅ the sword still cannot be thrown with tapping or holding it.

for the third one

u talking about this?

            foreach($this->players as $ingame){
                $this->playSound($ingame, "game.player.die");
            }

its already in killplayer so idk what u mean, please explain more.

i believe it will definitely be better to broadcast the sound in the position in the world rather than sending the sound to all players far or close to him

Smorted commented 7 months ago

Ok smorted this is all changes ive added for ur request

  1. Complete
  2. Complete [Kinda]
  3. Idk isnt this already added?
  4. Complete
  5. Uncomplete [Will check on it now or later]
  6. Uncomplete [Will check on it now or later]

thank you for you efforts, this will benefit everyone who decides to use this plugin (tho i might not use it until later in the future)

  1. no need to send the sound to all players, it should be only sent to the player who collected the item
ItsToxicGG commented 7 months ago

Oh i understand you, ok ill be on it later today unless @DanteDEVS does it himself

Smorted commented 6 months ago

from what ive tested so far, here are the notes and issues i saw..

Error: pocketmine\entity\Entity::__construct(): Argument #2 ($nbt) must be of type ?pocketmine\nbt\tag\CompoundTag, float given, called in /home/container/plugins/MurderMysteryLED-main/src/mm/game/Game.php on line 1088
File: pmsrc/src/entity/Entity
Line: 183
Type: TypeError
Backtrace:
#0 plugins/MurderMysteryLED-main/src/mm/game/Game(1088): pocketmine\entity\Entity->__construct(object pocketmine\entity\Location#423293, float 158.47609710693, float 7.189208984375)
#1 plugins/MurderMysteryLED-main/src/mm/game/Game(704): mm\game\Game->createSwordEntity(object pocketmine\player\Player#408136)
#2 pmsrc/src/event/RegisteredListener(61): mm\game\Game->onItemUse(object pocketmine\event\player\PlayerItemUseEvent#423317)
#3 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerItemUseEvent#423317)
#4 pmsrc/src/player/Player(1607): pocketmine\event\Event->call()
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(508): pocketmine\player\Player->useHeldItem()
#6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(342): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#422737)
#7 pmsrc/vendor/pocketmine/bedrock-protocol/src/InventoryTransactionPacket(94): pocketmine\network\mcpe\handler\InGamePacketHandler->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#422739)
#8 pmsrc/src/network/mcpe/NetworkSession(448): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#406605)
#9 pmsrc/src/network/mcpe/NetworkSession(386): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#422739, string[90] ............................display...Name....r..aKnife...........~..r=.B)..D...)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[78] c.aR..c`b`d``.......`..........!%.. '...../17......C....2.R..`M..."..N...]....)
#11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[87] ..................Eu`...r]w.{..`*/v..........C.n._.2(s_..!.d...oQ0....BX.....a..)
#12 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#353192)
#13 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine\{closure}()
#15 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#16 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#17 pmsrc/src/Server(1690): pocketmine\snooze\SleeperHandler->sleepUntil(float 1706029385.7624)
#18 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#19 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#20 pmsrc/src/PocketMine(364): pocketmine\server()
#21 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code:
[174]   protected bool $noClientPredictions = false;
[175]   protected bool $invisible = false;
[176]   protected bool $silent = false;
[177] 
[178]   protected ?int $ownerId = null;
[179]   protected ?int $targetId = null;
[180] 
[181]   private bool $constructorCalled = false;
[182] 
[183]   public function __construct(Location $location, ?CompoundTag $nbt = null){
[184]       if($this->constructorCalled){
[185]           throw new \LogicException("Attempted to call constructor for an Entity multiple times");
[186]       }
[187]       $this->constructorCalled = true;
[188]       Utils::checkLocationNotInfOrNaN($location);
[189] 
[190]       $this->timings = Timings::getEntityTimings($this);
[191] 
[192]       $this->size = $this->getInitialSizeInfo();
[193]       $this->drag = $this->getInitialDragMultiplier();
ItsToxicGG commented 6 months ago

i am aware of the throwable sword error however the rest im not at the moment mabye ill leave it up to @DanteDEVS as im not an entity guy, im more of a core & anticheat developer, im just as a little help well @DanteDEVS is gone.

ItsToxicGG commented 6 months ago

"the gold ingot doesn't despawn after the game finishes, they should despawn so in the next game nobody collects them until the plugin actually spawns them" - idk why i mean i did flag it to despawn as it indentifies an itementity, its probably a pmmp issue im not sure.

ItsToxicGG commented 6 months ago

'the cooldown for detective bow shoot is useless'

what do u mean exactly its working perfectly find aswell as no cooldown it would be so easy to the detective to win. {bow spam & bow aimbot usage can be alot}

so yeah and no

--

the win announcement is currently only when the timer runs out, should be also when the murderer kills all or gets killed or even if all players just decide to leave the game for some reason

Answer: Oops sorry about this one, im not sure if u fixed it in ur latest commit, ill check myself