Switch item in gui?

  • 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.

SpLayzDK

Member
Jun 15, 2019
14
0
1
30
This code works on one item, but when you need to press another item, it just makes it unstealable.
Please, help me if there is a fix for this.
Thanks in advance.

on rightclick on painting:
if {Tasks.%player%::*} contains "Shields - Prime Shields":
if "%region at player%" contains "shieldstask":
openGUI(player, "&4Prime Shields")
wait 3 ticks
chance of 50%:



format slot 4 of player with white stained glass to run [execute player command "makered 4"]
format slot 11 of player with white stained glass to run [execute player command "makered 11"]
format slot 15 of player with white stained glass to run [execute player command "makered 15"]
format slot 22 of player with white stained glass to run [execute player command "makered 22"]
format slot 29 of player with white stained glass to run [execute player command "makered 29"]
format slot 33 of player with white stained glass to run [execute player command "makered 33"]
format slot 40 of player with white stained glass to run [execute player command "makered 40"]



command /makered [<number>]:
trigger:
format slot arg-1 of player with red stained glass named "%arg-1%" to run [execute player command "makewhite arg-1"]
send "%arg-1%"

command /makewhite [<number>]:
trigger:
format slot arg-1 of player with white stained glass to run [execute player command "makered arg-1"]
send "%arg-1%"
 
just format the clicked item slots with the reverse of their original items
 
for example
Code:
format slot 1 of player with (block1) to run:
  format slot 1 of player with (block2)
  format slot 2 of player with (block2)
format slot 2 of player with (block2)

use this after they click it, dont run a command (just make it format)
 
Status
Not open for further replies.