Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Monetary System, Gold, silver and bronze coins,.
onidsouza
post Jun 24 2009, 08:59 AM
Post #1


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




- Oni Series - Monetary System


Part 1 of the Oni Complete Pack

What it does?
This script transforms your game monetary system to a system like world of warcraft one. It has gold coins, silver coins and bronze coins.

100 Bronze -> 1 Silver
100 Silver -> 1 Gold

It is Plug&Play?
Yes. There are optional configurations, but as the name says, it's optional.

You are going to play-it?
For sure!

It's compatible with the Oni Complete Pack? (Coming Soon)

Yes it is.

Download the script
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Download Script now</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">
CODE
#=============================================
# ** Oni Monetary System
#---------------------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
# Remember: MAX_GOLD always is 999.999
# Do not make a item that costs more than that
#==============================================

module OnidsouzaGold
  
  # ▼ OPTIONAL ▼
  
  #If not using icons
  GOLD = "G"
  SILVER = "S"
  BRONZE = "B"
  
  USE_ICON = true
  
  #If using icons, icon ID
  GOLD_ICON = 102
  SILVER_ICON = 98
  BRONZE_ICON = 97
  
end

class Game_Party < Game_Unit
  
  alias onidsouzagoldinit initialize
  
  def initialize
    onidsouzagoldinit
    @gold = [0, 0, 0]
  end
  
  def gold_array
    return @gold
  end
  
  def gold
    return total_gold
  end
  
  def gain_gold(n)
    @gold[2] += n
    update_gold
  end
  
  def lose_gold(n)
    gain_gold(-n)
  end
  
  def total_gold
    return (@gold[2] + (@gold[1]*100) + (@gold[0]*1000000))
  end
  
  def gold_to_silver
    return (@gold[2]/100) + (@gold[1]) + (@gold[0]*100)
  end
  
  def gold_to_gold
    return @gold[0] + (@gold[1]/100) + (@gold[2]/100000)
  end
  
  def update_gold
      times = @gold[2] / 100
      @gold[2] -= times * 100
      @gold[1] += times
      times = @gold[1] / 100
      @gold[1] -= times * 100
      @gold[0] += times
      if @gold[0] > 99
        @gold[0] = @gold[1] = @gold[2] = 99
      end
  end
    
  def make_gold_text
    return to_monetary_system(total_gold)
  end
    
end

class Window_Base < Window
  
  def draw_currency_value(value, x, y, width, gold = true)
    if not OnidsouzaGold::USE_ICON
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y, width, WLH, to_monetary_system(value), 2)
    elsif OnidsouzaGold::USE_ICON and gold
      self.contents.font.color = normal_color
      xx = 20
      draw_icon(OnidsouzaGold::GOLD_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[0])
      x += 40
      draw_icon(OnidsouzaGold::SILVER_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[1])
      x += 40
      draw_icon(OnidsouzaGold::BRONZE_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[2])
    else
      arr = to_monetary_array(value)
      self.contents.font.color = normal_color
      xx = 20
      draw_icon(OnidsouzaGold::GOLD_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, arr[0])
      x += 40
      draw_icon(OnidsouzaGold::SILVER_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, arr[1])
      x += 40
      draw_icon(OnidsouzaGold::BRONZE_ICON, x, y)
      self.contents.draw_text(x + 20, y, xx, WLH, arr[2])
    end
  end
  
end


class Window_ShopBuy < Window_Selectable
  
  def draw_item(index)
    item = @data[index]
    number = $game_party.item_number(item)
    enabled = (item.price <= $game_party.total_gold and number < 99)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    if item != nil
      draw_icon(item.icon_index, rect.x, rect.y, enabled)
      self.contents.font.color = normal_color
      self.contents.font.color.alpha = enabled ? 255 : 128
      wid = contents.text_size(item.name).width
      self.contents.draw_text(rect.x + 24, rect.y, wid, WLH, item.name)
    end
    #rect.width -= 4
    price = to_monetary_system(item.price)
    self.contents.draw_text(rect.x + 24 + wid, rect.y, rect.width - 24 - wid, WLH, price, 2)
    # ▼ NEW
    #self.contents.draw_text(rect.x + 30, rect.y, rect.width - rect.x - 30, WLH, to_monetary_system(item.price), 2)
    #draw_currency_value(item.price, rect.x + rect.width + 8, rect.y, rect.width, false, )
  end
  
end

def to_monetary_system(integ)
  data = [0, 0, 0]
  data[2] = integ
  times = data[2] / 100
  data[2] -= times * 100
  data[1] += times
  times = data[1] / 100
  data[1] -= times * 100
  data[0] += times
  return "#{data[0]} #{OnidsouzaGold::GOLD} - #{data[1]} #{OnidsouzaGold::SILVER} - #{data[2]} #{OnidsouzaGold::BRONZE}"
end

def to_monetary_array(integ)
  data = [0, 0, 0]
  data[2] = integ
  times = data[2] / 100
  data[2] -= times * 100
  data[1] += times
  times = data[1] / 100
  data[1] -= times * 100
  data[0] += times
  return data
end

</div></div></div>

Credit
Onidsouza


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
breadlord
post Jun 24 2009, 12:26 PM
Post #2


What did you expect...
Group Icon

Group: Revolutionary
Posts: 461
Type: Developer
RM Skill: Intermediate




Nice, I always disliked only being able to have the very simple money system. So thank you for providing an alternitive.



__________________________

Check out my project http://www.rpgrevolution.com/forums/index....showtopic=29698
[Show/Hide] I thought my sig was to big so... Clicky clicky


[Show/Hide] My RRR card, Thanks Holder!!




[Show/Hide] What things am I, CLICK!!!

I taste a bit like Almonds.


Mmm, the taste of almonds - anathema to many with nut allergies, and a bad sign for many more, as my taste is not unlike that of cyanide. Am I good or am I poison? A risky thing to guess about. What Flavour Are You?



What Mystical creature are you?
Pegasus



You are a shy, night time person and you are very gentle and soft hearted. You are like the opposite from your cousin the unicorn.


Which Final Fantasy Character Are You?
Final Fantasy 7


[Show/Hide] Can you read this?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.


[Show/Hide] Personality things




Your answers suggest you are a Strategist

The four aspects that make up this personality type are:



Summary of Strategists

* Quiet, easy-going and intellectually curious
* Use logical, objective thinking to find original solutions to problems
* Think of themselves as bright, logical and individualistic
* May be impractical, forgetting practical issues, such as paying bills or doing the shopping

More about Strategists

Strategists are quiet people who like to get to the heart of tough problems on their own and come up with innovative solutions. They analyse situations with a sceptical eye and develop ways of measuring everything, including themselves.

Strategists are the group most likely to say they are unhappy in their job, according to a UK survey.

Strategists are generally easy-going. They are intellectually curious and enjoy abstract ideas. Sometimes they like thinking of a solution to a problem more than taking practical steps to solve it.

In situations where they can't use their talents, are unappreciated, or not taken seriously, Strategists may become negatively critical or sarcastic. Under extreme stress, Strategists could be prone to inappropriate, tearful or angry outbursts.

Strategists may be insensitive to the emotional needs of others or how their behaviour impacts the people around them.


Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 24 2009, 01:58 PM
Post #3


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




Thank's
That will be part of my ultimate scripts packcage. I'm modifying that script so that it can show icons.


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
Xeyla
post Jun 24 2009, 03:09 PM
Post #4


Keeper of the RMVX FAQ
Group Icon

Group: Revolutionary
Posts: 706
Type: Mapper
RM Skill: Intermediate




if thats the case, i'll wait to download it. I'd like to get everything in one swipe smile.gif


__________________________


QUOTE (Albino Parakeet @ Apr 1 2011, 05:46 PM) *
i need to know exactly how to put a penis inside someone's butt.
do you have the technical knowledge to tell me how?
QUOTE (Albino Parakeet @ Apr 2 2011, 01:20 PM) *
QUOTE (Shadyone @ Apr 2 2011, 06:29 AM) *
I see the keet likes anal.

im trying to get into it but people aren't answering my question
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 24 2009, 04:37 PM
Post #5


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




I'm uploading the new one now, with icons!
I'm not going to modify anything now, unless requested.
Uploading now...

