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

Make NPCdialog

Discussion in 'Development' started by Chisi, Jun 10, 2021.

  1. Chisi

    Chisi Spider

    Messages:
    6
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    You just sent us the source.

    What you might be looking for, is how to use the source, which again is shown in the link you've given us.

    Does this boil down to be a question of how to create plugins in general?
     
    Chisi likes this.
  3. Chisi

    Chisi Spider

    Messages:
    6
    yup I mean how to make a plugin with this source, and I want to see the finished plugin
     
  4. Axon

    Axon Zombie

    Messages:
    276
    You can create a plugin like any other plugin in poggit.
    Read the README.MD on the github page on how to use it.
    EG:
    PHP:
    $form = new DialogForm("This is the dialog text");
     
    $form->addButton(new Button("Hi", function(Player $player) {
        
    $player->sendMessage("Hi!!");
    }));

    $form->setCloseListener(function(Player $player) {
        
    $player->sendMessage("You closed the form!");
    });

    $form->pairWithEntity($entity);
     
    Agent, Chisi and minijaham like this.
  5. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Literally says it right there bruh

    upload_2021-6-11_9-4-30.png
     
  6. Chisi

    Chisi Spider

    Messages:
    6
    sorry, I don't really understand the explanation, that's why I want to see the finished one in its entirety
     
  7. Chisi

    Chisi Spider

    Messages:
    6
    btw, do you use the command to spawn the entity?
     
  8. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    :facepalm:
    I think you'll need to learn how to make a plugin first!
     
  9. Chisi

    Chisi Spider

    Messages:
    6
    I already know how to create a plugin, but I'm still confused about whether to use the command to spawn the entity? and what is the code
     
  10. Axon

    Axon Zombie

    Messages:
    276
    The code examples are provided in the README.md.
    If you never knew, You have to create your own code. Just like you create your own tea or sandwhich.
     
    Agent and minijaham like this.
  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.