Should be EXTREAMLY EASY

Started by jcsnider, September 06, 2008, 03:57:19 pm

Previous topic - Next topic

jcsnider

Could someone make a small script to put above the main so that it gets rid of the Buy option in the shop when you call shop from an event or whatever.

Ryex

so do you still want the sell option to have to be selected?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

jcsnider

yea that is basically what I want if it was a normal project then I think I would be bale to do it easyily but wiht all my other scripts like netplay.... there are several different scripts that interfere with the shop.

Ryex

you right EXTREMELY easy

got the the  "Window ShopCommand" script in the default scripts
find this method


  def initialize
    super(0, 64, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 3
    @column_max = 3
    @commands = ["Buy", "Sell", "Exit"]
    refresh
    self.index = 0
  end


look at this line

@commands = ["Buy", "Sell", "Exit"]


change to this

@commands = ["Sell", "Exit"]



easy as that.

remember to add [RESOLVED] to the topic title
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

You haven't tested it since you haven't noticed that this isn't all. There's something in Scene_Shop what you need to edit as well.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Starrodkirby86

SRK, the scripting nooblet, has saved the day!!

Sir Ryexander, what you forgot is the s = 0, 1, and 2. When you removed the first choice, you actually changed Sell to Buy and Exit to Sell, so the hero can't exit the shop. D: Why? Because you did not configure the s = .

Here's the correct add-on.

Find these lines.


      when 0  # buy
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # sell
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to sell mode
        @command_window.active = false
        @dummy_window.visible = false
        @sell_window.active = true
        @sell_window.visible = true
        @sell_window.refresh
      when 2  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end


You see here, with this unedited, and what Ryex had the choice beforehand, Sell will become s = 0 and Exit will become s = 1. To that piece of code, that means Sell = Buy and Exit = Sell. That's crazy land, I tell you. So replace that line of code with this:

      #when 0  # buy
        # Play decision SE
        #$game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        #@command_window.active = false
        #@dummy_window.visible = false
        #@buy_window.active = true
        #@buy_window.visible = true
        #@buy_window.refresh
        #@status_window.visible = true
      when 0  # sell
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to sell mode
        @command_window.active = false
        @dummy_window.visible = false
        @sell_window.active = true
        @sell_window.visible = true
        @sell_window.refresh
      when 1  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end

I commented out the Buy code, but you can actually remove it. It's all cool. :P

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Ryex

Duh *Slaps face* thanks for correcting me Star If he had reported the bug I would of seen it but probably not till then
so to rephrase what Star said

in addition to my first post
find these lines in scene shop

      when 0  # buy
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to buy mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # sell
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to sell mode
        @command_window.active = false
        @dummy_window.visible = false
        @sell_window.active = true
        @sell_window.visible = true
        @sell_window.refresh
      when 2  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end


and replace with

      when 0  # sell
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Change windows to sell mode
        @command_window.active = false
        @dummy_window.visible = false
        @sell_window.active = true
        @sell_window.visible = true
        @sell_window.refresh
      when 1  # quit
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to map screen
        $scene = Scene_Map.new
      end


got that? any problem feel free to ask!
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />