Jump to content

if anyone needs a skript


ghostjusr

Recommended Posts

hi

i want a skript when you do /freerank

it executes

lp user %player% parent set free

and if they dont have permssion to do it

send a message saying

&c&lYou already have a rank!

 

ive tried to skript this myself but i am not very good at it 😅

Link to comment
Share on other sites

options:
	permission: skript.permission

command /freerank:
	trigger:
		if player has permission "{@permission}":
			execute console command "/lp user %player% parent set free"
		else:
			send "&c&lYou already have a rank!"

change skript.permission to the permission required to execute the command

Edited by ApexSplat

Discord: Dead#6905

Love anime!


Anime Gifs

Link to comment
Share on other sites

hi

 

i need a skript where u can upgrade ur pickaxe so when u right click with the pickaxe it opens a gui where theres any item in the middel and when u click on it enchant the pickaxe with efficiency 1 at the time and u max upgrade is 5

 

idk if im asking for too much code but its fine if u dont want to give or make it to me

Link to comment
Share on other sites

on right click with pickaxe:
    set metadata tag "pickaxe" of player to chest inventory with 5 rows named "&6&lUpgrade":
    set {_x} to 0
    loop 54 times:
        set slot {_x} of metadata tag "pickaxe" of player to black stained glass pane
        add 1 to {_x}
    set {_level} to level of efficiency of player's tool
    set {_type} to type of player's tool
    set slot 22 of metadata tag "pickaxe" of player to {_type} of efficiency {_level} + 1 named "&6&lUpgrade"
    open (metadata tag "pickaxe" of player) to player

on inventory click:
    if event-inventory = (metadata tag "pickaxe" of player):
        cancel event
        if index of event-slot is 22:
            set {_level} to level of efficiency of player's tool
            if {_level} isn't 5:
                enchant player's tool with efficiency {_level} + 1
            else:
                send "You have reached the max upgrade of 5!"
            close player's inventory

not tested

Discord: Dead#6905

Love anime!


Anime Gifs

Link to comment
Share on other sites

Hi

 

im very bad at skript and been looking everywhere but i cant find a skript so i thought i will ask someone here if they can make it for me.
So basically the server does keyall everytime that the amount of online players is doubled, Ex: theres 1 player and when another one joins a key all is done and then when 2 more players join another key all is done etc

Link to comment
Share on other sites

2 hours ago, KarateBlade said:

yea if you could make it like that

on join:
    set {_online} to amount of online players
    set {_power} to 1
    set {_num} to 2
    while {_num} != {_online}:
        wait 1 tick
        set {_num} to {_num}^{_power}
        if {_num} > {_online}:
            stop
        add 1 to {_power}
    execute console command "/" # Put the command executed for the key all here

not tested

Edited by ApexSplat

Discord: Dead#6905

Love anime!


Anime Gifs

Link to comment
Share on other sites

  • 1 month later...

DNAbuckle86 this is the lifesteal+afk skript

on first join:
  set {hearts::%player%} to 10
  set {afk::%player%} to false
  set {maxhealth} to 100

every 5 ticks:
  loop all players:
    if {hearts::%loop-player%} is 0:
      broadcast "&4&l%loop-player% &r&4was banned because they ran out of hearts!"
      make console execute command "/ban %loop-player% &cYou ran out of hearts! You will be unbanned in three weeks."
      wait 30420 minutes
      make console execute command "/pardon %loop-player%"
    set loop-player's max health to {hearts::%loop-player%}

every 20 minutes:
  loop all players:
    if {afk::*} contains loop-player:
      give loop-player phantom membrane named "&cHeart"

on rightclick:
  if player's tool is phantom membrane named "&cHeart":
    if {hearts::%player%} is less than {maxhealth}:
      remove 1 phantom membrane named "&cHeart" from the player
      add 1 to {hearts::%player%}

on death:
  victim is a player
  remove 1 from {hearts::%victim%}
  attacker is a player
  if {hearts::%attacker%} is less than {maxhealth}:
    add 1 to {hearts::%attacker%}
  if {hearts::%attacker%} is {maxhealth}:
    send "&cYou are at full hearts! The heart item will be put into your inventory." to player
  if {hearts::%attacker%} is more than {maxhealth}:
    set {hearts::%attacker%} to 100
    send "&cYou are at full hearts! The heart item will be put into your inventory." to player
    if player can hold phantom membrane named "&cHeart":
      send "&cYou are at full hearts! The heart item will be put into your inventory." to player
      give player phantom membrane named "&cHeart"
    else:
      send "&cYou are at full hearts, and your inventory is full. The item will be dropped on the ground." to player
      drop phantom membrane named "&cHeart" at attacker

command /withdraw [<integer>]:
  usage: /withdraw [<amount>]
  executable by: players
  trigger:
    if arg-1 is set:
      if arg-1 is more than {hearts::%player%}:
        if player can hold arg-1 of phantom membrane named "&cHeart":
          send "&cYou are at full hearts!" to player
          give player phantom membrane named "&cHeart"
        else:
          send "&cYou are at full hearts, and your inventory is full. The heart has been dropped on the ground."
          drop phantom membrane named "&cHeart" at player

command /afk:
  executable by: players
  trigger:
    teleport player to AFK AREA COORDS
    send "&aYou are now AFK. Use /spawn to go back to spawn." to player
    set {afk::%player%} to true

command /spawn:
  executable by: players
  trigger:
    teleport player to SPAWN COORDS
    send "&aTeleported to spawn." to player
    set {afk::%player%} to false

set SPAWN COORDS and AFK AREA COORDS to the coordinates of the spawn and AFK area.

The code is untested but it doesn't have any errors

Link to comment
Share on other sites

  • 3 weeks later...
On 7/19/2023 at 2:41 PM, ghostjusr said:
command /afk:
  executable by: players
  trigger:
    teleport player to AFK AREA COORDS
    send "&aYou are now AFK. Use /spawn to go back to spawn." to player
    set {afk::%player%} to true

It doesn't work for me, says that teleport is an unknown condition.

Do I have to install any addons to skript?


PS. Your formatting is horrible (no offence)

hi; just gamin


Working on my biggest project yet, a full skywars server.

Read more about it here.

 

Link to comment
Share on other sites

  • 1 month later...
On 5/5/2023 at 1:38 AM, ghostjusr said:

If anyone needs help making scripts or needs one to be created but doesn't know how you can just reply here and I can help.

🙂

yes please is there any way to make a skript for a shop gui   where u do /shop where when somone has full netherite they can trade the nethite armour + netherite sword for 0.5hp (red dye) instead or  a (sunflower acting as coin ) for 20k in money or (Gold apple or god apple)they heal 0.1 per hit they deal on a player . if you could do this it would be much appreciated if its to hard then let me know ( im knew to skripting )

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...