EDIT: Fixed codebox error


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
drebenk
post Jun 25 2009, 11:33 PM
Post #6


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@onidsouza why the icons for each coin type appear on top of the name of the items in the shop?


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 26 2009, 08:02 AM
Post #7


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




It's fixed now


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
drebenk
post Jun 26 2009, 01:57 PM
Post #8


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@onidsouza nope, still the money values show over the items name - especially if the item name is long.


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 26 2009, 03:32 PM
Post #9


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




Sorry, i forgot to edit one line, should work now.


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
drebenk
post Jun 26 2009, 03:37 PM
Post #10


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@onidsouzanow it is better but still if you have an item name like - Small health potion - or longer one the values become so small and even don't show. ^^ I guess I'll just have to use shorter item names. ^^


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 26 2009, 03:52 PM
Post #11


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




Yes, shorter names or bigger windows. I'm limited to the window size, and unless you change the window size that will happen.


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
IkaruTak
post Jun 26 2009, 07:07 PM
Post #12


Level 2
Group Icon

Group: Member
Posts: 29
Type: Event Designer
RM Skill: Advanced




Great script! but I have a problem xD. How can I put the price to something in bronze or silver?


__________________________


All of u!!! Please!!! Sorry for my bad english xD

Actual Project:
Tales of a Lost Memory

Current Progress:
Histoy: 10%
Maps: 2%
Scripts: 95%
Database: 90%
Translated into English: 0% (I'm actually considering it xD)
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jun 27 2009, 09:48 AM
Post #13


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




You want a item to cost 12 silver.
To put in silver:
Put the item price * 100
to put in gold:
put the item price * 100000

So 12 silver will be:
1200


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
IkaruTak
post Jul 3 2009, 12:50 AM
Post #14


Level 2
Group Icon

Group: Member
Posts: 29
Type: Event Designer
RM Skill: Advanced




Oh xD Ok, so simply xD thnx


__________________________


All of u!!! Please!!! Sorry for my bad english xD

Actual Project:
Tales of a Lost Memory

Current Progress:
Histoy: 10%
Maps: 2%
Scripts: 95%
Database: 90%
Translated into English: 0% (I'm actually considering it xD)
Go to the top of the page
 
+Quote Post
   
onidsouza
post Jul 3 2009, 02:06 PM
Post #15


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




smile.gif Download the complete pack too.


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
rural_monk
post Aug 5 2009, 03:40 PM
Post #16


Level 2
Group Icon

Group: Member
Posts: 20
Type: Musician
RM Skill: Advanced




I was looking 4 something quite like this! Cool. thanks Onidsouza! I'm really looking forward 2 some of your future scripts happy.gif

This post has been edited by rural_monk: Aug 5 2009, 03:41 PM


__________________________
The Rural Monk - the fresh smell of rum in the morning
Go to the top of the page
 
+Quote Post
   
onidsouza
post Aug 5 2009, 04:18 PM
Post #17


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




Uh... i'm only making scritps by request, and making bug-fixing. I'm not at RPG Maker anymore. But thanks!


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
doogle423
post Sep 17 2009, 12:49 AM
Post #18


Level 2
Group Icon

Group: Member
Posts: 18
Type: None
RM Skill: Undisclosed




QUOTE (onidsouza @ Jun 27 2009, 10:48 AM) *
You want a item to cost 12 silver.
To put in silver:
Put the item price * 100
to put in gold:
put the item price * 100000

So 12 silver will be:
1200


OK...this doesn't explain anything really where do i put the Price * 100 what you have said is very confusing Tbh
Go to the top of the page
 
+Quote Post
   
onidsouza
post Sep 18 2009, 09:18 AM
Post #19


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




In the database, like you always did.
Just remeber that 100 bronze is 1 silver; and that 100 silver is 1 gold.


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   
dorky106
post Nov 9 2009, 11:10 AM
Post #20


Level 11
Group Icon

Group: Revolutionary
Posts: 183
Type: Developer
RM Skill: Beginner




i got a idea for ya if u feel like makeing it
its a party script for EXP share
creator can change the % of exp the characters get from finishing the fight between 1-100%

2nd part would be for the character that finishs the fight gets +10% exp from the fight

think it would be possible?


__________________________
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 06:15 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker