Jump to content

Recommended Posts

I'm bored so I'm making skripts for people. Just reply and I will try my best to make one for you.

(Thank you NerdyHypixel)

Currently working on a vs code extension for editing server files

  • yes jeelzzz, i do support this vsc code extension - Reassembly
Link to post
Share on other sites
  • 2 weeks later...

Hey I could really do with a shop skript. I need all the colours of wool and glass, wheat seeds melon seeds and pumpkin seeds cacti sugar cane A diamond spade hoe axe and pick axe Ice and blue ice water hoppers and finally chests, I’m so sorry to bug you.

Link to post
Share on other sites
options:
	White Wool: 10
	Orange Wool: 15
	Magenta Wool: 15	
	Light Blue Wool: 15
	Yellow Wool: 15
	Lime Wool: 15
	Pink Wool: 15
	Gray Wool: 15
	Light Gray Wool: 15 
	Cyan Wool: 15
	Purple Wool: 15
	Blue Wool: 15
	Brown Wool:	15
	Green Wool: 15
	Red Wool: 15
	Black Wool: 15
    Glass: 15
	White Stained Glass: 18
	Orange Stained Glass: 18	
	Magenta Stained Glass: 18
	Light Blue Stained Glass: 18
	Yellow Stained Glass: 18	
	Lime Stained Glass: 18	
	Pink Stained Glass: 18	
	Gray Stained Glass: 18	
	Light Gray Stained Glass: 18	
	Cyan Stained Glass: 18	
	Purple Stained Glass: 18	
	Blue Stained Glass: 18
	Brown Stained Glass: 18
	Green Stained Glass: 18	
	Red Stained Glass: 18
	Black Stained Glass: 18
	seed: 3
    mseed: 30
    pseed: 25
    cacti: 30
    scane: 35
    dspade: 100
    dhoe: 90
    daxe: 120
    dpick: 125
    water: 100
    ice: 50
    bice: 70
    hopper: 100
    chest: 60

function border(user: player, rows: number, borderItem: item):
	# user : The player to draw the border for.
	# rows : The number of rows the GUI has.
	# borderItem : The item to draw the border with.
	
	format gui slot (numbers from 0 to 8) of {_user} with {_borderItem}
	loop ({_rows} - 2) times:
		format gui slot (((loop-value) * 9), and ((loop-value) * 9) + 8) of {_user} with {_borderItem}
	format gui slot (numbers from ({_rows} - 1) * 9 to (({_rows} - 1) * 9) + 8) of {_user} with {_borderItem}
    
command /shop:
	trigger:
    	wait 3 ticks
    	open chest with 5 rows named "&bShop" to player
        border(player, 5, gray stained glass pane named "&8")
        format gui slot 28 of player with seed named "&aFarming" to run function seedShop(player)
        format gui slot 29 of player with diamond hoe named "&8Tools" to run function toolShop(player)
        format gui slot 27 of player with stone brick named "&7Blocks" to run function blockShop(player)
        format gui slot 26 of player with redstone named "&cRedstone" to run function redstoneShop(player)
function purchase(buyer: player, item: item, cost: number):
	{_buyer}'s balance >= {_cost}:
    	give {_buyer} {_item}
        send "&8[&cSERVER&8] &aPurchased %{_item}%" to {_buyer}
        remove {_cost} from {_buyer}'s balance
      	stop
    send "&8[&cSERVER&8] &cNot enough money!" to {_buyer}
    stop
function addItem(slot: slot, item: item, cost: number, name: text, buyer: player):
	format gui slot {_slot} of {_buyer} with {_item} named {_name} with lore "&a{_cost}" to run function purhase({_buyer}, {_item}, {_cost})
function seedShop(buyer: player):
	open chest with 4 rows named "&bShop" to {_buyer}
    border({_buyer}, 4, gray stained glass pane named "&8")
    addItem(10, 4 seed, {@seed}, "&aSeeds", {_buyer})
    addItem(11, 5 melon seed, {@mseed}, "&aMelon Seeds", {_buyer})
    addItem(12, 5 pumpkin seed, {@pseed}, "&aPumpkin Seeds", {_buyer})
    addItem(13, 2 cacti, {@cacti}, "&aCacti", {_buyer})
    addItem(14, 2 sugar cane, {@scane}, "&aSugar Cane", {_buyer})
    addItem(15, 1 water bucket, {@water}, "&bWater", {_buyer})
    addItem(16, 10 ice, {@ice}, "&bIce", {_buyer})
    addItem(19, 8 blue ice, {@bice}, "&bBlue Ice", {_buyer})
    format gui slot 29 of {_buyer} with barrier named "&cBack" to close then run [make {_buyer} execute command "/shop"]
function toolShop(buyer: player):
	open chest with 4 rows named "&bShop" to {_buyer}
    border({_buyer}, 4, gray stained glass pane named "&8")
    additem(10, 1 diamond shovel, {@dspade}, "&bDiamond Spade", {_buyer})
    additem(11, 1 diamond hoe, {@dhoe}, "&bDiamond Hoe", {_buyer})
    additem(12, 1 diamond axe, {@daxe}, "&bDiamond Axe", {_buyer})
    additem(13, 1 diamond pickaxe, {@dpick}, "&bDiamond Pickaxe", {_buyer})
    format gui slot 29 of {_buyer} with barrier named "&cBack" to close then run [make {_buyer} execute command "/shop"]
