#HELP WITH SKRIPT TO BOSS
1 messages · Page 1 of 1 (latest)
on rightclick on iron bars:
set {_target} to location(16979, 170, -2519, world of player)
loop all players:
if distance between loop-player and {_target} <= 38:
send "&7[&6MAX-MC.PL&7]⋙cKtoś już wkroczył do Komnaty Tytana!" to player
stop
# Sprawdź, czy gracz ma tripwire hook o właściwej nazwie
set {_hasKey} to false
loop all items in player's inventory:
if loop-item is tripwire hook:
if name of loop-item is "&6&lKlucz Komnaty Tytana":
set {_hasKey} to true
stop loop
if {_hasKey} is true:
remove 1 tripwire hook named "&6&lKlucz Komnaty Tytana" from player
teleport player to {_target}
send "&7[&6MAX-MC.PL&7]⋙&aWkroczyłeś do Komnaty Tytana.. Powodzenia!" to player
wait 20 ticks
send "&7[&6MAX-MC.PL&7]⋙&aZa 10 sekund, Tytan pojawi sie w komnacie" to player
wait 20 ticks
send "&7[&6MAX-MC.PL&7]⋙&aUważaj na siebie.." to player
set {boss_summoner} to player
loop all living entities in world:
if display name of loop-entity is "BossTytan":
set {boss_entity} to "BossTytan"
stop loop
wait 120 ticks
execute console command "mm m spawn BossTytan 1 world,16970,172,-2507"
send "&4&l☠ Straznik Bogow został przywołany!" to player
play sound "entity.wither.spawn" with volume 1 and pitch 1 to player
on mythicmob death:
if mythicmob is "BossTytan":
broadcast "&aGracz &e%attacker% &azabił &4&l☠ Strażnika Bogów!"
else:
send "&7[&6MAX-MC.PL&7]⋙&cNie posiadasz &6&lKlucz Komnaty Tytana &cZdobądz go, zebyś mógł podjąć próbę zabić Tytana!" to player
I wrote a script where I want the player to be teleported after clicking and having the appropriate items and the boss is summoned to the designated coordinates and it works but I'm trying to add that thanks to the help from mythicmobs the message that the player killed the boss named would work, I also made it so that after killing the player would return to the spawn but the plugin displayed that the boss had already been killed immediately after summoning