Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 15.36 KB | None | 0 0
  1. command event [<text>]:
  2.     permission: sk.event
  3.     trigger:
  4.         if arg-1 is not set:
  5.             send "&cYou did not specify a Event Name!"
  6.             stop
  7.         else:
  8.             set {_event.name} to arg-1
  9.             set {_event.name.underscore} to {_event.name}
  10.             replace all " " with "_" in {_event.name.underscore}
  11.  
  12.             if {event::%{_event.name.underscore}%::name} is not set:
  13.                 send "&7Created Event &e%arg-1%&7!"
  14.                 if {event.count} is set:
  15.                     add 1 to {event.count}
  16.                 else:
  17.                     set {event.count} to 1
  18.  
  19.  
  20.                 set {event::count.%{event.count}%} to "%{_event.name.underscore}%"
  21.                 set {event::count.%{event.count}%.name} to "%{_event.name}%"
  22.                 set {event::%{_event.name.underscore}%::name} to arg-1
  23.                 set {event::%{_event.name.underscore}%::world} to player's world
  24.                set {event::%{_event.name.underscore}%::location} to player's location
  25.                set {event::%{_event.name.underscore}%::gamemode} to "Survival"
  26.                 set {event::%{_event.name.underscore}%::location.pos1} to "Not Set"
  27.                 set {event::%{_event.name.underscore}%::location.pos2} to "Not Set"
  28.                 set {event::%{_event.name.underscore}%::status} to "Stop"
  29.                 set {event::%{_event.name.underscore}%::slot} to 100
  30.                 set {event::%{_event.name.underscore}%::count} to {event.count}
  31.                 set {event::%{_event.name.underscore}%::time} to now
  32.                 set {event::%{_event.name.underscore}%::host} to player
  33.             send "&7Opening &e%arg-1%&e Event GUI&7..."
  34.  
  35.             create gui with id "EVENT-1" with virtual chest with 5 rows named "&0&lEVENT &8- &r%{_event.name}%":
  36.                 make gui slot 4 with book and quill with name "&6&lEVENT INFORMATION" with lore "", "&7&nEvent Name&7: &f%{event::%{_event.name.underscore}%::name}%", "&7&nID&7: &f%{_event.name.underscore}%", "&7&nStatus&7: &f%{event::%{_event.name.underscore}%::status}%", "", and "&eClick Here to &e&nDelete&e Event!":
  37.                     close player's inventory
  38.                    send "&7Removed Event &e%{event::%{_event.name.underscore}%::name}%&7!"
  39.                    
  40.                    
  41.                     delete {event::count.%{event::%{_event.name.underscore}%::count}%}
  42.                     delete {event::count.%{_event.name.underscore}%::count}
  43.                     delete {event::count.%{_event.name.underscore}%::count.name}
  44.                     delete {event::%{_event.name.underscore}%::name}
  45.                     delete {event::%{_event.name.underscore}%::world}
  46.                     delete {event::%{_event.name.underscore}%::location}
  47.                     delete {event::%{_event.name.underscore}%::gamemode}
  48.                     delete {event::%{_event.name.underscore}%::location.pos1}
  49.                     delete {event::%{_event.name.underscore}%::location.pos2}
  50.                     delete {event::%{_event.name.underscore}%::status}
  51.                     delete {event::%{_event.name.underscore}%::slot}
  52.  
  53.                     delete {event::%{_event.name.underscore}%}
  54.  
  55.                     delete {event::%{_event.name.underscore}%::time}
  56.                     delete {event::%{_event.name.underscore}%::host}
  57.  
  58.                     delete {event::%{_event.name.underscore}%::*}
  59.  
  60.                     execute console command "region remove portal-%{_event.name.underscore}% -w lobby"
  61.                 make gui slot 20 with glass block with name "&f&lEVENT LOCATION" with lore "", "&7&nCurrent World&7: &f%{event::%{_event.name.underscore}%::world}%", "&7&nCurrent Location&7: &f%{event::%{_event.name.underscore}%::location}%", "", and "&eClick Here to &e&nChange&e Location!":
  62.                     close player's inventory
  63.                    send "&7Changed Location to &e%location of player%&7 in world &e%world of player%&7!"
  64.                     set {event::%{_event.name.underscore}%::world} to player's world
  65.                    set {event::%{_event.name.underscore}%::location} to player's location
  66.                make gui slot 22 with glowing stick with name "&d&lPORTAL STICK" with lore "", "&7Position ##1: &f%{event::%{_event.name.underscore}%::location.pos1}%", "&7Position ##2: &f%{event::%{_event.name.underscore}%::location.pos2}%", "", and "&eClick Here to &e&nReceive&e the Wand!":
  67.                     give player 1 stick with name "%{event::%{_event.name.underscore}%::name}%"
  68.                     send "&7Given &dPortal Stick &8(%{event::%{_event.name.underscore}%::name}%&8)"
  69.                     close player's inventory
  70.                make gui slot 24 with player head with name "&e&lPLAYER GAMEMODE" with lore "", "&7&nGamemode&7: &f%{event::%{_event.name.underscore}%::gamemode}%", "", and "&eClick Here to &e&nChange&e the Default Gamemode!":
  71.                     close player's inventory
  72.                    execute player command "-eventgamemode %{_event.name.underscore}%"
  73.                 make gui slot 38 with redstone block with name "&c&lSTOP EVENT" with lore "", "&7Set to this Mode before the Event to stop", "&7players from joining the Event World!", "", and "&eClick Here to &e&nStop&e the Event!":
  74.                     send "&7Set Event &e%{event::%{_event.name.underscore}%::name}%&7 to &c&lSTOPPED&7!"
  75.                     set {event::%{_event.name.underscore}%::status} to "Stop"
  76.                     close player's inventory
  77.                make gui slot 40 with emerald block with name "&a&lSTART EVENT" with lore "", "&7Set to this Mode during the Events to allow", "&7players to join the Event World!", "", and "&eClick Here to &e&nStart&e the Event!":
  78.                     send "&7Set Event &e%{event::%{_event.name.underscore}%::name}%&7 to &a&lSTARTED&7!"
  79.                     set {event::%{_event.name.underscore}%::status} to "Start"
  80.                     close player's inventory
  81.                make gui slot 42 with diamond block with name "&b&lCOMPLETE EVENT" with lore "", "&7Set to this Mode after the Event to allow", "&7players to go back and view the", "&7Event World!", "", and "&eClick Here to &e&nComplete&e the Event!":
  82.                     send "&7Set Event &e%{event::%{_event.name.underscore}%::name}%&7 to &b&lCOMPLETED&7!"
  83.                     set {event::%{_event.name.underscore}%::status} to "Complete"
  84.                     close player's inventory
  85.            open gui "EVENT-1" to player
  86.  
  87. command -eventgamemode [<text>]:
  88.     trigger:
  89.         set {_underscore.name} to arg-1
  90.         set {_name} to arg-1
  91.         replace all "_" with " " in {_name}
  92.         create gui with id "GAMEMODE-1" with virtual hopper named "&0&lEVENT &8- &r%{_name}%":
  93.             make gui slot 0 with green stained glass pane with name "&2&lCREATIVE MODE" with lore "":
  94.                 set {event::%{_underscore.name}%::gamemode} to "Creative"
  95.                 send "&7Set Event &e%{event::%{_underscore.name}%::name}%&7 to &2Creative Mode&7!"
  96.                 close player's inventory
  97.            make gui slot 1 with lime stained glass pane with name "&a&lSURVIVAL MODE" with lore "":
  98.                 send "&7Set Event &e%{event::%{_underscore.name}%::name}%&7 to &aSurvival Mode&7!"
  99.                 set {event::%{_underscore.name}%::gamemode} to "Survival"
  100.                 close player's inventory
  101.            make gui slot 2 with orange stained glass pane with name "&6&lADVENTURE MODE" with lore "":
  102.                 send "&7Set Event &e%{event::%{_underscore.name}%::name}%&7 to &6Adventure Mode&7!"
  103.                 set {event::%{_underscore.name}%::gamemode} to "Adventure"
  104.                 close player's inventory
  105.            make gui slot 3 with yellow stained glass pane with name "&e&lSPECTATOR MODE" with lore "":
  106.                 send "&7Set Event &e%{event::%{_underscore.name}%::name}%&7 to &eSpectator Mode&7!"
  107.                 set {event::%{_underscore.name}%::gamemode} to "Spectator"
  108.                 close player's inventory
  109.            make gui slot 4 with barrier with name "&c&lCLOSE" with lore "":
  110.                 close player's inventory
  111.        open gui "GAMEMODE-1" to player
  112.  
  113.  
  114. on right click:
  115.     if player's tool is stick:
  116.        set {_item} to name of player's tool
  117.        replace all " " with "_" in {_item}
  118.         if {event::%{_item}%::name} is set:
  119.             cancel event
  120.             set {event::%{_item}%::location.pos1} to location of clicked block
  121.             set {_location.pos1} to "%location of clicked block%"
  122.             replace all "x:" with "" in {_location.pos1}
  123.             replace all "y:" with "" in {_location.pos1}
  124.             replace all "z:" with "" in {_location.pos1}
  125.             replace all " " with "" in {_location.pos1}
  126.             replace all ".5" with "" in {_location.pos1}
  127.             execute player command "//pos1 %{_location.pos1}%"
  128.             send "&dType ""Done"" in chat if you have finished selecting points. (Make sure to hold the Portal Stick!)"
  129.  
  130. on block break:
  131.     if player's tool is stick:
  132.        set {_item} to name of player's tool
  133.        replace all " " with "_" in {_item}
  134.         if {event::%{_item}%::name} is set:
  135.             cancel event
  136.             set {event::%{_item}%::location.pos2} to location of event-block
  137.             set {_location.pos2} to "%location of event-block%"
  138.             replace all "x:" with "" in {_location.pos2}
  139.             replace all "y:" with "" in {_location.pos2}
  140.             replace all "z:" with "" in {_location.pos2}
  141.             replace all " " with "" in {_location.pos2}
  142.             replace all ".5" with "" in {_location.pos2}
  143.             execute player command "//pos2 %{_location.pos2}%"
  144.             send "&dType ""Done"" in chat if you have finished selecting points. (Make sure to hold the Portal Stick!)"
  145.  
  146. on chat:
  147.     if message = "done":
  148.         if player's tool is a stick:
  149.            cancel event
  150.             set {_item} to name of player's tool
  151.            replace all " " with "_" in {_item}
  152.             if {event::%{_item}%::name} is set:
  153.                 execute player command "region create portal-%{_item}%"
  154.             else:
  155.                 send "&cYou are not holding a valid portal stick."
  156.  
  157. on region enter:
  158.     if "%region%" contains "portal-":
  159.         set {_region.name} to "%region%"
  160.         set {_region::*} to {_region.name} split at " in"
  161.         replace all "portal-" with "" in {_region::1}
  162.         if {event::%{_region::1}%::status} is "stop":
  163.             if player is op:
  164.                 teleport player to {event::%{_region::1}%::location}
  165.                 set player's gamemode to creative
  166.                send "&c[&4OP&c] &7Connecting you to the Event!"
  167.             else:
  168.                 send "&7Could not connect you to Event!"
  169.         if {event::%{_region::1}%::status} is "start":
  170.             teleport player to {event::%{_region::1}%::location}
  171.             if {event::%{_region::1}%::gamemode} = "creative":
  172.                 set player's gamemode to creative
  173.            if {event::%{_region::1}%::gamemode} = "survival":
  174.                 set player's gamemode to survival
  175.            if {event::%{_region::1}%::gamemode} = "spectator":
  176.                 set player's gamemode to spectator
  177.            if {event::%{_region::1}%::gamemode} = "adventure":
  178.                 set player's gamemode to adventure
  179.            send "&7Connecting you to the Event!"
  180.             send "&aThe Event is live!"
  181.             set {event::%{_region::1}%::playerstats::%player%} to "completed"
  182.         if {event::%{_region::1}%::status} is "complete":
  183.             teleport player to {event::%{_region::1}%::location}
  184.             set player's gamemode to spectator
  185.            send "&7Connecting you to the Event!"
  186.             send "&cThe Event has concluded..."
  187.  
  188. on walking on andesite:
  189.     if "%region at player%" contains "spawn":
  190.         apply potion of speed 3 to the player for 2 seconds
  191.         send actionbar "&7You have been given &eSpeed x3 &7step off &8Andesite &7to Remove!" to player
  192.  
  193. on walking on quartz block:
  194.     if "%region at player%" contains "spawn":
  195.         remove speed from the player
  196.  
  197. on drop:
  198.     if event-item is knowledge book:
  199.         if name of event-item = "&a&lMY ACHIEVEMENTS":
  200.             cancel event
  201.  
  202. on right click with knowledge book:
  203.     cancel event
  204.     if name of player's tool = "&a&lMY ACHIEVEMENTS":
  205.        create gui with id "ACHIEVEMENTS" with virtual chest with 6 rows named "&0&lACHIEVEMENTS &8- &rEvents"
  206.         send "&7Opening &eACHIEVEMENTS GUI&7..."
  207.         open gui "ACHIEVEMENTS" to player
  208.         clear all gui slots of player
  209.         edit gui "ACHIEVEMENTS":
  210.             clear all gui slots of player
  211.             loop 1000 times:
  212.                 add 1 to {_loop}
  213.                 if {event::count.%{_loop}%} is set:
  214.                     if {event::%{event::count.%{_loop}%}%::playerstats::%player%} is "completed":
  215.                         make next gui slot with lime dye with name "&a&l%{event::count.%{event.count}%.name}% &8- &7Event" with lore "&8%{event::%{event::count.%{event.count}%}%::time}%", "", "&7&nHosted by&7: &f%{event::%{event::count.%{event.count}%}%::host}%", "", and "&aYou Partcipated in this Event!"
  216.                     else:
  217.                         make next gui slot with gray dye with name "&7&l%{event::count.%{event.count}%.name}% &8- &7Event" with lore "&8%{event::%{event::count.%{event.count}%}%::time}%", "", "&7&nHosted by&7: &f%{event::%{event::count.%{event.count}%}%::host}%", "", and "&cYou did not Participate in this Event!"
  218.  
  219.  
  220. on inventory click:
  221.     if clicked item is knowledge book:
  222.         if name of clicked item is "&a&lMY ACHIEVEMENTS":
  223.             cancel event      
  224.  
  225. on join:
  226.     teleport player to location 85, 10, -5 in world "lobby"
  227.     wait 1 second
  228.     set slot 4 of player's inventory to knowledge book with name "&a&lMY ACHIEVEMENTS" with lore "&7Right-Click to View Event's you went to!"
  229.  
  230.  
  231. command sendallhub:
  232.     permission: sk.sendallhub
  233.     trigger:
  234.         send "&aSending you to Hub!" to all players
  235.         wait 0.5 second
  236.         loop all players:
  237.             teleport the loop-players to location at 85, 10, -5 in world "lobby"
  238.             send "&7Teleporting to &eSpawn&7..." to loop-player
  239.  
  240. command sendhub [<offline player>]:
  241.     permission: sk.sendallhub
  242.     trigger:
  243.         if arg-1 is not set:
  244.             send "&c&lError: &7Correct Usage &e/sendhub [player]"
  245.         if arg-1 is set:
  246.             if arg-1 is offline player:
  247.                 send "&aSending you to Hub!" to arg-1
  248.                 teleport the arg-1 to location at 85, 10, -5 in world "lobby"
  249.                 send "&7Teleporting to &eSpawn&7..." to arg-1
  250.                 send "&aSending &e%arg-1%&a to Hub!"
  251.             else:
  252.                 send "&7That player has never joined!"
  253.  
  254. #===============================================================================#
  255.  
  256. command spawn:
  257.     aliases: hub, lobby
  258.     trigger:
  259.         teleport the player to location at 85, 10, -5 in world "lobby"
  260.         send "&7Teleporting to &eSpawn&7..." to player
  261.  
  262.  
  263. command help:
  264.     trigger:
  265.         if player is op:
  266.             send formatted "&c&lYOUTUBER&7(&a3&7) &4/<tooltip:&4/event [Event Name]&8- &fCreates an Event!>event<r>&7, &4/<tooltip:&4/sendhub [Player]&8- &fSends a Player to the Server Spawn!>sendhub<r>&7, &4/<tooltip:&4/sendallhub &8- &fSends Every Player to the Server Spawn!>sendallhub<r>"
  267.         send formatted "&8&lSUBSCRIBER&7(&a1&7) &7/<tooltip:&7/spawn &8- &fTeleports you to Spawn!>spawn<r>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement