#Creating a revive beacon
1 messages ¡ Page 1 of 1 (latest)
{%player%::Lifes} = 5
on death of player:
attacker is a player
if {%victim%::Lifes} <= 0:
wait 1 second
kick the victim due to "&4You are out of Lives."
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {%player%::Lifes} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%player%::Lifes}% Lives"
command /givelife <offlineplayer>:
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives." ```
you can't declare that variable there because there is no player
it works
Have you heard of the lifesteal SMP?
no, because lifesteal is a terrible gamemode that rewards the winners and punishes the losers, making it exponentially harder to win after taking losses
No, like the server that started all of the servers that use it today
that doesn't change how its a terrible gamemode
I understand that but basicaly a revive beacon is something used to revive players. Im making this for my smp
on rightclick on beacon:
If i have a custom item for that would it be on rightclick on (itemId):
?
without parenthesis
on rightclick on (whatever block you're clicking)
then add a condition underneath that checking if the player's tool is (whatever item you want)
ohh wait i see thank you!
but how would i choose the player to revive? Im not the best at this as you can see.
I have never heard a truer statement
its not entirely going to be lifesteal though so yk
Yeah
Im adding custom weapons a few other things
nice
i just dont know how they choose what player to revive
i just started coding script last week\
So you right cliick a beacon and it gives you the option to revive somebody else?
From being kicked?
from deathban yes
this is a death ban
Thats what i want to do but i dont know if it will work well.
or how to do it
Well, idk if it's possible to set so many slots if there's like a thousand people dead
but
what you would do is
when they first get kicked
no, its a small private smp
alralr
when they first get banned, add 1 to a count variable, such as {skriptkicked}
And also add the player to a list such as {skriptplayerskicked::*}
Then when that's there
uhh
like this
?
when they get kicked
add 1 to {kickedcountsk}```
Yeah just set {kickedcountsk} in the variables section to 0
attacker is a player
if {%victim%::Lifes} <= 0:
wait 1 second
kick the victim due to "&4You are out of Lives."
else if {%victim%::Lifes} > 1:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
add player to {skplayerskicked::*}
add 1 to {kickedcountsk}```
but
so when you kick them it adds to that count
yea
fixed
alr
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}```
Now you get your detection system of the beacon
Why're you sending that they can't?
That was temp
ah alr
just add a comment or sumn if you want to have a temporary
whatever
So now you want to open up a metadata tag GUI
You know how to do that
right
no đ i havent learned any ui
like set metadata tag "reviveGUI" of player to chest inventory with 7 rows
after the right click on beacon
ok
here you should read this
probably the best tutorial ever
This video is made in 1.17.1 (Aug 2021)
Here is a video on how to create a GUI using NO Addons! This is a 100% Vanilla Skript GUI.
đFollow me on twitter ⤠https://twitter.com/FanStaaff
đ§ĄFollow me on Instagram ⤠https://instagram.com/FanStaaff
đJo...
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player``` so this opens it for the player
what do i do about revival?
@steep mesa
mb
I was afk
uhhhhh
well
you need to set the slots
which would be
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}'s skull```
I believe
what about the revive part
wdym
like when they click that slot
Oh that'll be in a bit
it revives them
it's on inventory click
but each slot
ah
that's true
hmmmmm
well
wait a minute
I messed up wait lol
I have no idea how you would do that lemme think
lmk if you find somthing
I'm on the verge of it
ok
find anything?
not yet
alr
i assume this is a lifesteal thing?
you can place a beacon and then select a dead person to bring back?
somewhat
yeah
{%player%::Lifes} = 5
{kickedcountsk} = 0
on death of player:
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {%player%::Lifes} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%player%::Lifes}% Lives"
command /givelife <offlineplayer>:
permission: op
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
permission: op
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives."
on rightclick on beacon:
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player
loop {kickedcountsk} times:
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}1```
yes
and youre displaying the players in a gui?
yes
oih wait
you gotta name the skull
my bad
I'll let you do this cause I gotta go afk
you can do that but if theres more players than slots it'll be more work to make pages than to just have them enter the name in an anvil or something
but i do like the visual heads
its a private smp so heres like 20 ppl so its a large enough ui
yes
so then you can use the name of the skull to get them
are they the index or value
or
add player's uuid to {dead::*}```
Each slot tho
they are value i think
yeah
skim the code
{%player%::Lifes} = 5
{kickedcountsk} = 0
on death of player:
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {%player%::Lifes} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%player%::Lifes}% Lives"
command /givelife <offlineplayer>:
permission: op
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
permission: op
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives."
on rightclick on beacon:
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player
loop {kickedcountsk} times:
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}```
i would use {lives::%player's uuid%} and not {%player%::lives}
- the
uuidis like a serial number for a minecraft account {variable::%player%}would (for me) ={variable::x8ight}. Then, if I were to change my username to "bob", any time my information is accessed or saved it will go to{variable::bob}instead of anyhting already saved in{variable::x8ight}(basically if someone changes their username it will wipe their stuff, but a uuid only cares if they are on the same account)- putting "lives" before the player makes the player an index in this case, so you can loop it.
exloop {lives::*}: set loop-value to 100 send "Your life count was set to 100!" to loop-indexyou cant do this if its `{%player%::stuff}
Ok, well what about the revival system?
if you add player's uuid to {deadPlayers::*} when they are dead i would just
set slot {_n} to loop-value's skull```
But what about the revival part because there is no on click
Wdym?
like revival
On inventory click?
You use that event, then get the name of the item they clicked on; â%player%âs headâ, then you just have to remove the ââs headâ
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}
So this works right
it should?
@steep mesa ok help?
read what he said and put it into simple form?
get the hell outa my post
yoou have no use here you cant help me in any way.
u got in my post and cussed like crazy so why should I get out of yours
no
Laughing out loud
you cuss in my post
bro im gonna call a mod in
I can call a mod
alr
there are no rules against cussing i dont think
They could block it
they could if they wanted
no rules against cussing
can you stop pinging in replies
who me?
np
Alr sry but please just leave you couldve asked me to leave i wouldve
spelt
going to bed?
not yet
reply to my messages and leave @on
alr
you can just say @ on
lol
Anyway
basically you can name the skull
Like
"%{whatever::%loop-value%}%"
and then
It'll put the player's name in there
and then you get the name of the event-item in the on inventory click event and add a life to that player (Or whatever you want to do

But "%{whatever::%loop-value%}%" is hella confusing
variables:
{lives::%player's uuid%} = 5
{kickedcountsk} = 0
on death of player:
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player's uuid to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {lives::%player's uuid%} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%lives::%player's uuid%}% Lives"
command /givelife <offlineplayer>:
permission: op
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
permission: op
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives."
on rightclick on beacon:
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player
loop {kickedcountsk} times:
set slot loop-value - 1 of metadata tag "reviveGUI" of playerâs head to {skplayerskicked::%loop-value%}
on inventory click:
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}'s skull named "%{skplayerskicked::%loop-value}%"
for on inventory click:
no
i just want a pointer
I can't give a pointer I don't know how without your code first lol
You have to check the name of event-slot I think
{lives::%player's uuid%} = 5
{kickedcountsk} = 0
on death of player:
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player's uuid to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {lives::%player's uuid%} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%lives::%player's uuid%}% Lives"
command /givelife <offlineplayer>:
permission: op
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
permission: op
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives."
on rightclick on beacon:
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player
loop {kickedcountsk} times:
set slot loop-value - 1 of metadata tag "reviveGUI" of playerâs head to {skplayerskicked::%loop-value%}
on inventory click:
wait why is the on inventory click indented
You then check the name of the item in that slot
And if the list contains that item
then you give that player
the one life
how do i checl the name of an item?
I think it's name of event-slot
I don't know tho
Guess you gotta https://tryitands.ee
Yep
Use the parser if you want it's very useful
so useful dude
It literally just parses your code
So you don't have to paste the skript
its better to do it on your own server if its already running
if event-inventory = (metadata tag "reviveGUI" of player):
add 1 to name of event-slot```
is this right?
but if you don't feel like booting one up or aren't able to, the parser is better than nothing
i can test it very fast
yeah true
Error on
Line 2
Goto Line
Can't understand the type 'player's uuid'
{lives::%player's uuid
Error on
Line 10
Goto Line
indentation error: expected 8 spaces, but found 12 spaces
add player's uuid to {skplayerskicked::*}
Error on
Line 22
Goto Line
Invalid amount or placement of brackets. Please make sure that each opening bracket has a corresponding closing bracket.
message "&7You Have %{%lives::%player's uuid%}% Lives"
Warning on
Line 40
Goto Line
Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
loop {kickedcountsk} times:
Error on
Line 41
Goto Line
indentation error: expected 8 spaces, but found 2 spaces
set slot loop-value - 1 of metadata tag "reviveGUI" of playerâs head to {skplayerskicked::%loop-value%}
Warning on
Line 42
Goto Line
Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
on inventory click:
Error on
Line 43
Goto Line
can't understand this event: 'if event-inventory = (metadata tag "reviveGUI" of player)'
if event-inventory = (metadata tag "reviveGUI" of player):
god damn
You forgot to close it
i didnt
And your indentation is messed up
{lives::%player's uuid%} = 5
variables:
{lives::%player's uuid%} = 5
{kickedcountsk} = 0
Ohhh
Oh wait , right?
I don't know why, but I've had an error where you can't set a var for player's uuid for some reason
in variables section
Just set it on first join
so
{lives::%player's uuid%} isn't set
set {lives::%player's uuid%} to 5```
And remove it from the variables section
message "&7You Have %{%lives::%player's uuid%}% Lives"```
oops
Can't understand this condition/effect: set slot loop-value - 1 of metadata tag "reviveGUI" of player`s head to {skplayerskicked::%loop-value%} set slot loop-value - 1 of metadata tag "reviveGUI" of player`s head to {skplayerskicked::%loop-value%}
nothing
.
you messed up
you typed 'of player's head'
the name of event-slot can't have anything added to it
add 1 to name of event-slot
Alr
alr
add 1 to {lives::name of event-slot}``` thought this might work but no ```add 1 to {lives::name of event-slot}```
set slot loop-value - 1 of metadata tag "reviveGUI" of player to {skplayerskicked::%loop-value%}'s skull named "%{skplayerskicked::%loop-value}%"```
i have no idea what im doing đ
whatever lol
fixed
I fixied all of it
Fully functional?
havent tested yet i need somone to help
test
oops mb didnt mean to ping
alr
{lives::%player's uuid%} = 5
{kickedcountsk} = 0
on death of player:
attacker is a player
if {%victim%::Lifes} <= 1:
wait 1 second
kick the victim due to "&4You are out of Lives."
add player's uuid to {skplayerskicked::*}
add 1 to {kickedcountsk}
else if {%victim%::Lifes} > 0:
remove 1 from {%victim%::Lifes}
add 1 to {%attacker%::Lifes}
on join:
if {lives::%player's uuid%} <= 0:
wait 2 seconds
kick the player due to "&4You are out of Lives. You cannot join back until someone has revived you."
command /Lives:
trigger:
message "&7You Have %{%lives::%player's uuid%}% Lives"
command /givelife <offlineplayer>:
permission: op
trigger:
add 1 to {%arg-1%::Lifes}
message "&7Gave 1 Life to %arg-1%"
command /removelife <offlineplayer>:
permission: op
trigger:
if {%arg-1%::Lifes} > 0:
remove 1 from {%arg-1%::Lifes}
message "&7Took 1 Life from %arg-1%"
else:
message "&4Cannot remove a life from %arg-1%. They are already out of lives."
on rightclick on beacon:
set metadata tag "reviveGUI" of player to chest inventory with 7 rows named "&4 Revival Gui "
open (metadata tag "reviveGUI" of player) to player
loop {kickedcountsk} times:
set slot loop-value - 1 of metadata tag "reviveGUI" of playerâs head to {skplayerskicked::%loop-value%}
on inventory click:
if event-inventory = (metadata tag "reviveGUI" of player):
add 1 to name of event-slot```
BRO
any errors?
ima go to sleep
K
gn