Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # # # # # # # # # # # # # #
- # !WarpsPlus #
- # Author: krzysek #
- # Version: 1.0 #
- # #
- # Do not edit code ! #
- # ( But options :) ) #
- # #
- # Depends: #
- # - Skript 2.0.2 #
- # (or better) #
- # #
- # Script will be better #
- # works if your Skript #
- # plugin has been #
- # connected to database #
- # # # # # # # # # # # # # #
- Options:
- #Time after player has been teleported to warp
- TeleportWaitTime: 5 # in seconds
- Command /warpsplus [<text>] [<text>]:
- aliases: warpsp, warpp, wsp
- description: WarpsPlus commands ;)
- trigger:
- if argument 1 isn't set:
- message "&4Correct usage: &f/warpp create/move/delete/teleport/list/help"
- stop
- else:
- set {_arg1} to "%argument 1%"
- if {_arg1} is "help":
- message "&5===============[&6&lWarpsPlus&5]==============="
- message "&5 + &6/warpp create [name] &f- &6Create a new warp."
- message "&5 + &6/warpp move [name] &f- &6Move a location of warp to yours."
- message "&5 + &6/warpp delete [name] &f- &6Delete a warp."
- message "&5 + &6/warpp teleport [name] &f- &6Teleport to the warp."
- message "&5 + &6/warpp list &f- &6List of all warps."
- message "&5 + &6/warpp help &f- &6Help."
- message "&5===============[&6&lWarpsPlus&5]==============="
- stop
- if {_arg1} is "create":
- if player has permission "warpp.create" or "warpp.*":
- if argument 2 isn't set:
- message "&4Correct usage: &f/warpp create [name]"
- stop
- else:
- set {_arg2} to "%argument 2%"
- if {warpp::%{_arg2}%} is set:
- message "&5[&6&lWarpsPlus&5] &4Warp with this name is arleady exists !"
- stop
- else:
- set {warpp::%{_arg2}%} to location of player
- add "%{_arg2}%" to {warpp::list::*}
- message "&5[&6&lWarpsPlus&5] &2Warp %{_arg2}% has been created !"
- stop
- else:
- message "&4You don't have permission to this command !"
- stop
- if {_arg1} is "move":
- if player has permission "warpp.move" or "warpp.*":
- if argument 2 isn't set:
- message "&4Correct usage: &f/warpp move [name]"
- stop
- else:
- set {_arg2} to "%argument 2%"
- if {warpp::%{_arg2}%} isn't set:
- message "&5[&6&lWarpsPlus&5] &4Warp with this name isn't exists !"
- stop
- else:
- delete {warpp::%{_arg2}%}
- wait 1 tick
- set {warpp::%{_arg2}%} to location of player
- message "&5[&6&lWarpsPlus&5] &2Warp %{_arg2}% has been moved to yours location."
- stop
- else:
- message "&4You don't have permission to this command !"
- stop
- if {_arg1} is "delete":
- if player has permission "warpp.delete" or "warpp.*":
- if argument 2 isn't set:
- message "&4Correct usage: &f/warpp delete [name]"
- stop
- else:
- set {_arg2} to "%argument 2%"
- if {warpp::%{_arg2}%} isn't set:
- message "&5[&6&lWarpsPlus&5] &4Warp with this name isn't exists !"
- stop
- else:
- delete {warpp::%{_arg2}%}
- remove "%{_arg2}%" from {warpp::list::*}
- message "&5[&6&lWarpsPlus&5] &2Warp %{_arg2}% has been deleted !"
- stop
- else:
- message "&4You don't have permission to this command !"
- stop
- if {_arg1} is "teleport":
- if player has permission "warpp.teleport" or "warpp.*":
- if argument 2 isn't set:
- message "&4Correct usage: &f/warpp teleport [name]"
- stop
- else:
- set {_arg2} to "%argument 2%"
- if {warpp::%{_arg2}%} isn't set:
- message "&5[&6&lWarpsPlus&5] &4Warp with this name isn't exists !"
- stop
- else:
- set {_time} to {@TeleportWaitTime}
- if {player::%player%::teleport} is set:
- message "&5[&6&lWarpsPlus&5] &4You are arleady in teleportation !"
- stop
- else:
- set {player::%player%::teleport} to location of player
- message "&5[&6&lWarpsPlus&5] &2Teleporting to %{_arg2}% Warp..."
- wait {@TeleportWaitTime} seconds
- if location of player isn't {player::%player%::teleport}:
- message "&5[&6&lWarpsPlus&5] &4You moved ! Teleportation cancelled !"
- stop
- else:
- teleport player to {warpp::%{_arg2}%}
- delete {player::%player%::teleport}
- message "&5[&6&lWarpsPlus&5] &2You has been teleported to %{_arg2}% Warp."
- stop
- else:
- message "&4You don't have permission to this command !"
- stop
- if {_arg1} is "list":
- if player has permission "warpp.list" or "warpp.*":
- if {warpp::list::*} isn't set:
- message "&5[&6&lWarpsPlus&5] &4No warp exists !"
- stop
- else:
- message "&5===============[&6&lWarps&5]==============="
- message "&6%{warpp::list::*}%"
- message "&5===============[&6&lWarps&5]==============="
- stop
- # Sign support
- On sign change:
- if line 1 is "[warpp]":
- if line 2 is "teleport":
- if line 3 is "":
- set line 1 to "&4Incorrect"
- set line 2 to "&4Sign"
- set line 3 to "&4Syntax"
- set line 4 to "&4!"
- stop
- else:
- set line 1 to "[&6&lWARPP&0]"
- set line 2 to "&2Teleport"
- set line 3 to "%line 3%"
- set line 4 to "created"
- wait 1 second
- set line 4 to " "
- stop
- On right click on sign:
- if line 1 is "[&6&lWARPP&0]":
- if line 2 is "&2Teleport":
- if line 3 is "":
- message "&4Incorrect syntax !"
- stop
- else:
- execute player command "warpp teleport %line 3%"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement