I made skript and in this skript i can have 2 other types items and it's work for example: red flower and yellow flower and it works, but if i will take 2 same type items like stone pickaxe and stonepickaxe it doesn't care which one it is and assign string of item i used last time. How to make uuid or id for items and then it will be possible to adduction
@edit version Bensku 1.11
addons: skquery, wildskript, skutilities, skmorkaz
no errors, just id of items is not precised
@edit version Bensku 1.11
addons: skquery, wildskript, skutilities, skmorkaz
no errors, just id of items is not precised
code_language.skript:
variables:
{ak47.%player%} = 0
{ak47.%item%} = 30
on rightclick with green_music_disc:
if {ak47.%player%} is equal to 0:
if player's tool is green_music_disc named "&cAK-47":
set {ak47.%item%} to 30
if {ak47.%item%.} > 0:
set {ak47.%item%} to {ak47.%item%}-1
set name of player's tool to "&cAK-47 &3>>%{ak47.%item%}%<<"
set {ak47.%player%} to 1
shoot a fireball from player at speed 5
execute console command "/playsound record.stal block %player% ~ ~ ~ 20 1"
wait 0.2 seconds
set {ak47.%player%} to 0
if {ak47.%item%} is equal to 0:
if player's inventory has 30 clay_item named "&cNaboje 7.72":
remove 30 clay_item named "&cNaboje 7.72" from player's inventory
set {ak47.%item%} to 30
set name of player's tool to "&cAK-47 &3>>%{ak47.%item%}%<<"
if player's inventory has 29 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 29
remove 29 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>29<<"
if player's inventory has 28 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 28
remove 28 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>28<<"
if player's inventory has 27 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 27
remove 27 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>27<<"
if player's inventory has 26 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 26
remove 26 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>26<<"
if player's inventory has 25 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 25
remove 25 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>25<<"
if player's inventory has 24 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 24
remove 24 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>24<<"
if player's inventory has 23 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 23
remove 23 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>23<<"
if player's inventory has 22 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 22
remove 22 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>22<<"
if player's inventory has 21 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 21
remove 21 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>21<<"
if player's inventory has 20 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 20
remove 20 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>20<<"
if player's inventory has 19 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 19
remove 19 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>19<<"
if player's inventory has 18 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 18
remove 18 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>18<<"
if player's inventory has 17 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 17
remove 17 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>17<<"
if player's inventory has 16 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 16
remove 16 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>16<<"
if player's inventory has 15 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 15
remove 15 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>15<<"
if player's inventory has 14 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 14
remove 14 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>14<<"
if player's inventory has 13 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 13
remove 13 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>13<<"
if player's inventory has 12 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 12
remove 12 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>12<<"
if player's inventory has 11 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 11
remove 11 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>11<<"
if player's inventory has 10 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 10
remove 10 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>10<<"
if player's inventory has 9 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 9
remove 9 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>9<<"
if player's inventory has 8 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 8
remove 8 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>8<<"
if player's inventory has 7 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 7
remove 7 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>7<<"
if player's inventory has 6 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 6
remove 6 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>6<<"
if player's inventory has 5 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 5
remove 5 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>5<<"
if player's inventory has 4 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 4
remove 4 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-47 &3>>4<<"
if player's inventory has 3 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 3
remove 3 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-37 &3>>3<<"
if player's inventory has 2 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 2
remove 2 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-37 &3>>2<<"
if player's inventory has 1 clay_item named "&cNaboje 7.72":
set {ak47.%item%} to 1
remove 1 clay_item named "&cNaboje 7.72" from player's inventory
set name of player's tool to "&cAK-37 &3>>1<<"
else:
execute console command "/playsound ui.button.click block %player% ~ ~ ~ 40 2"
on leftclick:
send "%{ak47.%item%}%" to player
Last edited: