• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Bank system

Status
Not open for further replies.
Level 8
Joined
Oct 28, 2007
Messages
435
1.You need to make a unit.
2.Change name and stuff to bank
3.Give it the ability to sell items
4.Create 2 items. One should be a copy of gold coin's and the other of the lumber powerup
5.Change the names of the items and tooltips to deposit and stuff.
6.Change the icons both to gold coins
7. Allow your unit to sell both
8. Change the goldcost of your lumber powerup to 100. Change the lumbercost of your gold powerup to 100.
9. Create a trigger with a perodic event causing every 30 seconds to run. In actions add lumber to the player equal to its current lumber + X%
10. Change the interface of lumber, changing its name to gold deposited
 
Level 6
Joined
Aug 13, 2008
Messages
197
wow that seem a bit complicated and not to mention troublesome.
also what if the player need lumber for building too?
i believe using substrings would be a better choice.
for example:
trigger 1
event:player(red) type -bank as a sunstring
action: set(your varable) = substring(last typed substring),7,9
than - add (your varable) to player(brown) ie. bank
add (-)(your varable) to player(red)
else - game display to (triggering player) (your message)
trigger2
if - if player(red) current gold is greater than or = to (your varable)
event: every 30sec
action: add player(brown) current gold (*) (X%) to player(brown) current gold
trigger3
event: player(red) type -withdraw as a substring
action:
if - substring(last typed substring),10,12 is less than or equal to player(brown) current gold
than - add (substring(last typed substring),10,12) to player(red) ie. bank
add (-)(substring(last typed substring),10,12) to player(brown)
else - game display to (triggering player) (your message)
 
Level 9
Joined
Aug 1, 2008
Messages
453
have you guys played hammerhead td?

they have a command thats like this

-da = depoist all gold you have
-d # = deposit's a certain amount of gold
-w # = Withdraws a certain amount of gold
-wa = withdraw's all gold deposited
-sa = see's how much gold everyone has in there bank

and the end of every level in hammerhead TD it increase's the gold you have in your bank by 10% it does it all with integers and stuff. how would i do this?
 
Status
Not open for further replies.
Top