Sol Reklam
Sağ Reklam

Çözüldü Belirli bir dünyada Oyuncu Hareket Ettirmeme

Durum
Mesaj gönderimine kapalı.

Türk_Craft

Bir Kömür Göründü Kaptanım!

Discord:

AliHD#4006

Katılım
5 Mart 2019
Mesajlar
104
Elmaslar
12
Puanlar
0
Yaş
24
Minecraft
AliHD_YT
ARKADAŞLAR SİZLERDEN BİR RİCAM OLACAK, ŞÖYLE BİR SKRİPT İSTİYORUM 'cakmalobi' dünyasında oyuncular oyuna girdiklerinde cakmalobi dünyasında belirlediğim alanda doğacaklar, ve hareket edemeyecekler.
 

Natrotm

Yay Yok, İskelet Yok
Katılım
17 Şubat 2019
Mesajlar
320
Elmaslar
159
Puanlar
0
Yer
Mardin
JavaScript:
on any movement:
    if player's world is "cakmalobi":
    cancel event
 

Fhalinkz

Tm

Discord:

Fhalinkz#6825

Katılım
5 Şubat 2018
Mesajlar
1.072
Elmaslar
620
Puanlar
16.230
Yaş
21
Minecraft
Fhalinkz
Sorun çözüldüyse belirtin.
 

Türk_Craft

Bir Kömür Göründü Kaptanım!

Discord:

AliHD#4006

Katılım
5 Mart 2019
Mesajlar
104
Elmaslar
12
Puanlar
0
Yaş
24
Minecraft
AliHD_YT
Maalesef sadece cakmalobi dünyasında değil tüm dünyalarda çalışıyor
 

beeboy07

Yaratık Tuzağı: Çalışıyor

Discord:

beeboy07#1737

Katılım
4 Temmuz 2016
Mesajlar
687
Elmaslar
659
Puanlar
15.030
Yer
İstanbul
Oyunda çok kişi olduğunda lag yapabilir. Altını çiziyorum, çok kişi olduğunda...
Kod:
on any movement:
    if player is in "cakmalobi":
        cancel event
 

Natrotm

Yay Yok, İskelet Yok
Katılım
17 Şubat 2019
Mesajlar
320
Elmaslar
159
Puanlar
0
Yer
Mardin
Oyunda çok kişi olduğunda lag yapabilir. Altını çiziyorum, çok kişi olduğunda...
Kod:
on any movement:
    if player is in "cakmalobi":
        cancel event

heeeeeeeeeeeeeeeeeeeeee güzel
 

L1T3R4L

Odunlara Vur Vur Vur!

Discord:

Enes'20 | L1T3R4L#1867

Katılım
14 Ocak 2019
Mesajlar
38
Elmaslar
21
Puanlar
0
Yaş
24
Minecraft
L1T3R4L
JavaScript:
on any movement:
    if player's world is "cakmalobi":
    cancel event
Bu kod sağlıklı bir kod değil.
Çünkü oyuncu yürümese sadece fareyi döndürse bu event çalışacak, bu event bir çok oyuncu tarafından tetikleneceği için sunucuya yük bindirecektir.

Benim kodum daha sağlıklı çalışacaktır.
Kod:
# Development by L1T3R4L

on join:
    if {lastLocation::%player%} isn't set:
        set {lastLocation::%player%} to player's location

on any movement:
    set {_loc} to player's location
    if player is in "cakmalobi":
        set {_x::*} to split "%{_loc}'s x coord%" at "."
        set {_y::*} to split "%{_loc}'s y coord%" at "."
        set {_z::*} to split "%{_loc}'s z coord%" at "."
        set {_x} to {_x::1} parsed as int
        set {_y} to {_y::1} parsed as int
        set {_z} to {_z::1} parsed as int
        set {_lx::*} to split "%{lastLocation::%player%}'s x coord%" at "."
        set {_ly::*} to split "%{lastLocation::%player%}'s y coord%" at "."
        set {_lz::*} to split "%{lastLocation::%player%}'s z coord%" at "."
        set {_lx} to {_lx::1} parsed as int
        set {_ly} to {_ly::1} parsed as int
        set {_lz} to {_lz::1} parsed as int
        set {isMoved} to false
        if {_x} is more than or less than {_lx}:
            set {isMoved} to true
        else if {_y} is more than or less than {_ly}:
            set {isMoved} to true
        else if {_z} is more than or less than {_lz}:
            set {isMoved} to true
        if {isMoved} is true:
            cancel event
    set {lastLocation::%player%} to {_loc}
 

Sabinushka

Kızılsakal Kızıltaş?

Discord:

MrAnilcaan_K#5521

Katılım
6 Mart 2017
Mesajlar
477
Elmaslar
153
Puanlar
14.020
Yaş
20
Minecraft
Sabinushka,
Bu kod sağlıklı bir kod değil.
Çünkü oyuncu yürümese sadece fareyi döndürse bu event çalışacak, bu event bir çok oyuncu tarafından tetikleneceği için sunucuya yük bindirecektir.

Benim kodum daha sağlıklı çalışacaktır.
Kod:
# Development by L1T3R4L

on join:
    if {lastLocation::%player%} isn't set:
        set {lastLocation::%player%} to player's location

on any movement:
    set {_loc} to player's location
    if player is in "cakmalobi":
        set {_x::*} to split "%{_loc}'s x coord%" at "."
        set {_y::*} to split "%{_loc}'s y coord%" at "."
        set {_z::*} to split "%{_loc}'s z coord%" at "."
        set {_x} to {_x::1} parsed as int
        set {_y} to {_y::1} parsed as int
        set {_z} to {_z::1} parsed as int
        set {_lx::*} to split "%{lastLocation::%player%}'s x coord%" at "."
        set {_ly::*} to split "%{lastLocation::%player%}'s y coord%" at "."
        set {_lz::*} to split "%{lastLocation::%player%}'s z coord%" at "."
        set {_lx} to {_lx::1} parsed as int
        set {_ly} to {_ly::1} parsed as int
        set {_lz} to {_lz::1} parsed as int
        set {isMoved} to false
        if {_x} is more than or less than {_lx}:
            set {isMoved} to true
        else if {_y} is more than or less than {_ly}:
            set {isMoved} to true
        else if {_z} is more than or less than {_lz}:
            set {isMoved} to true
        if {isMoved} is true:
            cancel event
    set {lastLocation::%player%} to {_loc}
çok fazla satırdan dolayı lag yapabilirde gereksiz ve çok uzun biraz kısaltılamazmı ?
 

dequay2000

Bir Kömür Göründü Kaptanım!
Katılım
12 Temmuz 2018
Mesajlar
116
Elmaslar
22
Puanlar
0
Yaş
24
Minecraft
dequay
çakmalobide oyuncuyu duraklatıcaksan oyuncuya giriş yaptığında madenci yorgunluğu 100 verirsen hareket edemez sorun çözülür bunun için skript yapmak daha mantıklı.
 

L1T3R4L

Odunlara Vur Vur Vur!

Discord:

Enes'20 | L1T3R4L#1867

Katılım
14 Ocak 2019
Mesajlar
38
Elmaslar
21
Puanlar
0
Yaş
24
Minecraft
L1T3R4L
çok fazla satırdan dolayı lag yapabilirde gereksiz ve çok uzun biraz kısaltılamazmı ?
Satır sayısı = lag - Böyle bir şey yok
Önemli olan bir kodun işlemci ve rama ne kadar yük bindirdiğidir.
 

dequay2000

Bir Kömür Göründü Kaptanım!
Katılım
12 Temmuz 2018
Mesajlar
116
Elmaslar
22
Puanlar
0
Yaş
24
Minecraft
dequay

Natrotm

Yay Yok, İskelet Yok
Katılım
17 Şubat 2019
Mesajlar
320
Elmaslar
159
Puanlar
0
Yer
Mardin
Bu kod sağlıklı bir kod değil.
Çünkü oyuncu yürümese sadece fareyi döndürse bu event çalışacak, bu event bir çok oyuncu tarafından tetikleneceği için sunucuya yük bindirecektir.

Benim kodum daha sağlıklı çalışacaktır.
Kod:
# Development by L1T3R4L

on join:
    if {lastLocation::%player%} isn't set:
        set {lastLocation::%player%} to player's location

on any movement:
    set {_loc} to player's location
    if player is in "cakmalobi":
        set {_x::*} to split "%{_loc}'s x coord%" at "."
        set {_y::*} to split "%{_loc}'s y coord%" at "."
        set {_z::*} to split "%{_loc}'s z coord%" at "."
        set {_x} to {_x::1} parsed as int
        set {_y} to {_y::1} parsed as int
        set {_z} to {_z::1} parsed as int
        set {_lx::*} to split "%{lastLocation::%player%}'s x coord%" at "."
        set {_ly::*} to split "%{lastLocation::%player%}'s y coord%" at "."
        set {_lz::*} to split "%{lastLocation::%player%}'s z coord%" at "."
        set {_lx} to {_lx::1} parsed as int
        set {_ly} to {_ly::1} parsed as int
        set {_lz} to {_lz::1} parsed as int
        set {isMoved} to false
        if {_x} is more than or less than {_lx}:
            set {isMoved} to true
        else if {_y} is more than or less than {_ly}:
            set {isMoved} to true
        else if {_z} is more than or less than {_lz}:
            set {isMoved} to true
        if {isMoved} is true:
            cancel event
    set {lastLocation::%player%} to {_loc}

Variable çöplüğü. Böyle birşey için bu çöplüğü yapmaya gerek yok.
 

Fhalinkz

Tm

Discord:

Fhalinkz#6825

Katılım
5 Şubat 2018
Mesajlar
1.072
Elmaslar
620
Puanlar
16.230
Yaş
21
Minecraft
Fhalinkz
skript-mirror lazım tabi bunu kullanmak için.

Kod:
import:
    org.bukkit.event.player.PlayerMoveEvent
on PlayerMoveEvent:
    world is "world":
    send "yürümesene .s" to event.getPlayer()
    event.setCancelled(true)
 
S

sooply

Ziyaretçi
Onun yerine doğacağı yere görünmez blok koy olur biter. :'D Zaten macera modunda olunca fark edemezler. Eğer ille de skript istiyorum diyorsan, buyur:

Kod:
on any move:
    if world is in "cakmalobi":
        set walk speed to 0
        
on player world change:
    if world of player is "world":
        remove 1 potion from player

Denemedim ama hata yok.
 
Durum
Mesaj gönderimine kapalı.
Neden altınlarını Discord sunucumuzda kazmıyorsun? TIKLA VE KATIL!
Yukarı