Earn Warcraft Intrest!!??

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
Okay, i want to add a effect in a hero arena, that when you go near the *earn Intrest* (money Icon thingy(building)) on the map, that you will gain intrest on your money... kinda like a bank. What i want is a 7% increase on your money every... say 75 seconds that you are there, this is what i have so far.

Events-
Time - Every 20.00 seconds of game time
Conditions-
((Owner of(triggering unit)) is in 'team1') Equal to True
('BankT1Whole <gen> contains (triggering unit)) Equal to True
Actions
Player - Add (((Triggering player) Current gold) + (4/100)) to (Triggering players) Current gold


Is there another way to go about this? or am i atleast on the right track.. maybe my formula for percentage is wrong... or there is a way that i can choose a percentage with out the dividing crap!, thanks
 

Speaker

Premium Member
Joined
Jun 20, 2003
Messages
2,808
Reaction score
2
Location
Computer
hmm, have a region in front of the bank...
Event- Unit enters region
Conditions- dont really need them i dun think
Actions - Set players current Gold property equal to % higher.

Sumthin like that. No ned for condition really.
 

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
you think that would make since, but i didnt see a % thing..., and you cant set gold to higher.. you have to add gold to the players current amount, i mean i'm sure my triggers are close... i just don tknow what i'm missing.. but your not right, lol nice try though
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
Player: Set player property
Set Gold of [triggering player] to (Round([Gold of [triggering player] * ((100 + (Interest rate))/100))

That would be a full interest rate, shorter too.

Nice thing is you can replace Interest rate with a variable so that the interest changes over time, or a penalty, or something, just change the variable.
 

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
Set Gold of [triggering player] to (Round([Gold of [triggering player] * ((100 + (Interest rate))/100))


?? okay i cant fine the trigger that starts with the word 'Round' and why put ((*100*+ ( intrest rate))/100)) ?? not seeing how that will add 4 % to players current gold, even though my triggers doenst work , it still makes more sense to me
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
Event
Unit enters region
Condition
Unit equals whatever if anything
Action
Set (Boolean) Interest[player number of (owner of triggering unit)] = True


Then write one trigger
Event
Every 20 sec
Action (no condition)
Pick every player
If
Interest [player number of (picked player)] = true
Then
Set picked player current gold to (picked player) current gold = (picked player) current gold + ((picked player) current gold * (interest expressed in a .08 for 8 %))
Esle
do nada

Try that...
 
Top