Custom Feature Question Egg Market

Started by KP7 November 9th, 2020 10:23 AM
  • 800 views
  • 22 replies
Seen 2 Days Ago
Posted 2 Weeks Ago
25 posts
2.6 Years
There is two ways, make a event or just edit this resource: https://reliccastle.com/resources/464/
Search for this:
Spoiler:
def addItem(item)
level = 5
for i in @stock
level = i[2] if i[0] == item && i[2]
end
return pbAddPokemon(item,level)
end

And replace with this:
Spoiler:
def addItem(item)
level = 5
for i in @stock
level = i[2] if i[0] == item && i[2]
end
return pbGenerateEgg(item,level)#pbAddPokemon(item,level)
end

StCooler

Seen 31 Minutes Ago
Posted 40 Minutes Ago
1,210 posts
1.1 Years
Oh okay, I didn't realise you were new to coding ^^
So, when you give arguments to the function "pbPokemonCreaturesMart", you need to put them between parentheses:
pbPokemonCreaturesMart( arguments )
Now, here, for this function, the arguments you need to give consist in one list of lists of the form:
[:POKEMON, price, 1]
and the list of lists should be between brackets and separated by commas:
[
[:POKEMON_1, price, 1],
[:POKEMON_2, price, 1],
[:POKEMON_3, price, 1]
]
When you combine all that, you need to preserve the parentheses and brackets:
pbPokemonCreaturesMart( [
[:POKEMON_1, price, 1],
[:POKEMON_2, price, 1],
[:POKEMON_3, price, 1]
])
So for your mart with only Togepi:
pbPokemonCreaturesMart( [
[:TOGEPI, 200, 1] 
])
Seen 6 Days Ago
Posted 1 Week Ago
13 posts
317 Days
Because when I use the script, it gives me this error message:

[Pokémon Essentials version 19]

Exception: RuntimeError
Message: Script error in event 2 (coords 10,6), map 22 ():
Exception: NameError
Message: uninitialized constant PBSpecies

***Full script:
pbPokemonCreaturesMart([
[:PIKACHU,12000,10],
[:ABRA,5000,12]
])


Backtrace:
356:Pokemon Mart:27:in `block in pbPokemonCreaturesMart'
356:Pokemon Mart:26:in `each'
356:Pokemon Mart:26:in `pbPokemonCreaturesMart'
(eval):1:in `execute_script'
033:Interpreter:131:in `eval'
033:Interpreter:131:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'


Backtrace:
033:Interpreter:183:in `rescue in execute_script'
033:Interpreter:129:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
032:Scene_Map:156:in `block in update'
032:Scene_Map:154:in `loop'
032:Scene_Map:154:in `update'
United Kingdom
Seen 10 Hours Ago
Posted 4 Days Ago
98 posts
327 Days
Because when I use the script, it gives me this error message:

[Pokémon Essentials version 19]

Exception: RuntimeError
Message: Script error in event 2 (coords 10,6), map 22 ():
Exception: NameError
Message: uninitialized constant PBSpecies

***Full script:
pbPokemonCreaturesMart([
[:PIKACHU,12000,10],
[:ABRA,5000,12]
])


Backtrace:
356:Pokemon Mart:27:in `block in pbPokemonCreaturesMart'
356:Pokemon Mart:26:in `each'
356:Pokemon Mart:26:in `pbPokemonCreaturesMart'
(eval):1:in `execute_script'
033:Interpreter:131:in `eval'
033:Interpreter:131:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'


Backtrace:
033:Interpreter:183:in `rescue in execute_script'
033:Interpreter:129:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
032:Scene_Map:156:in `block in update'
032:Scene_Map:154:in `loop'
032:Scene_Map:154:in `update'
My guess would be that this script doesn't work with v19 due to the new data structure.
United Kingdom
Seen 10 Hours Ago
Posted 4 Days Ago
98 posts
327 Days
Yeah, this might be true. Do you know, where I can get the 18.1 version?
Here, I updated the script for you. Please credit the original author, JV, not me for this script.

Spoiler:

#===============================================================================
#  Pokémon Mart
#    by JV
# ----------------
#  Provides an interface and backend for buying Pokémon in the same
#  style as the regular mart.
#
#  To use, simply create a script call from an event:
#  'pbPokemonCreaturesMart([[species,price,level],...])'
#
#  Example: 'pbPokemonCreaturesMart([[:PIKACHU,12000,10],[:ABRA,5000,12]])'
#
#  Enjoy the script, and make sure to give credit!
#-------------------------------------------------------------------------------

PluginManager.register({
  :name => "JV's Pokémon Mart",
  :version => "1.0",
  :credits => "JV",
  :link => "https://reliccastle.com/resources/464/"
})

#-------------------------------------------------------------------------------

def pbPokemonCreaturesMart(stock,speech=nil)
  for i in 0...stock.length
    if !GameData::Species.try_get(stock[i][0])
      stock[i] = nil
    end
  end
  stock.compact!
  commands = []
  cmdBuy  = -1
  cmdSell = -1
  cmdQuit = -1
  commands[cmdBuy = commands.length]  = _INTL("Buy")
  commands[cmdQuit = commands.length] = _INTL("Quit")
  cmd = pbMessage(
     speech ? speech : _INTL("Welcome! How may I serve you?"),
     commands,cmdQuit+1)
  loop do
    if cmdBuy>=0 && cmd==cmdBuy
      scene = PokemonCreaturesMart_Scene.new
      screen = PokemonCreaturesMartScreen.new(scene,stock)
      screen.pbBuyScreen
    else
      pbMessage(_INTL("Please come again!"))
      break
    end
    cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
       commands,cmdQuit+1)
  end
  $game_temp.clear_mart_prices
end

class PokemonCreaturesMartAdapter
  def initialize(stock)
    @stock = stock
  end

  def getMoney
    return $Trainer.money
  end

  def getMoneyString
    return pbGetGoldString
  end

  def setMoney(value)
    $Trainer.money=value
  end

  def getInventory
    return $Trainer.party
  end

  def getDisplayName(item)
    itemname = GameData::Species.get(item).real_name
    for i in @stock
      level = i[2] if i[0] == item
    end
    return "#{itemname} (Lv. #{level})"
  end

  def getName(item)
    return GameData::Species.get(item).real_name
  end

  def getDescription(item)
    echoln(item)
    return GameData::Species.get(item).real_pokedex_entry
  end

  def getItemIcon(item)
    return nil if !item
    file = pbCheckPokemonIconFiles([item,nil,nil,nil,nil],nil)
    return AnimatedBitmap.new(file).deanimate
  end

  def getItemIconRect(_item)
    return Rect.new(0,0,64,64)
  end

  def getQuantity(item)
    return nil
  end

  def showQuantity?(item)
    return false
  end

  def getPrice(item,selling=false)
    for i in @stock
      return i[1] if i[0] == item
    end
    return 10000
  end

  def getDisplayPrice(item,selling=false)
    price = getPrice(item,selling).to_s_formatted
    return _INTL("$ {1}",price)
  end

  def canSell?(item)
    return false
  end

  def addItem(item)
    level = 5
    for i in @stock
      level = i[2] if i[0] == item && i[2]
    end
    return pbAddPokemon(item,level)
  end

  def removeItem(item)
    return nil
  end
end

class PokemonCreaturesMartScreen < PokemonMartScreen
  def initialize(scene,stock)
    @scene=scene
    @stock=[]
    @adapter=PokemonCreaturesMartAdapter.new(stock)
    for i in stock
      @stock.push(i.first)
    end
  end

  def pbBuyScreen
    @scene.pbStartBuyScene(@stock,@adapter)
    item=0
    loop do
      [email protected]
      quantity=1
      break if item==0
      [email protected](item)
      [email protected](item)
      if @adapter.getMoney<price
        pbDisplayPaused(_INTL("You don't have enough money."))
        next
      end
      if !pbConfirm(_INTL("Certainly. You want {1}. That will be ${2}. OK?",
          itemname,price.to_s_formatted))
        next
      end
      unless pbBoxesFull?
        @adapter.setMoney(@adapter.getMoney-price)
        pbDisplayPaused(_INTL("Here you are! Thank you!")) { pbSEPlay("Mart buy item") }
        @adapter.addItem(item)
      else
        pbDisplayPaused(_INTL("You have no more room in the Storage."))
      end
    end
    @scene.pbEndBuyScene
  end
end

class PokemonCreaturesMart_Scene < PokemonMart_Scene
  def pbRefresh
    if @subscene
      @subscene.pbRefresh
    else
      [email protected]["itemwindow"]
      @sprites["icon"].species=itemwindow.item
      @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Quit shopping.") :
         "<fs=24>#{@adapter.getDescription(itemwindow.item)}</fs>"
      itemwindow.refresh
    end
    @sprites["moneywindow"].text=_INTL("Money:\r\n<r>{1}",@adapter.getMoneyString)
  end

  def pbStartBuyOrSellScene(buying,stock,adapter)
    # Scroll right before showing screen
    pbScrollMap(6,5,5)
    @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
    @viewport.z=99999
    @stock=stock
    @adapter=adapter
    @sprites={}
    @sprites["background"]=IconSprite.new(0,0,@viewport)
    @sprites["background"].setBitmap("Graphics/Pictures/martScreen")
    @sprites["icon"]=PokemonSpeciesIconSprite.new(0,@viewport)
    @sprites["icon"].x = 4
    @sprites["icon"].y = Graphics.height-90
    winAdapter=buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
    @sprites["itemwindow"]=Window_PokemonMart.new(stock,winAdapter,
       Graphics.width-316-16,12,330+16,Graphics.height-126)
    @sprites["itemwindow"][email protected]
    @sprites["itemwindow"].index=0
    @sprites["itemwindow"].refresh
    @sprites["itemtextwindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["itemtextwindow"])
    @sprites["itemtextwindow"].x=64
    @sprites["itemtextwindow"].y=Graphics.height-96-16
    @sprites["itemtextwindow"].width=Graphics.width-64
    @sprites["itemtextwindow"].height=128
    @sprites["itemtextwindow"].baseColor=Color.new(248,248,248)
    @sprites["itemtextwindow"].shadowColor=Color.new(0,0,0)
    @sprites["itemtextwindow"].visible=true
    @sprites["itemtextwindow"][email protected]
    @sprites["itemtextwindow"].windowskin=nil
    @sprites["helpwindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["helpwindow"])
    @sprites["helpwindow"].visible=false
    @sprites["helpwindow"][email protected]
    pbBottomLeftLines(@sprites["helpwindow"],1)
    @sprites["moneywindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["moneywindow"])
    @sprites["moneywindow"].setSkin("Graphics/Windowskins/goldskin")
    @sprites["moneywindow"].visible=true
    @sprites["moneywindow"][email protected]
    @sprites["moneywindow"].x=0
    @sprites["moneywindow"].y=0
    @sprites["moneywindow"].width=190
    @sprites["moneywindow"].height=96
    @sprites["moneywindow"].baseColor=Color.new(88,88,80)
    @sprites["moneywindow"].shadowColor=Color.new(168,184,184)
    pbDeactivateWindows(@sprites)
    @buying=buying
    pbRefresh
    Graphics.frame_reset
  end

  def pbChooseBuyItem
    [email protected]["itemwindow"]
    @sprites["helpwindow"].visible=false
    pbActivateWindow(@sprites,"itemwindow") {
      pbRefresh
      loop do
        Graphics.update
        Input.update
        olditem=itemwindow.item
        self.update
        if itemwindow.item!=olditem
          @sprites["icon"].species=itemwindow.item
          @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Quit shopping.") :
          "<fs=24>#{@adapter.getDescription(itemwindow.item)}</fs>"
        end
        if Input.trigger?(Input::B)
          pbPlayCloseMenuSE
          return 0
        elsif Input.trigger?(Input::C)
          if itemwindow.index<@stock.length
            pbRefresh
            return @stock[itemwindow.index]
          else
            return 0
          end
        end
      end
    }
  end
end
Seen 6 Days Ago
Posted 1 Week Ago
13 posts
317 Days
Hi,

wow, thanks a lot for the script update!
It works fine, however if I use the up/down button, it would crash and give me this error:


[Pokémon Essentials version 19]

Exception: RuntimeError
Message: Script error in event 2 (coords 10,6), map 22 ():
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, GameData::Species, String, Integer], but got NilClass.

***Full script:
pbPokemonCreaturesMart([
[:PIKACHU,12000,12]
])


Backtrace:
015:Validation:29:in `validate'
102:GameData:26:in `get'
356:Pokemon Mart:91:in `getDescription'
356:Pokemon Mart:259:in `block (2 levels) in pbChooseBuyItem'
356:Pokemon Mart:251:in `loop'
356:Pokemon Mart:251:in `block in pbChooseBuyItem'
081:MessageConfig:691:in `pbActivateWindow'
356:Pokemon Mart:249:in `pbChooseBuyItem'
356:Pokemon Mart:155:in `block in pbBuyScreen'
356:Pokemon Mart:154:in `loop'


Backtrace:
033:Interpreter:183:in `rescue in execute_script'
033:Interpreter:129:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
032:Scene_Map:156:in `block in update'
032:Scene_Map:154:in `loop'
032:Scene_Map:154:in `update'
United Kingdom
Seen 10 Hours Ago
Posted 4 Days Ago
98 posts
327 Days
Spoiler:

Hi,

wow, thanks a lot for the script update!
It works fine, however if I use the up/down button, it would crash and give me this error:


[Pokémon Essentials version 19]

Exception: RuntimeError
Message: Script error in event 2 (coords 10,6), map 22 ():
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, GameData::Species, String, Integer], but got NilClass.

***Full script:
pbPokemonCreaturesMart([
[:PIKACHU,12000,12]
])


Backtrace:
015:Validation:29:in `validate'
102:GameData:26:in `get'
356:Pokemon Mart:91:in `getDescription'
356:Pokemon Mart:259:in `block (2 levels) in pbChooseBuyItem'
356:Pokemon Mart:251:in `loop'
356:Pokemon Mart:251:in `block in pbChooseBuyItem'
081:MessageConfig:691:in `pbActivateWindow'
356:Pokemon Mart:249:in `pbChooseBuyItem'
356:Pokemon Mart:155:in `block in pbBuyScreen'
356:Pokemon Mart:154:in `loop'


Backtrace:
033:Interpreter:183:in `rescue in execute_script'
033:Interpreter:129:in `execute_script'
034:Interpreter_Commands:1024:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:121:in `block in update'
033:Interpreter:81:in `loop'
033:Interpreter:81:in `update'
032:Scene_Map:156:in `block in update'
032:Scene_Map:154:in `loop'
032:Scene_Map:154:in `update'


Alright, this should work now:

Spoiler:

#===============================================================================
#  Pokémon Mart
#    by JV
# ----------------
#  Provides an interface and backend for buying Pokémon in the same
#  style as the regular mart.
#
#  To use, simply create a script call from an event:
#  'pbPokemonCreaturesMart([[species,price,level],...])'
#
#  Example: 'pbPokemonCreaturesMart([[:PIKACHU,12000,10],[:ABRA,5000,12]])'
#
#  Enjoy the script, and make sure to give credit!
#-------------------------------------------------------------------------------

PluginManager.register({
  :name => "JV's Pokémon Mart",
  :version => "1.0",
  :credits => "JV",
  :link => "https://reliccastle.com/resources/464/"
})

#-------------------------------------------------------------------------------

def pbPokemonCreaturesMart(stock,speech=nil)
  for i in 0...stock.length
    if !GameData::Species.try_get(stock[i][0])
      stock[i] = nil
    end
  end
  stock.compact!
  commands = []
  cmdBuy  = -1
  cmdSell = -1
  cmdQuit = -1
  commands[cmdBuy = commands.length]  = _INTL("Buy")
  commands[cmdQuit = commands.length] = _INTL("Quit")
  cmd = pbMessage(
     speech ? speech : _INTL("Welcome! How may I serve you?"),
     commands,cmdQuit+1)
  loop do
    if cmdBuy>=0 && cmd==cmdBuy
      scene = PokemonCreaturesMart_Scene.new
      screen = PokemonCreaturesMartScreen.new(scene,stock)
      screen.pbBuyScreen
    else
      pbMessage(_INTL("Please come again!"))
      break
    end
    cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
       commands,cmdQuit+1)
  end
  $game_temp.clear_mart_prices
