• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Auto banking system question

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Hi guys. Is it possible to make a system like this:
when a player's gold amount reaches 1,000,000, then any gold received above that limit will be automatically saved in a bank (such as a global variable)? I do not know how to detect the gold amount received by killing enemies....

Thanks in advance for the help.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hmm. When a unit is killed, check if the owner of killing unit's gold is higher than the maximum amount or not, then reduce it to maximum amount and save the spare to the bank.
Since the maximum amount of gold that can show up in wc3 is 1.000.000, I suggest u should make ur maximum amount less than that.
Also, plz dont double post, just edit the previous post.
 
Level 11
Joined
Oct 11, 2012
Messages
711
Hmm. When a unit is killed, check if the owner of killing unit's gold is higher than the maximum amount or not, then reduce it to maximum amount and save the spare to the bank.
Since the maximum amount of gold that can show up in wc3 is 1.000.000, I suggest u should make ur maximum amount less than that.
Also, plz dont double post, just edit the previous post.

OK, thnx!
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
I've reminded him that.
P/S: I didnt know u have that system. :p. IF I had, I would have recommended it to him since I know u are such a trustable guy :D.
 
Level 11
Joined
Oct 11, 2012
Messages
711
No problem lol.

Hey, deathismyfriend, I would like to get your permission to slightly modify your system. After modification, I will use it in a map and will play that map with some of my friends. I will not post it online or something like that.

The following are what I want to add to your system:
1. When a player is attacking and the gold limit is reached, then deposit 100,000 into the bank;
2. when the player input "-exchange" with a certain amount, then the gold in the bank will exchange to lumber (not the lumber in the bank) at a certain rate. For example, if the exchange rate is 10:3, then "-exchange 10000" means using 10000 gold in the bank and exchange then to 3000 lumber.

:)
I won't do these without your permission.
 
Level 11
Joined
Oct 11, 2012
Messages
711
Ya feel free. The first one is possible without modification. Make sure you have version 1.0.0.6 as i have just updated it with new function. Thanks to the idea nes gave me.

The second will have to be made by you.

Alrighty. Thank you! :)

Well, my old wmw map has auto gold <-> lumber conversion if you end up having things that cost more than a million gold, like 150 million gold =)

May I ask where is that map? LOL
 
Status
Not open for further replies.
Top