dropped item

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

loadka95

Active Member
Feb 24, 2017
78
6
8
26
No error message or anything, its just not working. Can someone tell me why?
code_language.skript:
on every 30 seconds:
    loop all dropped items:
        if loop-value is spawn egg:
            name of loop-value is "&a&lEgg":
                delete loop-value
 
No error message or anything, its just not working. Can someone tell me why?
code_language.skript:
on every 30 seconds:
    loop all dropped items:
        if loop-value is spawn egg:
            name of loop-value is "&a&lEgg":
                delete loop-value

Try putting a broadcast after every line and see where it stops.
 
It doesn't work after > if loop-value is spawn egg: <that line

Hm, give me a sec.
[doublepost=1491936229,1491935932][/doublepost]Got it.
You need RandomSK

EDIT: Basically, the syntax is "items within [dropped item]"

code_language.skript:
every 30 seconds:
    loop all dropped items:
        if "%items within loop-entity%" is "spawn_egg":
            #do whatever
 
  • Like
Reactions: loadka95
Hm, give me a sec.
[doublepost=1491936229,1491935932][/doublepost]Got it.
You need RandomSK

EDIT: Basically, the syntax is "items within [dropped item]"

code_language.skript:
every 30 seconds:
    loop all dropped items:
        if "%items within loop-entity%" is "spawn_egg":
            #do whatever
Thank you! But can you give a download link for RandomSk, because the one I found is generating a lot of error.
 
Why not use "on drop" event?

code_language.skript:
on drop:
    if event-item is spawn_egg: #not sure
        set event-item to air#not sure >_<
        #clear event-item #maybe try this
 
Why not use "on drop" event?

code_language.skript:
on drop:
    if event-item is spawn_egg: #not sure
        set event-item to air#not sure >_<
        #clear event-item #maybe try this

In that case do
code_language.skript:
on drop:
    if "%event-item%" is "spawn_egg":
        delete event-item
 
In that case do
code_language.skript:
on drop:
    if "%event-item%" is "spawn_egg":
        delete event-item
You don't have to surround it with quotes, without them will be fine. Also, Skellett has the same expression of RandomSK, that might be why you can use that expression in the above post.
 
Status
Not open for further replies.