function blockShop(buyer: player):
	open chest with 7 rows named "&bShop" to {_buyer}
    border({_buyer}, 7, gray stained glass pane named "&8")
    addItem(10, 4 white wool, {@White Wool}, "&fWool", {_buyer})
    addItem(11, 4 red wool, {@Red Wool}, "&cRed Wool", {_buyer})
    addItem(12, 4 orange wool, {@Orange Wool}, "&6Orange Wool", {_buyer})
    addItem(13, 4 yellow wool, {@Yellow Wool}, "&eYellow Wool", {_buyer})
    addItem(14, 4 green wool, {@Blue Wool}, "&9Blue Wool", {_buyer})
    addItem(15, 4 blue wool, {@Green Wool}, "&2Green Wool", {_buyer})
    addItem(16, 4 purple wool, {@Purple Wool}, "&5Purple Wool", {_buyer})
    addItem(19, 4 brown wool, {@Brown Wool}, "&6Brown Wool", {_buyer})
    addItem(20, 4 black wool, {@Black Wool}, "&0Black Wool", {_buyer})
    addItem(21, 4 gray wool, {@Gray Wool}, "&8Gray Wool", {_buyer})
    addItem(22, 4 light gray wool, {@Light Gray Wool}, "&7Light Gray Wool", {_buyer})
    addItem(23, 4 aqua wool, {@Light Blue Wool}, "&bLight Blue Wool", {_buyer})
    addItem(24, 4 lime wool, {@Lime Wool}, "&aLime Wool", {_buyer})
    addItem(25, 4 cyan wool, {@Cyan Wool}, "&3Cyan Wool", {_buyer})
    addItem(28, 4 magenta wool, {@Magenta Wool}, "&dMagenta Wool", {_buyer})
    addItem(29, 4 white glass, {@Glass}, "&fGlass", {_buyer})
    addItem(30, 4 red glass, {@Red Stained Glass}, "&cRed Glass", {_buyer})
    addItem(31, 4 orange glass, {@Orange StainedGlass}, "&6Orange Glass", {_buyer})
    addItem(32, 4 yellow glass, {@Yellow Stained Glass}, "&eYellow Glass", {_buyer})
    addItem(33, 4 green glass, {@Blue Stained Glass}, "&9Blue Glass", {_buyer})
    addItem(34, 4 blue glass, {@Green Stained Glass}, "&2Green Glass", {_buyer})
    addItem(35, 4 purple glass, {@Purple Stained Glass}, "&5Purple Glass", {_buyer})
    addItem(38, 4 brown glass, {@Brown Stained Glass}, "&6Brown Glass", {_buyer})
    addItem(39, 4 black glass, {@Black Stained Glass}, "&0Black Glass", {_buyer})
    addItem(40, 4 gray glass, {@Gray Stained Glass}, "&8Gray Glass", {_buyer})
    addItem(41, 4 light gray glass, {@Light Gray Stained Glass}, "&7Light Gray Glass", {_buyer})
    addItem(42, 4 aqua glass, {@Light Blue Stained Glass}, "&bLight Blue Glass", {_buyer})
    addItem(43, 4 lime glass, {@Lime Stained Glass}, "&aLime Glass", {_buyer})
    addItem(44, 4 cyan glass, {@Cyan Stained Glass}, "&3Cyan Glass", {_buyer})
    addItem(47, 4 magenta glass, {@Magenta Stained Glass}, "&dMagenta Glass", {_buyer})
    format gui slot 56 of {_buyer} with barrier named "&cBack" to close then run [make {_buyer} execute command "/shop"]
function redstoneShop(buyer: player):
    addItem(10, 2 chest, {@chest}, "&6Chest", {_buyer})
    addItem(11, 1 hopper, {@hopper}, "&7Hopper", {_buyer})
    format gui slot 29 of {_buyer} with barrier named "&cBack" to close then run [make {_buyer} execute command "/shop"]

 

Link to post
Share on other sites

Timer. I will look into the stopwatch as i am a lazy panda rn

 

on join:
	{timer::%player's uuid%} is not set:
		set {timer::%player's uuid%} to 0
command /timer [<number>] [<text>]:
	trigger:
    	arg-2 is not set:
    		arg-1 is set:
        		set {timer::%player's uuid%} to arg-1
            	send "&c&lTIMER &eSet a timer for %arg-1% &eseconds!"
            	timer(player, arg-2)
            	send action bar "&c&lTIMER: &e%{timer::%player's uuid%}%" to player
        		stop
        	send "&c&lTIMER &eEnter a timespan!"
            stop
        arg-2 is "get":
        	{timer::%player's uuid%} is not 0:
	           	send "&c&lTIMER &e%{timer::%player's uuid%}% &eseconds."
                stop
            send "&c&lTIMER &eYou do not have a timer running!
            
function timer(user: player, time: number):
	loop {_time} times:
    	remove 1 from {timer::%{_user}'s uuid%}
      	send action bar "&c&lTIMER: &e%{timer::%player's uuid%}%" to {_user}
        wait 1 second
    send title "&c&lTIMER's UP!" to {_user} for 3 seconds

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...