Jump to content

xcfgdfg

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by xcfgdfg

  1. variables:
    	{joins.global} = 0
    
    
    
    on first join:
    	add 1 to {joins.global}
    	broadcast "&3&lWELCOME &b%player%&f has joined for the first time! &8(&7##%{joins.global}%&8)"
    on join:
    	broadcast "&8[&a+&8] &b%player%&f has joined."
    on quit:
    	broadcast "&8[&c-&8] &b%player%&f has quit."  

     

  2. on load:
    	set {item} to stick named "Waypoint"
    
    on right click holding {item}:
    	set {waypoint} to player's location		# (if this doesnt work, you could replace location with coordinates)
    	wait 1 second
    
    	teleport player to {waypoint}
    	loop players within 5 meters of the player:
    		teleport loop-player to {waypoint}

    I would suggest adding a cooldown to the feature, since it could be spammed like in milliseconds.

     

    With cooldown:

    on load:
    	set {item} to stick named "Waypoint"
    	set {cooldown.%player%} to false
    
    on right click holding {item}:
    	if {cooldown.%player%} is true:
    		send "You are on cooldown!" to player
    		stop
    
    	if {cooldown.%player%} is false:
    		set {cooldown.%player%} to true
    		set {waypoint} to player's location		# (if this doesnt work, you could replace location with coordinates)
    		wait 1 second
    
    		teleport player to {waypoint}
    		loop players within 5 meters of the player:
    			teleport loop-player to {waypoint}
    		set {cooldown.%player%} to false
    		stop

    ^ You could also add that on join the player's cooldown is reset, in the case they leave the server while on cooldown. (I think that affects it, but im noit sure)

  3. on load:
    	set {cooldown.%player%} to false
    
    on right click on entity holding amethyst shard:
    	if {cooldown.%player%} is true:
    		send "You are on cooldown!" to player
    		stop
    	if {cooldown.%player%} is false:
    		send "&4Lift power used!" to player
    		push entity up at speed 2.5
    		push entity in direction of player at speed 1
    		wait 1 second
    		push entity down at speed 2.5
    # COOLDOWN #
    		set {cooldown.%player%} to true
    		wait 2 seconds
    		set {cooldown.%player%} to false

    This could be one way. With this your cooldown is 2 seconds, and every player gets their cooldown reset every time the skript is reloaded or the server is restarted too. (you might wanna make it on join if you are worried about them leaving before the cooldown is out)

  4. on load:
    	set {hammer} to iron axe named "&6Jail Hammer"
    	set {jail} to location 63, 105, 29 in world "world"
    
    on attack:
    	if victim is a player:
    		if attacker is a player:
    			if attacker is holding {hammer}:
    				teleport victim to {jail}
    				stop

    This is how I'd do it. Note that most Skript I know is 1.18.2

    On load: when the skript is loaded (server startup, skript reload)
    On attack: when anentity attacks another entity

×
×
  • Create New...