• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Legends: Z-A protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Lure Item

  • 163
    Posts
    8
    Years
    • Seen Feb 15, 2025
    Hello colleagues!

    In Pokemon LETS GO an object similar to the repel called LURE appears ...

    The LURE, when used out of combat, causes for 100 steps an increase in the appearance rate of the rarest Pokémon on the route, as well as the greater appearance of large and small-sized Pokémon. It also favors the appearance of shiny Pokémon...

    Does anyone think it's possible to implement this in Essentials?
     
    I'm not an expert coding, but I guess you could start looking at the code of Sweet Scent.
     
    Code:
    ItemHandlers::UseInField.add(:LURE,proc{|item| (item,100)
       pbUseItemMessage(item)
       Kernel.pbMessage(_INTL("Wild Pokémon will be lured."))
       encount = encount*2 #Do you need this?
       SHINYPOKEMONCHANCE = 24
       $PokemonMap.whiteFluteUsed=true
    })
    Well, that should work almost perfectly
     
    With this...

    ItemHandlers::UseInField.add(:LURE,proc{|item|
    pbUseItemMessage(item)
    Kernel.pbMessage(_INTL("Wild Pokemon will be lured."))
    $PokemonMap.whiteFluteUsed=true
    SHINYPOKEMONCHANCE = 24
    next 1
    })

    I get strong pokemon, but not shiny ...: C And I don't know how many steps.
     
    @Not Important, in the future please could you edit or delete your posts instead of saying things like:
    Well, that should work almost perfectly
    Followed, 20 mins later by:
    Ok...
    No it doesnt
    Ill get back to you
    It's much easier for someone else trying to implement a lure item to get help in the future if they don't have to read all the posts that didn't work :)
     
    Back
    Top