Solved Consume skull

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

    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.

MihaiMalos

Member
Jul 17, 2017
10
0
0
Hi, i want to make an event like:
"When you press right click on a specified skull, it will consume and give you 10 seconds of speed" but i don't know how to do that
 
Please use the help forum layout ---> https://forums.skunity.com/wiki/help-request-layout/
I would use the on click event while holding a skull. It'd be easiest to check if the skull has a specific name in order to differentiate them. then you can simply remove a skull of that name and apply the potion effect of speed to the player for 10 seconds.
 
  • Like
Reactions: MihaiMalos
code_language.skript:
on right click:
    if player is holding a player head named "&6Golden"
        apply swiftness 1 to the player for 10 seconds
I created that and is not working:
10cc940845f7ec0c5351cc2685817ded
10cc940845f7ec0c5351cc2685817ded
10cc940845f7ec0c5351cc2685817ded.png
 
code_language.skript:
on right click:
    if player is holding a player head named "&6Golden"
        apply swiftness 1 to the player for 10 seconds
I created that and is not working:
10cc940845f7ec0c5351cc2685817ded
10cc940845f7ec0c5351cc2685817ded
10cc940845f7ec0c5351cc2685817ded.png
code_language.skript:
if player's tool is skull named "&6Golden":
 
  • Like
Reactions: MihaiMalos
try to separate it maybe.
code_language.skript:
if player is holding skull:
    if player's tool is named "&6Golden":
 
  • Like
Reactions: MihaiMalos
try to separate it maybe.
code_language.skript:
if player is holding skull:
    if player's tool is named "&6Golden":
Same error
I think this should be from me, i am not sure.

This is the skull: https://gyazo.com/02987b3e195c427482249a9b6672fe18
Name of skull is zsoccer23
And i want to make a right click event with that while holding and give you speed effect for 1 skull like that
The version of skript is: 2.2-Mineplex-Core-Patch and if i update that to another version, the rest of skript will not work anymore
 
Same error
I think this should be from me, i am not sure.

This is the skull: https://gyazo.com/02987b3e195c427482249a9b6672fe18
Name of skull is zsoccer23
And i want to make a right click event with that while holding and give you speed effect for 1 skull like that
The version of skript is: 2.2-Mineplex-Core-Patch and if i update that to another version, the rest of skript will not work anymore
Can you try this? It may be your version, but worth a shot. I'm on dev 30 of Bensku so I can't test with a matching version unfortunately. This works on mine though
code_language.skript:
on rightclick:
    set {_name} to name of player's tool
    if {_name} contains "&6Golden":
        remove player head from player
 
  • Like
Reactions: MihaiMalos
Can you try this? It may be your version, but worth a shot. I'm on dev 30 of Bensku so I can't test with a matching version unfortunately. This works on mine though
code_language.skript:
on rightclick:
    set {_name} to name of player's tool
    if {_name} contains "&6Golden":
        remove player head from player
It works fine, but i don't get swiftness and i want to know how to set an item like that on slot 5
 
It works fine, but i don't get swiftness and i want to know how to set an item like that on slot 5
The speed isn't in that code, you'll have to add it after the remove head portion. For setting a slot just use "set slot 5 of player to itemnamehere". Careful though as it will replace any item currently in that slot
 
  • Like
Reactions: MihaiMalos
C
The speed isn't in that code, you'll have to add it after the remove head portion. For setting a slot just use "set slot 5 of player to itemnamehere". Careful though as it will replace any item currently in that slot
Code:
code_language.skript:
on rightclick:
    set {_name} to name of player's tool
    if {_name} contains "&6Golden":
        remove player head from player
        apply swiftness 2 to the player for 10 seconds
Error: https://gyazo.com/8d363ebfdaed9e570c9e4520a93de873

Code:
code_language.skript:
set slot 5 of loop-player to 3 player head of zsoccer23 named "&6Golden Head"
Error:
3ed801a77e3f6a512826d80ae2937dbe.png

https://gyazo.com/3ed801a77e3f6a512826d80ae2937dbe

I am so sorry for that many problems, but is first time when i create a skript
 
pretty much the same as you had it before, only secify it as a potion. "apply potion of swiftness 2 ..."
 
  • Like
Reactions: MihaiMalos
Status
Not open for further replies.