1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Lore lines

Discussion in 'Development' started by iCirgio, Aug 22, 2018.

  1. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    I'm trying to make a plugin with chances.

    Let's say I have a item and its first lore saying

    Chance: 50

    How do i get that certain line and the numer only?
     
  2. MisterTurtle

    MisterTurtle Creeper

    Messages:
    5
    $lores = $item->getLores();
    $explode = explode(" ", $lores[0]);
    $chance = (int) $explode[1];

    I think it's right
     
  3. OnTheVerge

    OnTheVerge Spider Jockey

    Messages:
    46
    getLores() is not a function in pmmp. The correct function is getLore() this function returns an array.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.