Solved Need help with adding eye to end portal frame

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

ViperX

Member
Jul 26, 2022
26
0
1
24
Hey, I trying to make a skript that when you right click with a item on a end portal frame its putting the eye inside of it... here is my code:
Code:
if event-block is ender portal frame:
        if name of event-player's tool is "&5Summoning Eye":
            set block at location of event-block to end portal frame [eye=true]

The error:
upload_2022-7-26_13-42-58.png


if I need an addon for this tell me too please :emoji_slight_smile:
 
What about this?
Code:
on click:
    if event-block is end portal frame:
        if name of event-player's tool is "&5Summoning Eye":
            set block at location of event-block to end portal frame [eye=true]
If this is not working, please send the output of /skript info here.
 
Not working its the same as my code....

wdym by /skript info?
there is no command...

The Problem is in line 23
all code:
Code:
on rightclick:
    if event-block is ender portal frame:
        set {_times} to 1
        set {_contains} to 0
        loop 8 times:
            if {frame::loc::%{_times}%} is location of event-block:
                set {_contains} to 1
            set {_times} to {_times} + 1
        if {_contains} is 1:
            if name of event-player's tool is "&5Summoning Eye":
                if {placed::amount} is not set:
                    set {placed::amount} to 0
                if {placed::amount} < 8:
                    set {_times} to 1
                    set {_contains} to 0
                    loop 8 times:
                        if {placed::loc::%{_times}%} is location of event-block:
                            set {_contains} to 1
                        set {_times} to {_times} + 1
                    if {_contains} is 1:
                        send "&cThere is already eye placed here" to event-player
                    else:
                        #set block at location of event-block to end portal frame [eye=true]
                        set {placed::amount} to {placed::amount} + 1
                        set {placed::loc::%{placed::amount}%} to location of event-block
                        set {placed::%event-player%::%{placed::amount}%} to location of event-block
                        set {placed::%event-player%::amount} to {placed::%event-player%::amount} + 1
                        send "%event-player% &5Placed Summoning Eye &8(&e%{placed::amount}%&b/&e8&8)" to all players in world "EndermanPlace"
                        remove head named "&5Summoning Eye" from event-player's inventory
                else:
                    send "&cAready spawned dragon!" to event-player
            else:
                cancel event
        else:
            if {frame::setting} > 0:
                set {frame::loc::%{frame::setting}%} to location of event-block
                send "&aFrame location [%{frame::setting}%] set to %{frame::loc::%{frame::setting}%}% (%event-block%)!" to event-player
                set {frame::setting} to 0
 
Skript Info should output the Server, Skript and Addon versions, if this is not available to you, please provide them by hand.
 
ok so I have skript, mundoSK, SharpSK, SKaction, skbee, skdragon, skellet, skquery, skrayfall, skript gui, skunity, tuske, wildskript
 
ok so I have skript, mundoSK, SharpSK, SKaction, skbee, skdragon, skellet, skquery, skrayfall, skript gui, skunity, tuske, wildskript
What's the Skript Version? Is this Paper, Spigot? What's the Server Version?
 
Spigot 1.8.8
[doublepost=1658990057,1658835243][/doublepost]Solved:
Code:
set event-block's data to 4
 
Status
Not open for further replies.