SRL Archive - OSR Help

How to make a proggie?


forac

2012-11-02 22:16:45

Title says all, anyone help? :D

Rezozo

2012-11-02 22:20:06

A bunch o' Writeln 's with variables :)

Nebula

2012-11-02 22:22:33

Assuming you have basic scripting knowledge,..

program Name;
var
LogCuts: Integer; //allows you to save how many logs you have cut

procedure CutLogs;
begin
CutInventoryOfLogs; //cut the logs
IncEx(Logscut, 28); //increase how many logs you have cut by 28 (inventory size)
end;

procedure proggy;
begin
Writeln(TimeRunning); //writes how long script has been running for
writeln('Logs cut' + ToStr(LogsCut)); //writes the value of LogsCut
end;

begin
CutLogs;
proggy;
end.

I would also recommend reading tutorials in the tutorial section.

forac

2012-11-02 22:31:21

What about for like CB scripts? I know I could like figure out how much xp per kill, then just multiply the amount of kills buy the xp of one killed, but…. The one I made is a retaliator so I don't really know when one is killed…. Do I say figure out how many kills per minute and killed x time in one minute x xp, and have the proggie "WriteIn" once every minute?

Rezozo

2012-11-02 22:35:50

From: forac
What about for like CB scripts? I know I could like figure out how much xp per kill, then just multiply the amount of kills buy the xp of one killed, but…. The one I made is a retaliator so I don't really know when one is killed…. Do I say figure out how many kills per minute and killed x time in one minute x xp, and have the proggie "WriteIn" once every minute?


Well, I think it should update either every kill, or every minute, but if you are doing every minute, make it update the average kills per hour.

And its WriteLn, not WriteIn. Cheers :)

forac

2012-11-02 22:36:50

Thanks guys

Rezozo

2012-11-02 22:37:27

Very welcome!

J J

2012-11-03 05:53:19

You can also read the xp you have gained from the top right in the mainscreen. Once you start the script open the bar and save the value as starting xp. Then you can ocassionally update it.

The Killer

2012-11-03 06:20:34

http://villavu.com/forum/showthread.php?t=80359 have a look at this tut :P