Earn Warcraft Intrest!!??

Discussion in 'Warcraft Maps, Patches & Mods' started by answerson, Apr 12, 2004.

  1. answerson

    answerson Member!

    Joined:
    Apr 3, 2004
    Messages:
    32
    Likes received:
    0
    Trophy points:
    0
    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
     
  2. Speaker

    Speaker Premium Member

    Joined:
    Jun 20, 2003
    Messages:
    2,808
    Likes received:
    2
    Trophy points:
    38
    From:
    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.
     
  3. answerson

    answerson Member!

    Joined:
    Apr 3, 2004
    Messages:
    32
    Likes received:
    0
    Trophy points:
    0
    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
     
  4. x42bn6

    x42bn6 Retired Staff

    Joined:
    Nov 11, 2002
    Messages:
    15,150
    Likes received:
    2
    Trophy points:
    38
    From:
    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.
     
  5. answerson

    answerson Member!

    Joined:
    Apr 3, 2004
    Messages:
    32
    Likes received:
    0
    Trophy points:
    0
    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
     
  6. Garthrs

    Garthrs Member!

    Joined:
    Aug 3, 2003
    Messages:
    130
    Likes received:
    0
    Trophy points:
    0
    From:
    Usually buried at work
    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...
     
  7. Garthrs

    Garthrs Member!

    Joined:
    Aug 3, 2003
    Messages:
    130
    Likes received:
    0
    Trophy points:
    0
    From:
    Usually buried at work
    don't forget to add a unit leaves region trigger.

    Sorry