end

class PokemonCreaturesMartAdapter
  def initialize(stock)
    @stock = stock
  end

  def getMoney
    return $Trainer.money
  end

  def getMoneyString
    return pbGetGoldString
  end

  def setMoney(value)
    $Trainer.money=value
  end

  def getInventory
    return $Trainer.party
  end

  def getDisplayName(item)
    itemname = GameData::Species.get(item).real_name
    for i in @stock
      level = i[2] if i[0] == item
    end
    return "#{itemname} (Lv. #{level})"
  end

  def getName(item)
    return GameData::Species.get(item).real_name
  end

  def getDescription(item)
    echoln(item)
    return GameData::Species.get(item).real_pokedex_entry
  end

  def getItemIcon(item)
    return nil if !item
    file = pbCheckPokemonIconFiles([item,nil,nil,nil,nil],nil)
    return AnimatedBitmap.new(file).deanimate
  end

  def getItemIconRect(_item)
    return Rect.new(0,0,64,64)
  end

  def getQuantity(item)
    return nil
  end

  def showQuantity?(item)
    return false
  end

  def getPrice(item,selling=false)
    for i in @stock
      return i[1] if i[0] == item
    end
    return 10000
  end

  def getDisplayPrice(item,selling=false)
    price = getPrice(item,selling).to_s_formatted
    return _INTL("$ {1}",price)
  end

  def canSell?(item)
    return false
  end

  def addItem(item)
    level = 5
    for i in @stock
      level = i[2] if i[0] == item && i[2]
    end
    return pbAddPokemon(item,level)
  end

  def removeItem(item)
    return nil
  end
end

class PokemonCreaturesMartScreen < PokemonMartScreen
  def initialize(scene,stock)
    @scene=scene
    @stock=[]
    @adapter=PokemonCreaturesMartAdapter.new(stock)
    for i in stock
      @stock.push(i.first)
    end
  end

  def pbBuyScreen
    @scene.pbStartBuyScene(@stock,@adapter)
    item=0
    loop do
      [email protected]
      quantity=1
      break if item==0
      [email protected](item)
      [email protected](item)
      if @adapter.getMoney<price
        pbDisplayPaused(_INTL("You don't have enough money."))
        next
      end
      if !pbConfirm(_INTL("Certainly. You want {1}. That will be ${2}. OK?",
          itemname,price.to_s_formatted))
        next
      end
      unless pbBoxesFull?
        @adapter.setMoney(@adapter.getMoney-price)
        pbDisplayPaused(_INTL("Here you are! Thank you!")) { pbSEPlay("Mart buy item") }
        @adapter.addItem(item)
      else
        pbDisplayPaused(_INTL("You have no more room in the Storage."))
      end
    end
    @scene.pbEndBuyScene
  end
end

class PokemonCreaturesMart_Scene < PokemonMart_Scene
  def pbRefresh
    if @subscene
      @subscene.pbRefresh
    else
      [email protected]["itemwindow"]
      @sprites["icon"].species=itemwindow.item
      @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Quit shopping.") :
         "<fs=24>#{@adapter.getDescription(itemwindow.item)}</fs>"
      itemwindow.refresh
    end
    @sprites["moneywindow"].text=_INTL("Money:\r\n<r>{1}",@adapter.getMoneyString)
  end

  def pbStartBuyOrSellScene(buying,stock,adapter)
    # Scroll right before showing screen
    pbScrollMap(6,5,5)
    @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
    @viewport.z=99999
    @stock=stock
    @adapter=adapter
    @sprites={}
    @sprites["background"]=IconSprite.new(0,0,@viewport)
    @sprites["background"].setBitmap("Graphics/Pictures/martScreen")
    @sprites["icon"]=PokemonSpeciesIconSprite.new(0,@viewport)
    @sprites["icon"].x = 4
    @sprites["icon"].y = Graphics.height-90
    winAdapter=buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
    @sprites["itemwindow"]=Window_PokemonMart.new(stock,winAdapter,
       Graphics.width-316-16,12,330+16,Graphics.height-126)
    @sprites["itemwindow"][email protected]
    @sprites["itemwindow"].index=0
    @sprites["itemwindow"].refresh
    @sprites["itemtextwindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["itemtextwindow"])
    @sprites["itemtextwindow"].x=64
    @sprites["itemtextwindow"].y=Graphics.height-96-16
    @sprites["itemtextwindow"].width=Graphics.width-64
    @sprites["itemtextwindow"].height=128
    @sprites["itemtextwindow"].baseColor=Color.new(248,248,248)
    @sprites["itemtextwindow"].shadowColor=Color.new(0,0,0)
    @sprites["itemtextwindow"].visible=true
    @sprites["itemtextwindow"][email protected]
    @sprites["itemtextwindow"].windowskin=nil
    @sprites["helpwindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["helpwindow"])
    @sprites["helpwindow"].visible=false
    @sprites["helpwindow"][email protected]
    pbBottomLeftLines(@sprites["helpwindow"],1)
    @sprites["moneywindow"]=Window_AdvancedTextPokemon.new("")
    pbPrepareWindow(@sprites["moneywindow"])
    @sprites["moneywindow"].setSkin("Graphics/Windowskins/goldskin")
    @sprites["moneywindow"].visible=true
    @sprites["moneywindow"][email protected]
    @sprites["moneywindow"].x=0
    @sprites["moneywindow"].y=0
    @sprites["moneywindow"].width=190
    @sprites["moneywindow"].height=96
    @sprites["moneywindow"].baseColor=Color.new(88,88,80)
    @sprites["moneywindow"].shadowColor=Color.new(168,184,184)
    pbDeactivateWindows(@sprites)
    @buying=buying
    pbRefresh
    Graphics.frame_reset
  end

  def pbChooseBuyItem
    [email protected]["itemwindow"]
    @sprites["helpwindow"].visible=false
    pbActivateWindow(@sprites,"itemwindow") {
      pbRefresh
      loop do
        Graphics.update
        Input.update
        olditem=itemwindow.item
        self.update
        if itemwindow.item!=olditem
          @sprites["icon"].species=itemwindow.item
          @sprites["itemtextwindow"].text= !itemwindow.item ? _INTL("Quit shopping.") :
          "<fs=24>#{@adapter.getDescription(itemwindow.item)}</fs>"
        end
        if Input.trigger?(Input::B)
          pbPlayCloseMenuSE
          return 0
        elsif Input.trigger?(Input::C)
          if itemwindow.index<@stock.length
            pbRefresh
            return @stock[itemwindow.index]
          else
            return 0
          end
        end
      end
    }
  end
end
Seen 6 Days Ago
Posted 1 Week Ago
13 posts
317 Days
Just an additional idea: Can this script be extended to allow the Player to sell their Pokémon for a certain amount of money?

Just a few idea: dependant on the level (like bigger than or lower than) for this amount, check whether it is a shiny and then multiply it.
Or even a customizable list of Pokémon to define their prices.

Another option would be to even generate a list with random Pokemon and random price.

Would it be possible to integrate it into the script and is someone up for this task?