1 |
[quote]Does it respect elo somehow? Who gets it if you stall or are low on resources yourself?[/quote]
|
1 |
[quote]Does it respect elo somehow? Who gets it if you stall or are low on resources yourself?[/quote]
|
2 |
\n
|
2 |
\n
|
3 |
To answer your question, It supports only Player that you added manuel to the support list by clicking on the metal or energy income label next to the player name you want to add. And under the options you can set a Ceiling. And you just send metal or energy if the player on your support list has a negative income!
|
3 |
To answer your question, It supports only Player that you added manuel to the support list by clicking on the metal or energy income label next to the player name you want to add. And under the options you can set a Ceiling. And you just send metal or energy if the player on your support list has a negative income!
|
4 |
To make it little more clear here is the part of the code which determents the amount of metal or energy giving to a player.
|
4 |
To make it little more clear here is the part of the code which determents the amount of metal or energy giving to a player.
|
|
|
5 |
\n
|
5 |
[quote]function SendSupport(teamID, resource)
|
6 |
[quote]function SendSupport(teamID, resource)
|
6 |
\n
|
7 |
\n
|
7 |
local Transfer = 0
|
8 |
local Transfer = 0
|
8 |
\n
|
9 |
\n
|
9 |
local myCeiling = options.support_my_Ceiling.value
|
10 |
local myCeiling = options.support_my_Ceiling.value
|
10 |
\n
|
11 |
\n
|
11 |
local Cur,Max,_,Income,Expense,_,_,_ = Spring.GetTeamResources(localTeam, resource)
|
12 |
local Cur,Max,_,Income,Expense,_,_,_ = Spring.GetTeamResources(localTeam, resource)
|
12 |
local Plus = Income-Expense
|
13 |
local Plus = Income-Expense
|
13 |
\n
|
14 |
\n
|
14 |
local AllyCur,AllyMax,_,AllyIncome,AllyExpense,_,_,_ = Spring.GetTeamResources(teamID, resource)
|
15 |
local AllyCur,AllyMax,_,AllyIncome,AllyExpense,_,_,_ = Spring.GetTeamResources(teamID, resource)
|
15 |
local AllyPlus = AllyIncome-AllyExpense
|
16 |
local AllyPlus = AllyIncome-AllyExpense
|
16 |
\n
|
17 |
\n
|
17 |
local allyFloor = (AllyMax*0.9) -- options.support_ally_floor.value
|
18 |
local allyFloor = (AllyMax*0.9) -- options.support_ally_floor.value
|
18 |
|
19 |
|
19 |
if AllyCur < allyFloor and Cur > myCeiling and AllyPlus < 0 then
|
20 |
if AllyCur < allyFloor and Cur > myCeiling and AllyPlus < 0 then
|
20 |
if (Cur-(AllyPlus*(-1))) >= myCeiling then
|
21 |
if (Cur-(AllyPlus*(-1))) >= myCeiling then
|
21 |
Transfer = (Cur-myCeiling)
|
22 |
Transfer = (Cur-myCeiling)
|
22 |
else
|
23 |
else
|
23 |
Transfer = (AllyPlus*-1)
|
24 |
Transfer = (AllyPlus*-1)
|
24 |
end
|
25 |
end
|
25 |
if (AllyCur+Transfer) > allyFloor then
|
26 |
if (AllyCur+Transfer) > allyFloor then
|
26 |
Transfer = allyFloor-AllyCur
|
27 |
Transfer = allyFloor-AllyCur
|
27 |
end
|
28 |
end
|
28 |
Spring.ShareResources(teamID, resource, Transfer)
|
29 |
Spring.ShareResources(teamID, resource, Transfer)
|
29 |
echo(teamID.." "..resource.." "..Transfer)
|
30 |
echo(teamID.." "..resource.." "..Transfer)
|
30 |
end
|
31 |
end
|
31 |
end
|
32 |
end
|
32 |
[/quote]
|
33 |
[/quote]
|
33 |
\n
|
34 |
\n
|