Post #1
I got to save and load fine. Explanation how you MUST save to works: For example, if you put 10 wins you must pust 1000 unit kills, if you put 100 wins you must put 10000 unit kills and so on... otherwise your save code won't work.
Crash:
It's related to how many players is in force (di) and other things. So if there's only one player in force di and type any command it'll crash just after that because it'll execute the SA trigger. It's all bound to (SA) trigger, it adds an power up item to a footman and as you may know those kind of unit doesn't supports those kind of items so that's why it crashes.
Use WinMerge or some program which does the same and compare both war3map.j so you'll get it better.
Post #2
Code: Select all
function e_v takes nothing returns boolean
return(he[(1+GetPlayerId(GetTriggerPlayer()))]>(ao[(1+GetPlayerId(GetTriggerPlayer()))]+$A))or(He[(1+GetPlayerId(GetTriggerPlayer()))]>(he[(1+GetPlayerId(GetTriggerPlayer()))]/2))or(32<qe)or(700<px)or(4>qe)
endfunction
he = hero kills
ao = unit kills
He = wins
qe = sr = Di
after that the code puts he as qe. Just follow the conditionaltriggers. (Start from here: call
ConditionalTriggerExecute(ub) )
Translation:
It'll return true if: Hero Kills[from trigger player] is greather than unit kills[from trigger player] + 10 or Wins[from trigger player] is greater than hero kills[from trigger player] divided by 2 or 32 is less than qe or 700 is less than px or 4 greater than qe... and as you know, if one statement in an "OR" condition is true, it'll return true and the code gen message will pop up.
Post #3
Code: Select all
set qe=(he[(1+GetPlayerId(GetTriggerPlayer()))]/He[(1+GetPlayerId(GetTriggerPlayer()))])
set px=(ao[(1+GetPlayerId(GetTriggerPlayer()))]/He[(1+GetPlayerId(GetTriggerPlayer()))])
qe =
Hero Kills /
Wins
px =
Unit Kills /
Wins
Explaining the save & load system thoroughly:
1)
There's no extra check when you have
less than 251 wins. But, if you have more than 250, that will takes us till here:
Code: Select all
function e0v takes nothing returns boolean
return(He[(1+GetPlayerId(GetTriggerPlayer()))]>$FA)and(e_v())
endfunction
2) $FA
(hex number) means
250,
e_v() means:
Code: Select all
function e_v takes nothing returns boolean
return(he[(1+GetPlayerId(GetTriggerPlayer()))]>(ao[(1+GetPlayerId(GetTriggerPlayer()))]+$A))or(He[(1+GetPlayerId(GetTriggerPlayer()))]>(he[(1+GetPlayerId(GetTriggerPlayer()))]/2))or(32<qe)or(700<px)or(4>qe)
endfunction
- 2.1) What that function above tell us is: HEY, I'M GONNA TATTLE ON YOU IF YOU HAVE:
he GREATER THAN ao + 10; OR
He GREATER THAN he divided by 2; OR
qe GREATER THAN 32; OR
px GREATER THAN 700; OR
4 GREATER THAN qe;
3) But what the hell is
he,
He,
ao,
px and
qe?
- 3.1) he = HERO KILLS;
- ao = UNIT KILLS;
He = WINS;
qe = HERO KILLS / (DIVIDED BY) WINS;
px = UNIT KILLS / (DIVIDED BY) WINS.
4) Now you just have to do
the maths and enjoy cheating.
Post #4
Ok, found out the issue.
Hero kills for some reason wasn't saving as intended.
Made a new command for help you set it right. Command: -showhk.
Worked:
-wins 500
-hk 5500 (in save function that value is divided by 10.6, so make sure to fill the conditions).
-uk 349000 (in save function that value is divided by 10, so make sure to fill the conditions).
Hero kill must be greater than wins.
The math still the same.
Made some edits to explain it further. You're welcome.
You do not have the required permissions to view the files attached to this post.