Hero Line Wars Gold-Lumber

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Wreked
Member
Posts: 87
Joined: April 29th, 2007, 8:10 pm

Hero Line Wars Gold-Lumber

Post by Wreked »

Hey, well heres what im trying to do, i want to make it so that
A) Whenever a player gets more than 500k gold it changes into 1 lumber (easy part)
and B)If there income gets up to 500k gold it is changed so instead they get 1 lumber. Now i have been trying for a couple days without luck would anyone happen to know how?
Peace yall hit me up at Mamou115[w3e] on US East!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Hero Line Wars Gold-Lumber

Post by Aero »

Have 2 variables...

IncomeGold and IncomeLumber (Arrays)

Every time the income timer goes off and players receive the gold, check if IncomeGold > 500000
If it is then... Set IncomeGold = IncomeGold - 500000 and do IncomeLumber = IncomeLumber + 1
Wreked
Member
Posts: 87
Joined: April 29th, 2007, 8:10 pm

Re: Hero Line Wars Gold-Lumber

Post by Wreked »

Alright i really appreciate the quick response, but you are gonna have to dummy proof this for me please, because i am pretty decent with GUI and can do most of the stuff there but once you throw in variables im totally hooped.
Peace yall hit me up at Mamou115[w3e] on US East!
Wreked
Member
Posts: 87
Joined: April 29th, 2007, 8:10 pm

Re: Hero Line Wars Gold-Lumber

Post by Wreked »

All right thanks Tru, ill read up one them

EDIT: Alright! I think i got it, i havent tested it yet but tell me if you see any flaws

Code: Select all

Event-
Time - Every 10.00 Seconds of game time

Conditions:

Actions-
If(All Conidtions are True) then do (Then Actions) else do (Else Actions)
If- Conditions 
Income[1] Equal to 500 000
Then Actions-
Set Lumber = (Lumber +1)
Set Income[1] = (Income[1] - 500000)
Else- Actions
Do Nothing

For Each (Integer A) from 1 - 10 do (Player - Add Income((Integer A)) to (Player((Integer A)) Current Gold)
For Each (Integer A) from 1 - 10 do (Player - Add Lumber((Integer A)) to (Player((Integer A)) Current Lumber)
Peace yall hit me up at Mamou115[w3e] on US East!