RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Resolved] Call Shop through scripts?

0 Members and 1 Guest are viewing this topic.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
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:

Code: [Select]
  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.
« Last Edit: June 03, 2010, 09:53:01 PM by cozziekuns »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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:

Code: [Select]
    $scene = Scene_Shop.new

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
It worked! I knew I had to do something like that, but I just wasn't sure what. Thanks a bunch.