SRL Archive - MSI Suggestions

Other minor ideas to include in MSI


Cstrike

2010-09-29 20:34:45

I think there should be a thread for minor things that we'd like to work on to be included in MSI but are afraid to ask because the idea is trivial, because you never know what ideas some people may have :p

Example:

1. Level data calculator
Input your current experience and it creates a TIA with an index of two, where TIA[0] = current level, and TIA[1] = experience until next level
program LevelCalculator;

// Inputting current experience gives you a TIA,
// TIA[0] = Current level
// TIA[1] = Difference in experience until next level
function ReturnLevel (CurrentExp : Integer) : TIntegerArray;
var levelexp : TIntegerArray;
i : Integer;
begin //0 1 2 3 4 5 6 7 8 9
SetArrayLength (result, 2);
levelexp := [-1, 0, 83, 174, 276, 388, 512, 650, 801, 969,
1154, 1358, 1584, 1833, 2107, 2411, 2746, 3115, 3523, 3973,
4470, 5018, 5624, 6291, 7028, 7842, 8740, 9730, 10824, 12031,
13363, 14833, 16456, 18247, 20224, 22406, 24815, 27473, 30408,
33648, 37224, 41171, 45529, 50339, 55649, 61512, 67983, 75127,
83014, 91721, 101333, 111945, 123660, 136594, 150872, 166636,
184040, 203254, 224466, 247886, 273742, 302288, 333804, 368599,
407015, 449428, 496254, 547953, 605032, 668051, 737627, 814445,
899257, 992895, 1096278, 1210421, 1336443, 1475581, 1629200, 1798808,
1986068, 2192818, 2421087, 2673114, 2951373, 3258594, 3597792, 3972294,
4385776, 4842295, 5346332, 5902831, 6517253, 7195629, 7944614, 8771558,
9684577, 10692629, 11805606, 13034431];
for i:=0 to high(levelexp) do
begin
if CurrentExp >= levelexp[i] then //I should combine or make these if's look a little cleaner...
begin
if i < high(levelexp) then
begin
if CurrentExp < levelexp[i+1] then
begin
result[0]:= i;
result[1]:= (levelexp[i+1]-CurrentExp);
end;
end else
begin
result[0]:= 99;
result[1]:= 0;
end;
end;
end;
end;

var data : TIntegerArray;
begin
ClearDebug;
data := ReturnLevel(702394);
writeln ('Current level: '+inttostr(data[0]));
writeln ('Experience until next level: '+inttostr(data[1]));
end.

2. Quest completers

I could probably whip up a Doric's Anvil quest completer now that the world walker seems to be working pretty good


Ideas/suggestions/comments/criticisms?

Dgby714

2010-09-29 21:10:01

program new;

function GetXP(Level: integer): integer;
var
I: integer;
begin
Result := 0;
for I := 1 to Level - 1 do
Result := Result + floor(I + 300 * pow(2.0, (I / 7.0)));
Result := floor(Result / 4.0);
end;

function ReturnLevel(CurrentExp: integer): TIntegerArray;
var
I: integer;
begin
SetArrayLength (Result, 3);
for I := 1 to 99 do
begin
if CurrentExp >= GetXP(I) then
begin
if I < 99 then
begin
if CurrentExp < GetXP(I + 1) then
begin
Result[0] := I;
Result[1] := (GetXP(I + 1) - CurrentExp);
Result[2] := (GetXP(99) - CurrentExp);
end;
end else
begin
result[0] := 99;
result[1] := 0;
result[2] := 0;
end;
end;
end;
end;

var
IntegerArray: TIntegerArray;

begin
IntegerArray := ReturnLevel(RandomRange(0, GetXp(99)));
WriteLn('Current Level: ' + IntToStr(IntegerArray[0]));
WriteLn('Exp till next Level: ' + IntToStr(IntegerArray[1]));
WriteLn('Exp till 99: ' + IntToStr(IntegerArray[2]));
end.

NCDS

2010-09-29 22:21:49

99% positive SRL has functions to handle #1.

For #2, I too have been thinking about adding some 'odd' scripts. Quest runners, collectors, etc.

Quest runner would require our Object Handling to be complete, which should be done soon. I'm not sure where Coh3n is at right now with it, but I'll get a hold of him and we'll get it finished.

I see no reason why they couldn't/shouldn't be in MSI though :)

Dgby714

2010-09-29 22:38:15

From: NCDS
99% positive SRL has functions to handle #1.


SRL's ConvertXpToLvl!

But ConvertLvlToXp is broke.

Coh3n

2010-09-29 22:40:20

From: NCDS
99% positive SRL has functions to handle #1.

For #2, I too have been thinking about adding some 'odd' scripts. Quest runners, collectors, etc.

Quest runner would require our Object Handling to be complete, which should be done soon. I'm not sure where Coh3n is at right now with it, but I'll get a hold of him and we'll get it finished.

I see no reason why they couldn't/shouldn't be in MSI though :)

I handed Obstacle Handling over to RM a while ago. Not sure if he's gotten any further.

http://villavu.com/forum/showthread.php?t=59118