Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # page 11 of 12
- # Shopoholic v 2.0
- # code by cmpsr2000
- # available exclusively @ rpgrevolution.com/forums
- # Released June 25, 2008
- #
- #-------------------------------------------------------------------------------
- class Window_Shop_Message < Window_Base
- #-----------------------------------------------------------------------------
- # Shows the restock message
- #-----------------------------------------------------------------------------
- def showRestockMessage
- showMessage("The shop has been restocked!")
- end
- #-----------------------------------------------------------------------------
- # Shows the out of stock message for the appropriate item type
- # item: The item that is out of stock
- #-----------------------------------------------------------------------------
- def showOutOfStockMessage(item)
- if item.is_a?(RPG::Item) or item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
- showMessage("Sorry, I do not have any more.")
- elsif item.is_a?(RPG::Skill)
- showMessage("You already know that skill!")
- elsif item.is_a?(RPG::Class)
- showMessage("You already understand the ways of the " + item.name + ".")
- elsif item.is_a?(RPG::Actor)
- showMessage(item.name + " is already discovered!")
- end
- end
- #-----------------------------------------------------------------------------
- # Shows the full to capacity message
- #-----------------------------------------------------------------------------
- def showCapacityMessage
- showMessage("You already have as many as you can carry.")
- end
- #-----------------------------------------------------------------------------
- # Draws a message to the window.
- # message: The message to be drawn
- #-----------------------------------------------------------------------------
- def showMessage(message)
- self.contents.clear
- self.contents.draw_text(0, 12, contents.width, WLH, message, 1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement