- If nothing happens, its probably because the condition doesnt pass. You can broadcast the variable and stuff to debug.
- instead of setting
{kodBasladi}to false, you can delete it to save (a bit of) storage space. - Instead of broadcasting multiple messages, you can broadcast 1 and use
%newline%to have multiple lines. - the stop at the very end does nothing
#Skript dont work
1 messages · Page 1 of 1 (latest)
I'm new to scripting. I didn't understand much. when u dont busy can u send me edited version?
btw its working on my test server but dont work in main
Then your biggest priority should be learning and improving. Me doing the work for you wont help with that
Actually, I was planning to continue learning by using yours as an example. I didn't quite understand what you meant. Could you provide a different example rather than this code?
- If nothing happens, your if statement on line 8 fails.
- 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.
- 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
How can I center the message on the line?
hmm ty
I did as much as I understood.
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"```
{_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.
- as I said earler, you can just delete the variable. change
set {kodBasladi} to falsetodelete {kodBasladi}
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.
that looks good
oh finally ty for help 🙂
@near oracle um sorry but can u help me again?
if you tell me what it is you need help with
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

when i reload, i dont take error 🙂
but itss dont work
doont send any message
thats why you should 
also, why the check are you checking if the attacker is a player, adn then parsing it as a player?
if attacker is player:
if victim's name is "{@ejderhaisim}":
ejderentity(attacker, victim, damage)```
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
Okey. but its dont work 😦
this is twice now that all you've said is "doesnt work"
you need to provide more information
what lines, and what errors
Am I wrong? Shouldn't I get the error when I reload the code?
if there's no error messages, that means your logic doesnt work the way you intended
the easier your code is to read, the easier it is to debug
if victim's name is "{@ejderhaisim}": have problem in this line
{@ejderhaisim} defined
broadcast it
okey
done np
what happens?
sended in chat without any problems
Is it possible that a dead creature cannot have a name?
send the line where you broadcasted it
Should I send all the code directly?
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}"```
broadcast "%victim's name% | {@ejderhaisim}"
if attacker is player:
if victim's name is "{@ejderhaisim}":
ejderentity(attacker, victim, damage)```see what this says
try "%unformatted victim's name% | %unformatted {@ejderhaisim}%"
i tried but gived error and i delete format codes
and same names when i try
here is &r, not &c&l
yeah i changed for try
in here it was &c&l
@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?
this is proof it doesnt "lose" the name
but we used in the damage not dead
.
damage of ender dragon
well, the damage event will be called on death too, so you dont even need the death event
but i need to death event for function ejderhead
i tried this
my point was that the damage event will run the same code, at the same time as the death
i didnt understand. since I killed the dragon by dealing damage, both of them will work at the same time?
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
But their purposes are very different. While one shows the remaining health when we deal damage, the other displays the top 3 players who dealt the most damage when the dragon dies.
If this what u said , I don't understand what you mean.
ohh, sorry. I didnt read the code too closely and though you were calling the same function in both events
np 😄
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.
there's probably a glow effect on the docs
i tried

I don't understand how to use the code in the docs...
you can copy paste that example and see if it works
set glowing of {@ejderhaisim} to true i tried this
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
hmm ok i will try. Last question. I couldn't think of this very well. How do I make it trigger an event if the dragon cannot be killed within 500 seconds
whenever you spawn the dragon, and wait 500s.