Advertisement
Guest User

Shopaholic Page 11

a guest
Jul 29th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. #-------------------------------------------------------------------------------
  2. # page 11 of 12
  3. # Shopoholic v 2.0
  4. # code by cmpsr2000
  5. # available exclusively @ rpgrevolution.com/forums
  6. # Released June 25, 2008
  7. #
  8. #-------------------------------------------------------------------------------
  9. class Window_Shop_Message < Window_Base
  10. #-----------------------------------------------------------------------------
  11. # Shows the restock message
  12. #-----------------------------------------------------------------------------
  13. def showRestockMessage
  14. showMessage("The shop has been restocked!")
  15. end
  16. #-----------------------------------------------------------------------------
  17. # Shows the out of stock message for the appropriate item type
  18. # item: The item that is out of stock
  19. #-----------------------------------------------------------------------------
  20. def showOutOfStockMessage(item)
  21. if item.is_a?(RPG::Item) or item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
  22. showMessage("Sorry, I do not have any more.")
  23. elsif item.is_a?(RPG::Skill)
  24. showMessage("You already know that skill!")
  25. elsif item.is_a?(RPG::Class)
  26. showMessage("You already understand the ways of the " + item.name + ".")
  27. elsif item.is_a?(RPG::Actor)
  28. showMessage(item.name + " is already discovered!")
  29. end
  30. end
  31. #-----------------------------------------------------------------------------
  32. # Shows the full to capacity message
  33. #-----------------------------------------------------------------------------
  34. def showCapacityMessage
  35. showMessage("You already have as many as you can carry.")
  36. end
  37. #-----------------------------------------------------------------------------
  38. # Draws a message to the window.
  39. # message: The message to be drawn
  40. #-----------------------------------------------------------------------------
  41. def showMessage(message)
  42. self.contents.clear
  43. self.contents.draw_text(0, 12, contents.width, WLH, message, 1)
  44. end
  45.  
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement