SRL Archive - Test corner

Not so remote, remote control.


Dudenow12

2007-12-09 02:29:06

First let me start off by explaining the concept. This would mainly be use for SMART because you can access the SCAR with out messing up the mouse. The idea of it to be able to reset your characters to true with out using a remote master. So you would just press a button like 1 to set player 1 true.(As far as I know this hasn't been done)

Here is what I have tried to make, but I'm not sure how well it will work or what I will have to do to get it working. I have done it two ways one with if than statements and one with cases, I don't think the cases one is set up right so I would also like comments on which to use. So please include your comments and suggestions. Thank You!!!

program PlayerReset;

procedure ControlResetIfThen;//P-1 = 1 P-2 = 2 P-3 = 3 ect...
begin
begin
if Players[1] = False then
begin
if(IsKeyDown(1)) then
Players[1] := True;
Writeln('Player 1 now active')
end;
end;
begin
if Players[2] = False then
begin
if(IsKeyDown(2)) then
Players[2] := True;
Writeln('Player 2 now active')
end;
end;
begin
if Players[3] = False then
begin
if(IsKeyDown(3)) then
Players[3] := True;
Writeln('Player 3 now active')
end;
end;
begin
if Players[4] = False then
begin
if(IsKeyDown(4)) then
Players[4] := True;
Writeln('Player 4 now active')
end;
end;
begin
if Players[5] = False then
begin
if(IsKeyDown(5)) then
Players[5] := True;
Writeln('Player 5 now active')
end;
end;
end;

procedure ControlResetCase;//P-1 = 1 P-2 = 2 P-3 = 3 ect...(But it uses cases)
begin
case (Iskeydown) of
1:
begin
Players[1] := True;
Writeln('Player 1 now active')
end;
2:
begin
Players[2] := True;
Writeln('Player 2 now active')
end;
3:
begin
Players[3] := True;
Writeln('Player 3 now active')
end;
4:
begin
Players[4] := True;
Writeln('Player 4 now active')
end;
5:
begin
Players[5] := True;
Writeln('Player 5 now active')
end;

begin
end.

Hugolord

2007-12-09 03:08:27

ouch nice this is gona help me thanks m8!

great idea :D

danrox2004

2007-12-09 05:15:52

I think you need to do:
for i := 0 to 9 do
begin
if(isKeyDown(i + 48)) then
begin
players[i].active := true;
writeln('Player ' + intToStr(i) + ' set to active!');
end;
end;

Negaal

2007-12-09 05:50:04

let me guess? 49 is F1? and so on…
and I'm feeling this
Players[1] := True;
doesnt work at all…
It should be
Players[number].active := True;

anyways good idea, but why should i reset them knowing that they are lost, in the random etc…?

Sir R. M8gic1an

2007-12-09 06:55:28

i think the idea is good, but negaal is right. if your going to have to put them back in their right places your still going to need to use another computer for that.
My SMART knowlodge is still very limited, if you can run smart and still play runescape throught the web to put them back in their right place this is extremely useful.
but then i think you should add a lil extra thing, because some usernames have numbers in them.


if IsFKeyDown(12) then
begin
MarkTime(RemoteTime);
repeat
for i := 0 to 9 do
begin
if(isKeyDown(i + 48)) then
begin
players[i].active := true;
writeln('Player ' + intToStr(i) + ' set to active!');
end;
end;
until(TimeFromMark(RemoteTime)>= 20000)or(IsFKeyDown(11))
end;

this way you know you won't accidentally press some number and reactivate some user. :)

~RM

Dudenow12

2007-12-09 13:31:45

From: Rasta Magician
i think the idea is good, but negaal is right. if your going to have to put them back in their right places your still going to need to use another computer for that.
My SMART knowlodge is still very limited, if you can run smart and still play runescape throught the web to put them back in their right place this is extremely useful.
but then i think you should add a lil extra thing, because some usernames have numbers in them.


if IsFKeyDown(12) then
begin
MarkTime(RemoteTime);
repeat
for i := 0 to 9 do
begin
if(isKeyDown(i + 48)) then
begin
players[i].active := true;
writeln('Player ' + intToStr(i) + ' set to active!');
end;
end;
until(TimeFromMark(RemoteTime)>= 20000)or(IsFKeyDown(11))
end;

this way you know you won't accidentally press some number and reactivate some user. :)

~RM


With smart you can use the same computer and play on it with the normal RS on the website and still use smart. And once I get it fixed up I will probably post it in function forum.

Two more questions,

First will the "players.active := true;" only set the active player to true? Or does the .active mean something else?

Second, is there some where I can see what numbers in SRL go to which keyboard numbers?

Special Ed

2007-12-09 18:48:33

From: Dudenow12
With smart you can use the same computer and play on it with the normal RS on the website and still use smart. And once I get it fixed up I will probably post it in function forum.

Two more questions,

First will the "players.active := true;" only set the active player to true? Or does the .active mean something else?

Second, is there some where I can see what numbers in SRL go to which keyboard numbers?


First… um… no… the Players[Num].Active:= True is saying that the activity of character Num = True…

Secondly someone posted this awesome ASCII list a long time ago so don't give me credits for it…

Narcle

2007-12-09 19:14:19

Well actually having something like this could be useful. Many times I just use another Smart/computer to fix the ones messed up while the script continues to run. Then I stop the script then restart it. With this you never have to stop/start the script so you can keep the time running.

Dudenow12

2007-12-09 19:22:00

From: Narcle
Well actually having something like this could be useful. Many times I just use another Smart/computer to fix the ones messed up while the script continues to run. Then I stop the script then restart it. With this you never have to stop/start the script so you can keep the time running.


Yeah, exactly.

@Special Ed. Thank you for answering my questions. :D

Special Ed

2007-12-10 17:41:38

No problemo but, if you want, you should make a form with this that has different commands, like "Pause Character", "Reset Character", "Type 'text'","Ect"…

I'd give you a hand w/ it if you'd like, after I finish grading competition scripts though.

mickaliscious

2008-01-03 23:45:24

This only works for a max of 10 players though. I have 16 autoers. Gah. Thanks for the idea though.

the flea

2008-01-04 13:32:57

From: mickaliscious
This only works for a max of 10 players though. I have 16 autoers. Gah. Thanks for the idea though.


could it be modified to use the letters on your keyboard not the numbers?

mickaliscious

2008-01-04 19:18:50

From: the flea
could it be modified to use the letters on your keyboard not the numbers?


Yeah, it could, but you'd have to change the whole for loop.

Lalaji

2008-01-09 07:22:26

Pretty brilliant idea.