The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: Dark_falcao on April 15, 2009, 03:13:07 PM

Title: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: Dark_falcao on April 15, 2009, 03:13:07 PM
Hello people,

Im new here, i can say that im impresend about this page It's the best!

Im bring you a script to show the amount of gold in the map. The script draw in the map an Icon of a litle bag of money olso

Intructions : Just copy and paste the script into your project and let the script to do the rest.  may be you need to desable the script any time in the game, you can disable the script, turn on the switch 5 (by default) and the gold in the screen gone, turn off and appear agian.      Credits to: Falcao

screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg8.imageshack.us%2Fimg8%2F2726%2Fdinerovx.jpg&hash=2a39adabe93246029f7f7ff97f63e4aa1c8d20ce)

here the code
Code: [Select]
#========================================================================#
#========================================================================#
#  #*****************#        Muestra el dinero en el mapa con           #
#  #*** By Falcao ***#        iconos y el nombre de la base de           #         
#  #*****************#        datos.   GoldMap v1.0
#        RMVX                 Credits to Falcao. 
#========================================================================#

module Gold_Map
#------------------------------------------------------------------------
# Interruptor que desactiva la muestra de dinero en el mapa
Gold_disable = 5
#------------------------------------------------------------------------
#Posision X del dinero en el mapa
Posision_X = 410
#------------------------------------------------------------------------
#Posision Y del dinero en el mapa
Posision_Y = 333
#------------------------------------------------------------------------
end

class Window_Gold_map < Window_Base
  def initialize
    super(0, 0, 135, 85)
    self.opacity = 0
    refresh
  end
  def refresh
    self.contents.clear
    icon = Cache.system("IconSet")
    src_rect = Rect.new(0, 216, 24, 26)
    self.contents.blt(30 , 30,icon, src_rect)
    cx = contents.text_size($data_system.terms.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(-20, 30, 120, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(100-cx, -3, cx, 32, $data_system.terms.gold, 2)
  end
  def update
    refresh
  end
end

class Scene_Map
  include Gold_Map
  alias falcao_gold_main main
  def main
    @gold_map =  Window_Gold_map.new
    @gold_map.x = Posision_X
    @gold_map.y = Posision_Y
    if $game_switches[Gold_disable] == false
      @gold_map.visible = true
    else
      @gold_map.visible = false
    end
    falcao_gold_main
    @gold_map.dispose
  end
  alias falcao_gold_update update
  def update
    @gold_map.update
    if $game_switches[Gold_disable] == false
      @gold_map.visible = true
    else
      @gold_map.visible = false
    end
    falcao_gold_update
  end
end
Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: modern algebra on April 15, 2009, 03:19:07 PM
Looks nice, falcao. Perfect for places like casinos and the like.
Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: Dark_falcao on April 15, 2009, 04:45:39 PM
Thank you Modern Algebra, it is perfect for casinos!!!! jeje i hope more people use this script too
Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: Charbel on April 29, 2009, 02:18:30 AM
very nice
thank you  :D
Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: atiebatie99 on July 18, 2009, 08:09:05 PM
Nice script I'm used this in my game! But can you explain the script because I want to learn RGSS2 and I'm just a beginner :D BTW I've import another icon set (with the same icon) but when I play 2 parts are a little bit blue transparant???

greetzz
atiebatie99
Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: Dark_falcao on August 12, 2009, 10:26:18 PM
im not the bes teaching rgss but i can help you in basics

Here you have a RGSS GUIDE By venadian garden

I learned a lot form there

PDF File

http://www.4shared.com/file/106030785/5a1293bb/Guia_RGSS_Vendian.html

Title: Re: Script GoldMap VX Show the amount of gold in the map icon included!
Post by: Bios on June 20, 2011, 01:36:31 PM
Very good script i can't say but i want to move the icon and the G letter in the middle down of the screen.I managed to move the icon but i can't move the G letter! :( If anyone could help me i would appreciate