#Skript dont work

1 messages · Page 1 of 1 (latest)

near oracle
#
  1. If nothing happens, its probably because the condition doesnt pass. You can broadcast the variable and stuff to debug.
  2. instead of setting {kodBasladi} to false, you can delete it to save (a bit of) storage space.
  3. Instead of broadcasting multiple messages, you can broadcast 1 and use %newline% to have multiple lines.
  4. the stop at the very end does nothing
meager tartan
#

btw its working on my test server but dont work in main

near oracle
meager tartan
near oracle
# near oracle 1. If nothing happens, its probably because the condition doesnt pass. You can b...
  1. If nothing happens, your if statement on line 8 fails.
  2. You can delete the variable, and then check if its set or not set. This way, it wont ever be set to false, as even when set to false, the variable is still set, and has a value and takes up storage.
  3. you can send multiple lines in one message, like so:

#: or

add "Line 1" to {_send::*}
add "Line 2" to {_send::*}
add "Line 3" to {_send::*}
send (join {_send::*} by newline) to player```4.  The periodical event has already run, and will do nothing for another hour. the stop stops nothing from running
meager tartan
near oracle
#

you cant

#

and each player's chat width is client-sided too

meager tartan
meager tartan
#
    prefix: §x§F§1§1§D§2§8§lN§x§F§D§3§A§2§D§lO§x§F§E§6§1§2§C§lS§x§F§F§8§7§2§C§lE§x§F§F§A§1§2§C§lR
command /kelimeoyunu:
    permission: km.admin
    permission message: &cBunu yapmak için yetkin yok!
    trigger:
        set {kodlar} to a random integer between 1 and 999999999999
        set {kodBasladi} to true
        broadcast "%newline%                             {@prefix}%newline%&8&m-------------------------------------------%newline%%newline%&r               &7Kodu Ilk Yazan &aÖdül &7Kazanir!%newline%&7                    &7Kod: &e%{kodlar}%%newline%%newline%&8&m-------------------------------------------%newline%" 

on chat:
    if {kodBasladi} is true:
        if message is "%{kodlar}%":
            wait 5 tick
            broadcast centered "{@prefix} &7» &a%player% &fKelime oyununu kazandı."
            set {kodBasladi} to false
            execute console command "/eco give %player% 1500"

every 60 minute:
    execute console command "kelimeoyunu"```
near oracle
#
  1. {_kodgecici.%player%} is a local variable, and if you dont define it in this code block, it wont have any value
  • I'm also not sure this variable, or even {kodlar.%{_kodgecici.%player%}%} does to make this snippet of code functional.
  • You should also be in the habit of using list variables, replace all . with :: in variable names. This makes the variables much more versatile and easy to work with.
  1. as I said earler, you can just delete the variable. change set {kodBasladi} to false to delete {kodBasladi}
meager tartan
# near oracle 1. `{_kodgecici.%player%}` is a local variable, and if you dont define it in *th...
    prefix: §x§F§1§1§D§2§8§lN§x§F§D§3§A§2§D§lO§x§F§E§6§1§2§C§lS§x§F§F§8§7§2§C§lE§x§F§F§A§1§2§C§lR
    bos: §8§m-------------------------------------------
command /kelimeoyunu:
    permission: km.admin
    permission message: &cBunu yapmak için yetkin yok!
    trigger:
        set {kodlar} to a random integer between 1 and 999999999999
        set {kodBasladi} to true
        broadcast "%newline%                             {@prefix}%newline%{@bos}%newline%%newline%&r               &7Kodu Ilk Yazan &aÖdül &7Kazanir!%newline%&7                    &7Kod: &e%{kodlar}%%newline%%newline%{@bos}%newline%" 

on chat:
    if {kodBasladi} is true:
        if message is "%{kodlar}%":
            wait 5 tick
            broadcast  "{@prefix} &7» &a%player% &fKelime oyununu kazandı."
            execute console command "/eco give %player% 1500"
            delete {kodBasladi}

every 60 minute:
    execute console command "kelimeoyunu"```
#

like this? I'm having a little trouble understanding. Sorry, I may have bothered you a little too much.

near oracle
#

that looks good

meager tartan
meager tartan
#

@near oracle um sorry but can u help me again?

near oracle
#

if you tell me what it is you need help with

meager tartan
#
    if attacker is player:
        if victim's name is "{@ejderhaisim}":
            ejderentity("%attacker%" parsed as player, victim, damage)

function ejderentity(p: player, e: entity, d: number):
    add {_d} to {hasar::%{_p}%}
    send action bar "&eEjderhanın Canı &f: &a[&c&l%health of {_e}%&a]" to {_p}

on death of ender dragon:
    if victim's name is "{@ejderhaisim}":
        ejderhead("%attacker%" parsed as player, victim)

function ejderhead(p: player, e: entity):
    broadcast "{@prefix} &c Ejderha {@ejderhaisim} öldü.&f End dünyası 5 dakika daha açık kalacak." 
    set {_top::*} to (sorted indexes of {hasar::*} in descending order)
    send "                            &cKAZANANLAR                                   %newline%         &b&lEjderhayı Öldüren &f: &4&l%{_p}%                   %newline%%newline%&2(&61&2). &b%{_top::1}% - &5%{hasar::%{_top::1}%}%%newline%&2(&62&2). &b%{_top::2}% - &5%{hasar::%{_top::2}%}%%newline%&2(&63&2). &b%{_top::3}% - &5%{hasar::%{_top::3}%}%" to all players in world {ejderhadunya}
    make console execute command "aquacoins:coins give %{_top::1}% {1odul}"
    make console execute command "aquacoins:coins give %{_top::2}% {21odul}"
    make console execute command "aquacoins:coins give %{_top::2}% {3odul}"
    delete {hasar::*}
    teleport all players in world {ejderhadunya} to {ejderhason}```
#

function ejderhead dont work

cursive swan
meager tartan
#

but itss dont work

#

doont send any message

near oracle
#

thats why you should debugit

#

also, why the check are you checking if the attacker is a player, adn then parsing it as a player?

meager tartan
near oracle
#

thats better, sure

#

also, this is really just a massive wall of text. you can put an empty line inbetween structures to make it easier to read

near oracle
#

this is twice now that all you've said is "doesnt work"

#

you need to provide more information

#

what lines, and what errors

meager tartan
near oracle
#

if there's no error messages, that means your logic doesnt work the way you intended

near oracle
meager tartan
near oracle
#

okay,

#

is the option defined? In that script?

meager tartan
near oracle
#

broadcast it

meager tartan
#

okey

meager tartan
near oracle
#

what happens?

meager tartan
#

sended in chat without any problems

#

Is it possible that a dead creature cannot have a name?

near oracle
#

send the line where you broadcasted it

meager tartan
near oracle
#

no

#

just that line

meager tartan
#
    ejderhacan: 1
    ejderhaisim: &c&lDissiz
    prefix: §x§F§1§1§D§2§8§lN§x§F§D§3§A§2§D§lO§x§F§E§6§1§2§C§lS§x§F§F§8§7§2§C§lE§x§F§F§A§1§2§C§lR &7»&f
    1odul: 100
    2odul: 50
    3odul: 25
    dunyamain: ejderha
    kopyadunya: ejderha2
variables:
    {hasar::*} = 0

command ejderdeneme:
    trigger:
        broadcast "{@ejderhaisim}"```
near oracle
#
    broadcast "%victim's name% | {@ejderhaisim}"
    if attacker is player:
        if victim's name is "{@ejderhaisim}":
            ejderentity(attacker, victim, damage)```see what this says
meager tartan
near oracle
#

try "%unformatted victim's name% | %unformatted {@ejderhaisim}%"

meager tartan
near oracle
#

try comparring the unformatted versions

#

or use regexes/partially matches

meager tartan
#

i didnt understand

#

ejderhaisim: &rDissiz

#

dont have any format

meager tartan
near oracle
meager tartan
#

yeah i changed for try

meager tartan
#

@near oracle Since the Ender Dragon would lose its name at the moment of death, could it be that it is not being detected in the code?

near oracle
meager tartan
near oracle
#

well, the damage event will be called on death too, so you dont even need the death event

meager tartan
near oracle
meager tartan
near oracle
#

yes

#

so the damage event calls the function, so the function is called on death anyways.
if you wanted to do something else in addition to the function on death, you can just add that under the on death event, but theres no need for the function in that event

meager tartan
#

If this what u said , I don't understand what you mean.

near oracle
#

ohh, sorry. I didnt read the code too closely and though you were calling the same function in both events

meager tartan
#

I will remove line victim's name is "{@ejderhaisim}": since the name is lost. Additionally, I provide the dragon with a glow effect using code: make console execute command "/execute run effect give @e[type=minecraft:ender_dragon,name=Dissiz] minecraft:glowing infinite". Is there an alternative way to glow it? I want the glow to be purple.

near oracle
#

there's probably a glow effect on the docs

meager tartan
near oracle
#

you tried

#

and?

meager tartan
#

dont work :/

#

maybe i used wrong

near oracle
meager tartan
#

I don't understand how to use the code in the docs...

near oracle
#

you can copy paste that example and see if it works

meager tartan
near oracle
#

because thats a text

#

not an entity

#

you'd need to refer to the entity through an expression, likely event-entity or victim, or through a variable or some other form of storage

meager tartan
near oracle
#

whenever you spawn the dragon, and wait 500s.