Solved Kitpvp gui help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jeelzz

Member
Apr 6, 2020
2
0
0
26
Hello! I'm a returning skript veteran, and I need a little help getting my head around function guis.
Could someone give me an example or extract of a kitpvp gui, with functions.

E.g format slot 10 of player with stone sword to run function (warrior, p:emoji_stuck_out_tongue:layer)

function(warrior):
give 1 of stone sword to {_p}


What would be the correct syntax?
 
It would be much easier to just use a normal..
Code:
format gui slot 10 of player with stone sword to run:
  give player stone sword
 
It would be much easier to just use a normal..
Code:
format gui slot 10 of player with stone sword to run:
  give player stone sword

It would be much easier to just use a normal..
Code:
format gui slot 10 of player with stone sword to run:
  give player stone sword

Yes, but if I specifically wanted to use functions for it, how would I go about that?
 
Hey, try this.

Code:
function giveSword(p: player):
    add 1 stone sword named "Yay" to {_p}'s inventory
    send "Really cool" to {_p}

command /test:
    trigger:
        open chest with 1 row named "TEST" to player
        wait a tick
        set slot 0 of player's current inventory to stone sword named "Click" with lore "and you will recieve it."
        
on inventory click:
    inventory name of player's current inventory is "TEST":
        cancel event
        clicked item's name contains "Click":
            giveSword(player)
 
  • Like
Reactions: Jeelzz
Status
Not open for further replies.