Erenslslsl
Zombi Geldi, Beni Yedi
bunu denedim ama olmadı galiba /korumakapat dedim zaten kapalı dedi diğerini denicemAynen, bu komutu girdikten sonra:
1. Lobi dünyasına geri dön.
2. Sunucudan ayrıl & geri gir.
3. boxpvp dünyasına gir ve test et.
bunu denedim ama olmadı galiba /korumakapat dedim zaten kapalı dedi diğerini denicemAynen, bu komutu girdikten sonra:
1. Lobi dünyasına geri dön.
2. Sunucudan ayrıl & geri gir.
3. boxpvp dünyasına gir ve test et.
0mustafa
KRAL yeni verdiğin şeyi yaptım burda hata verdi " if world of player is {@worldName}: "
options:
protectionDuration: 120 # dakika cinsinden
worldName: "boxpvpdünyaismi" # dünya ismi
protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir."
on world change:
if event-world is {@worldName}:
if {boxpvp.playerProtectionLeft::%player%} isn't set:
set {boxpvp.playerProtectionLeft::%player%} to 0
if {boxpvp.firstJoinProtectionGiven::%player%} isn't set:
set {boxpvp.firstJoinProtectionGiven::%player%} to true
set {boxpvp.protection.protecting::%player%} to true
set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60
wait 0.5 second
set {_t} to {@protectionDuration} / 60
send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player
on damage:
if victim is a player:
if attacker is a player:
if world of victim is {@worldName}:
if {boxpvp.protection.protecting::%attacker%} is true:
cancel event
send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker
play sound "minecraft:item.shield.break" to attacker
else if {boxpvp.protection.protecting::%victim%} is true:
cancel event
send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker
play sound "minecraft:item.shield.break" to attacker
on join:
protectionHandler(player)
command /korumakapat:
trigger:
if {boxpvp.protection.protecting::%player%} is true:
set {boxpvp.protection.protecting::%player%} to false
send "&cKoruman başarıyla devre dışı bırakıldı!" to player
play sound "entity.player.levelup" to player
else:
send "&cKoruman zaten aktif değil!" to player
play sound "block.note_block.bass" at pitch 0.5 to player
command /boxpvpprotectionresetfirstjoin:
permission: op
permission message: &cBu komuta iznin yok.
trigger:
delete {boxpvp.firstJoinProtectionGiven::%player%}
local function protectionHandler(p: player):
while {_p} is online:
while {boxpvp.protection.protecting::%{_p}%} is true:
if {boxpvp.playerProtectionLeft::%{_p}%} > 0:
remove 1 from {boxpvp.playerProtectionLeft::%{_p}%}
else:
set {boxpvp.protection.protecting::%{_p}%} to false
send {@protectionEndedMessage} to {_p}
wait a second
wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.
bunu deniyorum hemenPython:options: protectionDuration: 120 # dakika cinsinden worldName: "boxpvpdünyaismi" # dünya ismi protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir." on world change: if event-world is {@worldName}: if {boxpvp.playerProtectionLeft::%player%} isn't set: set {boxpvp.playerProtectionLeft::%player%} to 0 if {boxpvp.firstJoinProtectionGiven::%player%} isn't set: set {boxpvp.firstJoinProtectionGiven::%player%} to true set {boxpvp.protection.protecting::%player%} to true set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60 wait 0.5 second set {_t} to {@protectionDuration} / 60 send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player on damage: if victim is a player: if attacker is a player: if world of victim is {@worldName}: if {boxpvp.protection.protecting::%attacker%} is true: cancel event send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker play sound "minecraft:item.shield.break" to attacker else if {boxpvp.protection.protecting::%victim%} is true: cancel event send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker play sound "minecraft:item.shield.break" to attacker on join: protectionHandler(player) command /korumakapat: trigger: if {boxpvp.protection.protecting::%player%} is true: set {boxpvp.protection.protecting::%player%} to false send "&cKoruman başarıyla devre dışı bırakıldı!" to player play sound "entity.player.levelup" to player else: send "&cKoruman zaten aktif değil!" to player play sound "block.note_block.bass" at pitch 0.5 to player command /boxpvpprotectionresetfirstjoin: permission: op permission message: &cBu komuta iznin yok. trigger: delete {boxpvp.firstJoinProtectionGiven::%player%} local function protectionHandler(p: player): while {_p} is online: while {boxpvp.protection.protecting::%{_p}%} is true: if {boxpvp.playerProtectionLeft::%{_p}%} > 0: remove 1 from {boxpvp.playerProtectionLeft::%{_p}%} else: set {boxpvp.protection.protecting::%{_p}%} to false send {@protectionEndedMessage} to {_p} wait a second wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.
Düzeltilmiş hali.
0mustafa
Koruman yok çünkü. Koruma gelmesi için dünyaya ilk defa girmen gerekiyor. Bunun içinde "/boxpvpprotectionresetfirstjoin" komutuyla kendini için ilk defa giriş yapmış gibi gösterebilirsin.sorun çıkmadı ama ben gene korumakapat yazdım koruman zaten kapalı dedi başa almadı
0mustafa
Analamadım /korumaaç yazınca yazan kişiye mi koruma versin yoksa tüm oyunculara 1 saatlik bir koruma falan mı versin?kral /korumaaç diye bişi getirsen ama oplara özel olcak onu yazınca tüm herkezin koruması olcak yapabilirmisin
yani /korumaaç yazınca boxpvp dünyasındaki herkeze 2 saatlik koruma versin ama sadece op lar yapabilsin bunu /boxpvpprotectionresetfirstjoin bu komut bende çalışmıyor galibaAnalamadım /korumaaç yazınca yazan kişiye mi koruma versin yoksa tüm oyunculara 1 saatlik bir koruma falan mı versin?
0mustafa
Bence şöyle yapalım, kullanıcı /korumakapat yazınca koruması durdurulsun. /korumaaç yazınca koruması devam ettirilsin. OP'ler için herkese koruma verme komutu istiyorsan onu da /korumaver <tam sayı> olarak yapabilirim.yani /korumaaç yazınca boxpvp dünyasındaki herkeze 2 saatlik koruma versin ama sadece op lar yapabilsin bunu /boxpvpprotectionresetfirstjoin bu komut bende çalışmıyor galiba
0mustafa
options:
protectionDuration: 120 # dakika cinsinden
worldName: "boxpvpdünyaismi" # dünya ismi
protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir."
on world change:
if event-world is {@worldName}:
if {boxpvp.playerProtectionLeft::%player%} isn't set:
set {boxpvp.playerProtectionLeft::%player%} to 0
if {boxpvp.firstJoinProtectionGiven::%player%} isn't set:
set {boxpvp.firstJoinProtectionGiven::%player%} to true
set {boxpvp.protection.protecting::%player%} to true
set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60
wait 0.5 second
set {_t} to {@protectionDuration} / 60
send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player
on damage:
if victim is a player:
if attacker is a player:
if world of victim is {@worldName}:
if {boxpvp.protection.protecting::%attacker%} is true:
cancel event
send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker
play sound "minecraft:item.shield.break" to attacker
else if {boxpvp.protection.protecting::%victim%} is true:
cancel event
send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker
play sound "minecraft:item.shield.break" to attacker
on join:
protectionHandler(player)
command /korumakapat:
trigger:
if {boxpvp.protection.protecting::%player%} is true:
set {boxpvp.protection.protecting::%player%} to false
send "&cKoruman başarıyla devre dışı bırakıldı!" to player
play sound "entity.player.levelup" to player
else:
send "&cKoruman zaten aktif değil!" to player
play sound "block.note_block.bass" at pitch 0.5 to player
command /korumaver <int>:
permission: boxpvp.protection.giveProtection
trigger:
loop all players:
add arg 1 to {boxpvp.playerProtectionLeft::%loop-player%}
set {boxpvp.playerProtecting::%player%} to true
command /boxpvpprotectionresetfirstjoin:
permission: op
permission message: &cBu komuta iznin yok.
trigger:
delete {boxpvp.firstJoinProtectionGiven::%player%}
local function protectionHandler(p: player):
while {_p} is online:
while {boxpvp.protection.protecting::%{_p}%} is true:
if {boxpvp.playerProtectionLeft::%{_p}%} > 0:
remove 1 from {boxpvp.playerProtectionLeft::%{_p}%}
else:
set {boxpvp.protection.protecting::%{_p}%} to false
send {@protectionEndedMessage} to {_p}
wait a second
wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.
Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!