#Why isnt this dropping the loot i want it to?

1 messages · Page 1 of 1 (latest)

vestal coral
#

i made a skript that changes loottables in fishing, and instead of dropping anything, it just gives xp, why?

skript:

    #verdant koi item variable
    set {verdantkoi} to salmon with lore "&7It looks as if it's made of lilypads." and "&8Material"
    enchant {verdantkoi} with mending
    set item model of {verdantkoi} to "custom:verdant_koi_model"
    set name of {verdantkoi} to "&r&fVerdant Koi"
    enchant {verdantkoi} with mending
    add hide enchantments to item flags of {verdantkoi}

    # Mossy crate item variable
    set {mossycrate} to moss block with lore "&7Right Click to open!"
    set item model of {mossycrate} to "custom:mossy_crate_model"
    set name of {mossycrate} to "&fMossy Loot Crate"

    set {cod} to cod with lore "&7You know what that means." and "&8Material"
    set {salmon} to salmon with lore "&7It's got a high omega-3 count... mmm..." and "&8Material"
    set {string} to string with lore "&7How exactly do you harvest this from spiders?" and "&8Material"
    set {lilypad} to lily pad with lore "&7Not a sponsor (smh)" and "&8Material"

    set {shoe} to green dye with name "&7Soggy Shoe" with lore "&8Who threw a shoe into the pond?"
    set item model of {shoe} to "custom:old_shoe_model"

    set {tire} to black dye with name "&7Old Tire" with lore "&8Wait, a tire? How did this get here?"
    set item model of {tire} to "custom:tire_model"
    #---------------\/ loot tables \/-----------------------------------------

    set {badloot::*} to {shoe} and {tire}
    set {rareloot::*} to {mossycrate} and {verdantkoi}
    set {regularloot::*} to {cod}, {salmon}, {string} and {lilypad}

on fish catch:
    chance of 20%:
        set item of event-entity to random element of {rareloot::*}
    chance of 50%:
        set item of event-entity to random element of {regularloot::*}
    chance of 30%:
        set item of event-entity to random element of {badloot::*}
young halo
vestal coral
young halo
#

oh

main hornet
#

Try giving yourself one of the item variables to see if thats the thing causing the error

vestal coral
#

i did, all the item variables are working fine

main hornet
#

And to remove the old drops and xp cancel the event and delete the hook on catch

#

cancel event

#

delete player's current fish hook

#

req skbee

violet cove
vestal coral
violet cove
vestal coral
#

i'll test that

violet cove
# vestal coral yes it does

How about if you do this:

    chance of 20%:
        set item of event-entity to diamond
    chance of 80%:
        set item of event-entity to {shoe}```
#

I typed that on my phone so you'll need to add a tab yourself

vestal coral
#

that works, but i also got regular fishing drops

#

i guess what i mean to do with the list is that it would be easier to sort everything

main hornet
vestal coral
#

how would i do that?

violet cove
#

So location of event-projectile would be where you'd want to spawn the items

vestal coral
#

how do i spawn an item entity?

main hornet
#

i think...?

vestal coral
#

what is wrong with my original skript with setting the event-entity?

#

is it my list variable?

main hornet
vestal coral
#

let me rephrase, it spawns at the bobber but doesnt get pulled back to the player

main hornet
#

ah yes

#

here

#

i have something for that too

#

set {_v} to the vector between block 0.5 above player and last spawned item

#

push last spawned item {_v} at speed 2

#

try that

vestal coral
main hornet
#

uhhhh

vestal coral
#

am i missing an addon or something?

violet cove
# vestal coral

You need to specify which direction you want to "push" the item

#

i.e. upwards