Shuttleu
2010-07-21 07:45:43
so for example:
a user has a problem finding its way to where its ment to go, so it logs out and sets the user to false
you can then log into RS and sort it out then by using another script you can set the user to true and set its location
therefore you can get nice long progress reports
i was thinking maybe using ini files or something
thoughts
~shut
EDIT: maybe it can make an ini file then after one minute it will delete it, MSI will then check for this ini file every 45 seconds and if it finds this file then it will make the changes accordingly
EDiT: this is what i have come up with
program new;
{$i SRL/SRL/MSI/Globals.scar}
type
ThePlayerInfo = record
Active: Boolean;
PlayerNumber, Location: Integer;
end;
var
ThePlayersInfo: array of ThePlayerInfo;
i: Integer;
procedure DeclareNewPlayerInfo;
var
HowManyPlayers: Integer;
begin
HowManyPlayers:= 1;
SetArrayLength(ThePlayersInfo, HowManyPlayers);
with ThePlayersInfo[0] do
begin
PlayerNumber := 0;
Active := True;
Location := LOC_PS_DBOX;
end;
end;
begin
DeclareNewPlayerInfo;
WriteINI('Active', 'Active', 'True', IncludePath+'SRL\SRL\MSI\Player.INI');
for i:=0 to High(ThePlayersInfo) do
begin
WriteINI(IntToStr(ThePlayersInfo[i].PlayerNumber), 'Active', BoolToStr(ThePlayersInfo[i].Active), IncludePath+'SRL\SRL\MSI\Player.INI');
WriteINI(IntToStr(ThePlayersInfo[i].PlayerNumber), 'Location', IntToStr(ThePlayersInfo[i].Location), IncludePath+'SRL\SRL\MSI\Player.INI');
end;
Wait(60*1000);
for i:=0 to High(ThePlayersInfo) do
begin
DeleteINI(IntToStr(ThePlayersInfo[i].PlayerNumber), 'Active', BoolToStr(ThePlayersInfo[i].Active), IncludePath+'SRL\SRL\MSI\Player.INI');
DeleteINI(IntToStr(ThePlayersInfo[i].PlayerNumber), 'Location', IntToStr(ThePlayersInfo[i].Location), IncludePath+'SRL\SRL\MSI\Player.INI');
end;
WriteINI('Active', 'Active', 'False', IncludePath+'SRL\SRL\MSI\Player.INI');
end.and this would go somewhere in MSIprocedure RemoteSet;
var
i: Integer;
begin
if FileExists(IncludePath+'SRL\SRL\MSI\Player.INI') then
if StrToBool(ReadINI('Active', 'Active', IncludePath+'SRL\SRL\MSI\Player.INI')) then
for i:=0 to High(MSI_Players) do
if (Length(ReadIni(IntToStr(i), 'Active', IncludePath+'SRL\SRL\MSI\Player.INI'))>0) then
begin
Players[i].Active:= StrToBool(ReadIni(IntToStr(i), 'Active', IncludePath+'SRL\SRL\MSI\Player.INI'));
MSI_Players[i].Active:= StrToBool(ReadIni(IntToStr(i), 'Active', IncludePath+'SRL\SRL\MSI\Player.INI'));
MSI_Players[i].Location:= StrToInt(ReadIni(IntToStr(i), 'Location', IncludePath+'SRL\SRL\MSI\Player.INI'));
end;
//SetTimeout(45, 'RemoteSet');
end;