TuSKe - Custom Enchantments, GUI Manager and more!

Addon TuSKe - Custom Enchantments, GUI Manager and more! 1.8.2

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

I'm getting these two errors:
ENcJNya9dMVLJggUZvCmDxDcuijeqy.png


Code
code_language.skript:
on skript load:
#enchantments
    #singe enchantment
    register a new custom enchantment with id name "Singe"
    set {_enchantment.1} to "Singe" parsed as custom enchantment
    set max level of {_enchantment.1} to 1
    set rarity of {_enchantment.1} to 5
    set accepted items for {_enchantment.1} to "Pickaxes", "Axes" and "Shovels"
    set lore name of {_enchantment.1} to "Singe I"
    set enabled for {_enchantment.1} to true
    set conflicts for {_enchantment.1} to silk_touch and fortune
    #decapatator
    register a new custom enchantment with id name "Decapator"
    set {_enchantment.2} to "Decapator" parsed as custom enchantment
    set max level of {_enchantment.2} to 1
    set rarity of {_enchantment.2} to 5
    set accepted items for {_enchantment.2} to "Swords" and "Bows"
    set lore name of {_enchantment.2} to "Decapator I"
    set enabled for {_enchantment.2} to true
    #set conflicts for {_enchantment.2} to looting

    reload all custom enchantments
on mine of iron ore:
    if player's held tool has custom enchantment Singe:
        cancel event
        set event-block to chest
        add 1 iron ingot to event-block
        set event-block to air
        add 1 to the data value of player's held tool
command /reloadenchantments:
    trigger:
        reload all custom enchantments
 
Last edited by a moderator:
@Vexio Currently you can't set conflicts with vanilla enchantments. It is planned to 1.7.2 (Cause 1.7.1 I will upload in few hours).
 
Tuke_Nuke updated TuSKe - Custom Enchantments, GUI Manager and more! with a new update entry:

Update 1.7.1: Full recipe support, GUI Manager remade part one and general stuffs.

I was off for a few months ago, and I couldn't make weekly updates. But here I am.

Some of these things aren't new if you was using some beta releases. I plan to release some beta versions before release some big stuffs, so if you want to know what's new, just check there.

Tl;DR:
  • Recipe support.
  • Damage modifiers.
  • A regex type.
  • Added general stuffs.
  • Fixed lot of things.
...

Read the rest of this update entry...
 
@Tuke_Nuke
I want to use the last damage, but there are some problems :emoji_persevere:
Code:
on death of player:
    last damage cause is attack
    damage cause is lava
    set death message to "%victim%  tried to swim in lava while trying to escape from %last entity damage of player%"


#
[13:00:05 INFO]: [Skript] Reloading 1.sk...
[13:00:05 INFO]: entity: player
[13:00:05 ERROR]: Can't understand this condition/effect: last damage cause is attack (1.sk, line 307: last damage cause is attack')
[13:00:05 ERROR]: Can't understand this expression: last entity damage of player (1.sk, line 309: set death message to "%victim%  tried to swim in lava while trying to escape from %last entity damage of player%"')
[13:00:06 INFO]: [Skript] Encountered 2 errors while reloading 1.sk!

[13:04:34 INFO]: [TuSKe] Disabling TuSKe v1.7
[13:04:34 INFO]: [Skellett] Disabling Skellett v1.7.9b
[13:04:34 INFO]: [skRayFall] Disabling skRayFall v1.9.7
[13:04:34 INFO]: [skRayFall] Bacon has been eaten. Make some more soon!
[13:04:34 INFO]: [Citizens] Disabling Citizens v2.0.21-SNAPSHOT (build 1470)
[13:04:34 INFO]: [SkStuff] Disabling SkStuff v1.6.4
[13:04:34 INFO]: [SkStuff] SkStuff 1.6.4 has been successfully disabled.
[13:04:34 INFO]: [ProtocolLib] Disabling ProtocolLib v4.2.1-SNAPSHOT-b346
[13:04:34 INFO]: [Vault] Disabling Vault v1.5.6-b49
[13:04:34 INFO]: [SkQuery] Disabling SkQuery v3.5.5-Lime
[13:04:34 INFO]: [skUtilities] Disabling skUtilities v0.8.9
[13:04:34 INFO]: [skDragon] Disabling skDragon v0.13.1
[13:04:34 INFO]: §3[§bskDragon§3] §aPlugin is now disabled. Most likely you shut down or reset your server
[13:04:34 INFO]: [SQLibrary] Disabling SQLibrary v7.1
[13:04:34 INFO]: SQLibrary stopped.
[13:04:34 INFO]: [Skript] Disabling Skript v2.2-dev23
 
@xbxy The syntax is that
code_language.skript:
last damage cause of %entity%
%entity%'s last damage cause

The last entity damage of player was supposed to be the last attacker of the entity. I added it in the example in the docs, but actually this expression was never added lol.

I will try to update it in some hours (while I finish other things), and also include that expression too.
 
@xbxy The syntax is that
code_language.skript:
last damage cause of %entity%
%entity%'s last damage cause

The last entity damage of player was supposed to be the last attacker of the entity. I added it in the example in the docs, but actually this expression was never added lol.

I will try to update it in some hours (while I finish other things), and also include that expression too.
Thank you, I found that this can only detect the final damage type, and can not detect who caused the damage
 
Tuke_Nuke updated TuSKe - Custom Enchantments, GUI Manager and more! with a new update entry:

Update 1.7.2: Fixed GUI function effect and new expression.

[#] Fixed effects/expressions related to functions:

Some effects was using a workaround to make possible to get a function (in GUI Manager specifically) and it was bugging sometimes when the function has complex parameters (more than one parameter or/and list parameters).
For GUI Manager: Now it's possible to run a function even if it wasn't loaded yet or is below the code.
So it's possible to make like this:
code_language.skript:
make gui slot 0 of player with stone to run function...

Read the rest of this update entry...
 
Code:
        open virtual chest inventory with size 6 named "test" to player
        create a gui slot 0 of player with green wool block to run function join(player, "1")
I found that the player can put their own items into the virtual inventory
Use 'TuSKe' code
How best to prevent players put items:emoji_slight_smile:


The following code just let players fall out of the hands of items
Will not be deducted from the player's inventory?
Code:
on right click:
    make player drops 1 of held item from his inventory


There's a problem with this code
Code:
create a gui slot 1 of player with potato to close with left click

[01:53:36 ERROR]: Can't understand this condition/effect: create a gui slot 1 of player with potato to close with left click (1.sk, line 54: create a gui slot 1 of player with potato to close with left click')
 
Last edited by a moderator:
@xbxy I did a tutorial about the GUI Manager yesterday, you can check it here.
To make it possible, you just have to format a slot with air item, as it will make a "locked slot", where he can't place items on it.
For example, you can make like this after you've formatted all of your slots:

code_language.skript:
loop integers from 0 to 53: #You can change this '53' to max size of your inventory if you want.
    if slot loop-integer of player is not a gui: #It will only check for slots that doesn't have any gui setted.
        make a gui slot loop-integer of player with air

The effect to drop a item was one of the first thing I did and I forgot about this possibility.
I will add a possibility to remove from a slot too. For now, you can just remove the "from his inventory",
as it will make the player to only shoot the item.

code_language.skript:
make player drops 1 of held item
remove 1 of held item from held item

And for the last issue, which is your Skript and server's version?
 
@xbxy I did a tutorial about the GUI Manager yesterday, you can check it here.
To make it possible, you just have to format a slot with air item, as it will make a "locked slot", where he can't place items on it.
For example, you can make like this after you've formatted all of your slots:

code_language.skript:
loop integers from 0 to 53: #You can change this '53' to max size of your inventory if you want.
    if slot loop-integer of player is not a gui: #It will only check for slots that doesn't have any gui setted.
        make a gui slot loop-integer of player with air

The effect to drop a item was one of the first thing I did and I forgot about this possibility.
I will add a possibility to remove from a slot too. For now, you can just remove the "from his inventory",
as it will make the player to only shoot the item.

code_language.skript:
make player drops 1 of held item
remove 1 of held item from held item

And for the last issue, which is your Skript and server's version?
Code:
        loop integers between 0 and 53:
            if slot loop-number of player is not a gui:
                make a gui slot loop-number of player with air
Use the code you provide, so that players can not place
But I feel weird:emoji_smile:


effect to drop a item At present there is no problem, but may be able to simulate the function of biological movement? Or attack?




The last question I'm running on 1.11.2
Code:
create a gui slot 1 of player with potato to close with left click
[01:53:36 ERROR]: Can't understand this condition/effect: create a gui slot 1 of player with potato to close with left click (1.sk, line 54: create a gui slot 1 of player with potato to close with left click')


[11:55:22 INFO]: [TuSKe] Disabling TuSKe v1.7.2
[11:55:22 INFO]: [Skellett] Disabling Skellett v1.7.9b
[11:55:22 INFO]: [skRayFall] Disabling skRayFall v1.9.7
[11:55:22 INFO]: [skRayFall] Bacon has been eaten. Make some more soon!
[11:55:22 INFO]: [Citizens] Disabling Citizens v2.0.21-SNAPSHOT (build 1470)
[11:55:22 INFO]: [SkStuff] Disabling SkStuff v1.6.4
[11:55:22 INFO]: [SkStuff] SkStuff 1.6.4 has been successfully disabled.
[11:55:22 INFO]: [ProtocolLib] Disabling ProtocolLib v4.2.1-SNAPSHOT-b346
[11:55:22 INFO]: [Vault] Disabling Vault v1.5.6-b49
[11:55:22 INFO]: [SkQuery] Disabling SkQuery v3.5.5-Lime
[11:55:22 INFO]: [skUtilities] Disabling skUtilities v0.8.9
[11:55:22 INFO]: [skDragon] Disabling skDragon v0.13.1
[11:55:22 INFO]: §3[§bskDragon§3] §aPlugin is now disabled. Most likely you shut down or reset your server
[11:55:22 INFO]: [SQLibrary] Disabling SQLibrary v7.1
[11:55:22 INFO]: SQLibrary stopped.
[11:55:22 INFO]: [Skript] Disabling Skript v2.2-dev23
[doublepost=1487911264,1487908648][/doublepost]
According to the code, it should be to click on the stone to give players a stone, click on the mud to give players the soil
But I found he could only give the player dirt

