• 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 Conquest 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] Custom Points Mart Vendor

  • 28
    Posts
    6
    Years
    Hey there, i am trying to code a special vendor that allows you to buy items from him that you gained with a special point system. The question is how would i do something like that. (I already made the variable show up and the system that allows for earning them.)

    If anyone could help me out that would be great.

    My idea was that it showed the normal Mart Selection Screen but instead of the PokeDollars, it would show the points as prices and your own money would show the points instead of the normal money one.
    That's a bit of a idea on how i want it.
     
    Last edited:
    Same here, I want to make a special shop with a different currency.
     
    Maybe something like this?

    Code:
    def pbSpecialMart
            Kernel.pbMessage(_INTL("Welcome to my shop."))
      loop do
        command=Kernel.pbShowCommandsWithHelp(nil,
           [_INTL("$100 A thing!"),
           _INTL("$150 Another thing!"),
           _INTL("$200 A better thing!"),
           _INTL("Exit")],
           [_INTL("A thing that does a thing."),
           _INTL("Another thing that also does a thing."),
           _INTL("A thing that does a thing but better."),
           _INTL("Are you finished shopping?")],-1
        )
        if command==0 # Buy a thing
          if  $globalVariableForSpecialMoney>=100
            $globalVariableForSpecialMoney-=100
            Kernel.pbReceiveItem(:THING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        elsif command==1 # Buy Another thing
          if  $globalVariableForSpecialMoney>=150
            $globalVariableForSpecialMoney-=150
            Kernel.pbReceiveItem(:ANOTHERTHING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        elsif command==2 # Buy A better thing
          if  $globalVariableForSpecialMoney>=200
            $globalVariableForSpecialMoney-=200
            Kernel.pbReceiveItem(:ABETTERTHING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        else
            Kernel.pbMessage(_INTL("Please come again!"))
          break
        end
      end
    end
     
    Last edited:
    Maybe something like this?

    Code:
    def pbSpecialMart
            Kernel.pbMessage(_INTL("Welcome to my shop."))
      loop do
        command=Kernel.pbShowCommandsWithHelp(nil,
           [_INTL("$100 A thing!"),
           _INTL("$150 Another thing!"),
           _INTL("$200 A better thing!"),
           _INTL("Exit")],
           [_INTL("A thing that does a thing."),
           _INTL("Another thing that also does a thing."),
           _INTL("A thing that does a thing but better."),
           _INTL("Are you finished shopping?")],-1
        )
        if command==0 # Buy a thing
          if  $globalVariableForSpecialMoney>=100
            $globalVariableForSpecialMoney-=100
            Kernel.pbReceiveItem(:THING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        elsif command==1 # Buy Another thing
          if  $globalVariableForSpecialMoney>=150
            $globalVariableForSpecialMoney-=150
            Kernel.pbReceiveItem(:ANOTHERTHING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        elsif command==2 # Buy A better thing
          if  $globalVariableForSpecialMoney>=200
            $globalVariableForSpecialMoney-=200
            Kernel.pbReceiveItem(:ABETTERTHING)
          else
            Kernel.pbMessage(_INTL("I'm sorry but you don't have enough special money."))
          end
          end
        else
            Kernel.pbMessage(_INTL("Please come again!"))
          break
        end
      end
    end

    Thanks bud! imma gonna try it now!
     
    Back
    Top