Death10 12 Posted December 19, 2011 (edited) Text Bar Author: Death10 Introduction Running text Script *Call script: -On: $game_system.ads_option = 1 -Off: $game_system.ads_option = 2 -Change: +Text: $game_system.ads_x = "Text" +Background: $game_system.ads_back = "Back.png" #============================================================================== # ** Text Bar #============================================================================== # Author: Death10 # http://gamesvts.com # http://taotrochoi.com #============================================================================== # *Call script: # -On: $game_system.ads_option = 1 # -Off: $game_system.ads_option = 2 # -Change: # +Text: $game_system.ads_x = "Text" # +Background: $game_system.ads_back = "Back.png" #============================================================================== $game_system = Game_System.new #DataManager.load_normal_database module Cache def self.load_bitmap2(file, hue = 0) @cache ||= {} if file.empty? empty_bitmap elsif hue == 0 normal_bitmap(file) else hue_changed_bitmap(file, hue) end end end class Game_System attr_accessor :ads attr_accessor :ads_on attr_accessor :ads_x attr_accessor :ads_option attr_accessor :ads_back alias initialize_ads initialize def initialize initialize_ads @ads = "Text Bar" @ads_back = "Graphics/Titles1/#{$data_system.title1_name}" @ads_option = 1 @ads_on = 1 @ads_x = 0 end end class TB < Window_Base def initialize super(0, 0, 544, 64) self.opacity = 0 #$game_system = Game_System.new check refresh end def check case $game_system.ads_option when 1 $game_system.ads_on = 1 $game_system.ads_x = -contents.text_size($game_system.ads).width $game_system.ads_option = 0 when 2 $game_system.ads_on = 0 $game_system.ads_option = 0 end end def refresh check contents.clear cx = contents.text_size($game_system.ads).width if $game_system.ads_x == -cx $game_system.ads_x = 544 else $game_system.ads_x -= 0.5 end if $game_system.ads_on == 1 contents.blt(0, 0, Cache.load_bitmap2($game_system.ads_back), Rect.new(0, 0, 544, 32), 160) contents.draw_text($game_system.ads_x, 0, cx, 32, $game_system.ads, 2) end end def open super refresh end end class Scene_Map < Scene_Base alias caw create_all_windows def create_all_windows caw @ads = TB.new end alias update_ads update def update update_ads @ads.open end alias utp update_transfer_player def update_transfer_player utp case $game_system.ads_on when 0 @map_name_window.y = 0 when 1 @map_name_window.y = 44 end end end Screenshot UPDATE: 24/12/2011 - Fixed some bugs Edited July 18, 2012 by Death10 6 Share this post Link to post Share on other sites
Rosenblack 79 Posted December 19, 2011 *Added to the Master Script List* Share this post Link to post Share on other sites
shaz 77 Posted December 19, 2011 Nice ... if you put your text into code /code tags, it'll keep the formatting & make it easier to read 1 Share this post Link to post Share on other sites
EBelle 12 Posted December 20, 2011 Nice I can think of a few ways to use this... Share this post Link to post Share on other sites
xmartyr7 45 Posted December 20, 2011 This could become useful for objectives display or hints... or perhaps notifications of things going on in the game world. Nice job, I'll probably use this. Share this post Link to post Share on other sites
???nOBodY??? 30 Posted December 20, 2011 I came. I saw. I liked. Share this post Link to post Share on other sites
Lanechology 4 Posted December 21, 2011 Wow , this really cool . Share this post Link to post Share on other sites
Korten 0 Posted March 17, 2012 How do you exactly use the script? D: Also when I copy it into the custom scripts, it is all on one line. Share this post Link to post Share on other sites
cnrkitten 0 Posted January 3, 2014 ^_^Really nice script here. Just need alittle help with changing the txt for different maps but still, its a really good script Share this post Link to post Share on other sites