• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Eventing Question] Spending Ticket-Items via script choices? How do I get vending machines to exchange tickets for your choice from a set of 6 Pokemon?

429
Posts
4
Years
  • I have coded a PokeTicket item, it's expensive and it goes in the item pocket when bought. I've got the Vending Machines looking right, but how do I script them?

    My goal is to create a vending machine for Pokemon, with six different Pokemon available. It will give you a choice of those six, and then trade one of your PokeTickets for a Pokeball containing your chosen Pokemon. It should also let you cancel and walk away after showing you what's on offer. And if you lack any PokeTickets, you are told to come back when you have more PokeTickets.

    I know how to add Pokemon to the player via script, but how do I program this "Pokemon for PokeTicket" transaction?
     
    26
    Posts
    5
    Years
    • Seen Nov 25, 2021
    You need to erase the item(ticket) and give the pokémon after it.
     
    26
    Posts
    5
    Years
    • Seen Nov 25, 2021
    pbHasItem?(item) to check, and pbDeleteItem(item,qty) to delete the ticket.
     
    Back
    Top