I added 'wait 20 ticks' for testing

Found that this part will be covered
function shop(player, "%loop-index%")

Stone first "a1"
But in the end it will be covered as "a2"
Code:
function shop(p:player, t:text):
    send "%{_t}%" to {_p}
    give {shop.item1::%{_t}%} to {_p}

        set {shop.slot1::a1} to 9
        set {shop.item1::a1} to stone named "石头" with lore "hehe"
        set {shop.slot1::a2} to 10
        set {shop.item1::a2} to grass block named "泥土" with lore "hehe"
        open virtual chest inventory with size 6 named "shop" to player
        format gui slot 1 of player with Glowing stone named "方块"
        loop {shop.slot1::*}:
            #wait 20 ticks
            format gui slot {shop.slot1::%loop-index%} of player with {shop.item1::%loop-index%} to run function shop(player, "%loop-index%")
 
Last edited by a moderator:
@xbxy
Could you give me a example or more details for 'biological movemente'?

code_language.skript:
create a gui slot 1 of player with potato to close with left click
As you are using Bensku's fork, it has a different value for the left click. Go to the tutorial that've I linked to you and see the spoiler related to Bensku's fork or go to Bensku's documentation (here) and search for click action

For the last issue, I already found it here. I'm making a final test and I will update it in some minutes. Thank's for reporting.
 
@xbxy
Could you give me a example or more details for 'biological movemente'?

code_language.skript:
create a gui slot 1 of player with potato to close with left click
As you are using Bensku's fork, it has a different value for the left click. Go to the tutorial that've I linked to you and see the spoiler related to Bensku's fork or go to Bensku's documentation (here) and search for click action

For the last issue, I already found it here. I'm making a final test and I will update it in some minutes. Thank's for reporting.
The time difference between foreigners and we really big difference, your reply I waited for more than a dozen hours, I now want to sleep, and then get it tomorrow:emoji_smile:
 
The time difference between foreigners and we really big difference, your reply I waited for more than a dozen hours, I now want to sleep, and then get it tomorrow:emoji_smile:
Sorry but it's just the time zones. It was 2am here, I couldn't wake up for that :emoji_sweat_smile:
 
Code:
#I found this could not detect whether the player has a stone
function tttt(p:player):
    if {_p} has stones:
        give 64 stones to {_p}
        stop
    send "no" to {_p}
command /x:
    trigger:
        tttt(player)
        stop

#The following code
#Can not detect the player's items

format gui slot 1 of player with stone to run function tttt({_p})
I use skript is dev-23
When I found out, I thought it was skript
I upgraded to skript dev-24
But still not
 
Last edited by a moderator:
@xbxy What's your complete code? You are using a local variable and you need to be sure that it is setted to something.
Also, what did you tried?It is just a code and you've pointed that isn't working.
 
@xbxy What's your complete code? You are using a local variable and you need to be sure that it is setted to something.
Also, what did you tried?It is just a code and you've pointed that isn't working.

Just like the code below
Click to check whether the player has a clay block
The problem is that there is no detection of the clay block
Code:
function shop(p:player, s:string, s1:string):
    if {_p} has {shop.buy%{_s}%::%{_s1}%}:
        remove {shop.buy%{_s}%::%{_s1}%} from {_p}
        give {shop.item%{_s}%::%{_s1}%} to {_p}
        stop
    send "no" to {_p}
 
Last edited by a moderator:
In the function "shop", debug all the values to make sure they are sending correctly.
If it does, try to change the condition:
code_language.skript:
if {_p}'s inventory has {shop.biu%{_s}%::{_s1}}:
 
In the function "shop", debug all the values to make sure they are sending correctly.
If it does, try to change the condition:
code_language.skript:
if {_p}'s inventory has {shop.biu%{_s}%::{_s1}}:
Thank you. The problem is solved:emoji_smile:
[doublepost=1488291873,1488160480][/doublepost]
[doublepost=1488291919][/doublepost]My little game server has a judgment
When the observer crossed the border
Will move
Use the original command to set the boundary
Instead of plug-ins
I found that by following this writing sometimes judgment will be delayed
So I would like to ask whether it is possible to create a test player over the boundaries of things?
Or call the plugin WorldBorder boundaries?

Code:
every 1 second:
    loop all players:
        if loop-player's gamemode is spectator:
            checksp(loop-player)
function checksp(p:player):
    if -5.1 > y-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
    if 260.1 < y-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
    if 105.1 < x-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
    if -104.1 > x-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
    if -104.1 > z-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
    if 105.1 < z-coordinate of {_p}'s location:
        teleport {_p} to {loc}
        stop
 
  • Like
Reactions: Tuke_Nuke