RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Resolved] Call Shop through scripts?

Started by cozziekuns, June 03, 2010, 09:37:59 PM

0 Members and 1 Guest are viewing this topic.

cozziekuns

Well, I need to call a shop through scripts for various reasons. How would one go about doing this? I've tried using the method that Game_Interpreter gives you:


  def command_302
    $game_temp.next_scene = "shop"
    $game_temp.shop_goods = [@params]
    $game_temp.shop_purchase_only = @params[2]
    loop do
      @index += 1
      if @list[@index].code == 605          # Shop second line or after
        $game_temp.shop_goods.push(@list[@index].parameters)
      else
        return false
      end
    end
  end


But to no avail. Whenever I type up:  $game_temp.shop_goods = [@params], and replace @params with a string of numbers, (e.g 1, 2, 3, 4,) the only things that come up are clubs and potions.

modern algebra

Try it like this instead:

$game_temp.shop_goods = [[0,5], [2,4], [1,3], ..., [type, id]]

where type is 0, 1, or 2 connoting item, weapon or armor; and id is the ID of the item you want.

Also, you the
$game_temp.next_scene = "shop"

will only work if it's coming out of Scene_Map.

Otherwise, you will need to use:


    $scene = Scene_Shop.new

cozziekuns

It worked! I knew I had to do something like that, but I just wasn't sure what. Thanks a bunch.