SRL Archive - SRL Archives

Auto declare players.


Gu3st...

2008-05-05 13:41:52

This was made for learning .INI scripting with scar.
Work in progress!


Result can be like:
  Players[0].Name := Zytex1;
Players[0].Pass := Zytex1Pass;
Players[0].Nick := yte;
Players[0].Active := False;

I've made an AutoDeclarer.
Right now it only declares Name, Pass, Nick and Active.
And writes it down in the debug-box.
Save ur army as Army.ini (in the App-folder), like this:

[USERNAME]
1=Zytex1
2=Zytex2
3=Zytex3

[PASSWORD]
1=Zytex1Pass
2=Zytex2Pass
3=Zytex3Pass

[JOB]
1=No
2=Yes
3=Yes
In 'JOB' put Yes or No, No will result in 'Active := False;'.

EDIT: I shall add options, so it gets like the one in srl with forms.
Like DeclarePlayers(LoadsToDo : Integer; WieldAxe : Boolean);

ShowerThoughts

2008-05-05 14:02:07

Yeah i ever thought of this but when all my account got banned i didn't have an 'army' :p Good Job!

Gu3st...

2008-05-05 14:03:54

Hey thanks! :D finally someone reply :)

n3ss3s

2008-05-05 14:40:19

No need for a new system since the SRL PlayerForm already utilizes this, though I did read that it was for your learning purposes.

But, Chars.ini be with you.

Would be actually easy to add an autodeclarer, except for that if we wouldn't move to fully using the SRL PlayerForm, people would have to re-declare their players for every different script, so, if people want autodeclaring they can use the playerform.

Gu3st...

2008-05-05 14:59:47

no, they would not have to declare their players every time, just run it and voila! (cus their already declared in the Army.ini) :p

and yes it was for learning purpose :)

n3ss3s

2008-05-06 12:02:34

I mean every time between changing a script, and opening some file somewhere every time when doing that would be painful, it's because the scripts have their own params, - Players[x].Integers[blah]… etc.