PDA

View Full Version : first script



zenma
08-07-2007, 06:47 AM
well i made this a while back but its still my first script =) tell me hows it is
program New;
{.include srl/srl.scar}
{.include SRL/SRL/misc/trade.scar}


{ Instructions:
1:set nick,name, and pass on line 15-18
2:set if ur buying or selling, what item ur buying and the price ur buying it for at line 27-32
3:set crosshair on runescape window
4:launch script logged in or logged out
}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //name here
Players[0].Pass := ''; //pass here
Players[0].Nick := ''; //nick here
Players[0].Active :=True;
end;

var
amount1, declareamount1, declarecolor : integer;
declareamount, color : string;
// set up everything here \|/
const
Buysell = 0;// 1 if you are buying 2 if you are selling
item = ('262 bs'); //say what item you are buying here example: dragon long
item1 = ('262 bs'); // say what item you are buying here with a typo example: dragn long
item2 = ('262bs'); // say what item you are buying here with a different typo example: dragon log
item3 = ('262 bs'); // say what item you are buying here with a different typo example: dragn log
amounturitfor = (' 36k'); //how much your buying or selling it for blank if not saying a price. make sure that you put a space before what you type so like if you put '5k' it would be ' 5k'
// end of setup

Function FindFastRandoms: Boolean; // by wt-fawaki
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: RC;
10: //Respond; :)
end;
wait(1);
end;
end;

Procedure findrandoms;
Begin
Findnormalrandoms;
Findfastrandoms;

End;

Procedure Setup;
begin
findrandoms;
declareamount1 := random(4);
case declareamount1 of
1: declareamount := ( +item );
2: declareamount := ( +item1 );
3: declareamount := ( +item2 );
4: declareamount := ( +item3 );
end;
declarecolor := random(66);
case declarecolor of
1: color := ('cyan:');
2: color := ('cyan:wave:');
3: color := ('cyan:scroll:');
4: color := ('cyan:shake:');
5: color := ('cyan:wave2:');
6: color := ('cyan:slide:');
7: color := ('green:');
8: color := ('green:wave:');
9: color := ('green:scroll:');
10: color := ('green:shake:');
11: color := ('green:wave2:');
12: color := ('green:slide:');
13: color := ('red:');
14: color := ('red:wave:');
15: color := ('red:scroll:');
16: color := ('red:shake:');
17: color := ('red:wave2:');
18: color := ('red:slide:');
19: color := ('white:');
20: color := ('white:wave:');
21: color := ('white:scroll:');
22: color := ('white:shake:');
23: color := ('white:wave2:');
24: color := ('white:slide:');
25: color := ('purple:');
26: color := ('purple:wave:');
27: color := ('purple:scroll:');
28: color := ('purple:shake:');
29: color := ('purple:wave2:');
30: color := ('purple:slide:');
31: color := ('flash1:');
32: color := ('flash1:wave:');
33: color := ('flash1:scroll:');
34: color := ('flash1:shake:');
35: color := ('flash1:wave2:');
36: color := ('flash1:slide:');
37: color := ('flash2:');
38: color := ('flash2:wave:');
39: color := ('flash2:scroll:');
40: color := ('flash2:shake:');
41: color := ('flash2:wave2:');
42: color := ('flash2:slide:');
43: color := ('flash3:');
44: color := ('flash3:wave:');
45: color := ('flash3:scroll:');
46: color := ('flash3:shake:');
47: color := ('flash3:wave2:');
48: color := ('flash3:slide:');
49: color := ('glow1:');
50: color := ('glow1:wave:');
51: color := ('glow1:scroll:');
52: color := ('glow1:shake:');
53: color := ('glow1:wave2:');
54: color := ('glow1:slide:');
55: color := ('glow2:');
56: color := ('glow2:wave:');
57: color := ('glow2:scroll:');
58: color := ('glow2:shake:');
59: color := ('glow2:wave2:');
60: color := ('glow2:slide:');
61: color := ('glow3:');
62: color := ('glow3:wave:');
63: color := ('glow3:scroll:');
64: color := ('glow3:shake:');
65: color := ('glow3:wave2:');
66: color := ('glow3:slide:');
end;
end;

Procedure autobuy;
begin
setup;
findrandoms;
wait(256 + random(100));
case random(20) of
0: TypeSend(+color+'buying ' +declareamount+ +amounturitfor );
1: TypeSend(+color+'buying ' +declareamount+ +amounturitfor );
2: TypeSend(+color+'bying ' +declareamount + +amounturitfor );
3: TypeSend(+color+'buying ' +declareamount + +amounturitfor);
4: TypeSend(+color+'uyin ' +declareamount + +amounturitfor );
5: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
6: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
7: TypeSend(+color+'buyin ' +declareamount + +amounturitfor );
8: TypeSend(+color+'byin ' +declareamount + +amounturitfor );
9: TypeSend(+color+'buy ' +declareamount + +amounturitfor );
10: TypeSend(+color+'buy ' +declareamount + +amounturitfor );
11: TypeSend(+color+'buy ' +declareamount + +amounturitfor );
12: TypeSend(+color+'buyig ' +declareamount + +amounturitfor );
13: TypeSend(+color+'buyig ' +declareamount + +amounturitfor );
14: TypeSend(+color+'uying ' +declareamount + +amounturitfor );
15: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
16: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
17: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
18: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
19: TypeSend(+color+'buying ' +declareamount + +amounturitfor );
end;
end;

Procedure Autosell;
begin
Setup;
findrandoms;
wait(256 + random(100));
case random(14) of
0: Typesend(+color+'selling ' +declareamount + +amounturitfor);
1: Typesend(+color+'elling ' +declareamount + +amounturitfor);
2: Typesend(+color+'ellin ' +declareamount + +amounturitfor);
3: Typesend(+color+'sllin ' +declareamount + +amounturitfor);
4: Typesend(+color+'seling ' +declareamount + +amounturitfor);
5: Typesend(+color+'seling ' +declareamount + +amounturitfor);
6: Typesend(+color+'selling ' +declareamount + +amounturitfor);
7: Typesend(+color+'selling ' +declareamount + +amounturitfor);
8: Typesend(+color+'selling ' +declareamount + +amounturitfor);
9: Typesend(+color+'selling ' +declareamount + +amounturitfor);
10: Typesend(+color+'selling ' +declareamount + +amounturitfor);
11: Typesend(+color+'selling ' +declareamount + +amounturitfor);
12: Typesend(+color+'selling ' +declareamount + +amounturitfor);
13: Typesend(+color+'sellign ' +declareamount + +amounturitfor);
end;
end;


Begin
if buysell = 0 then
begin
Writeln('you need to set up script properly...terminating script');
terminatescript;
end;
wait(2000 + random(502));
ActivateClient;
setupsrl;
wait(2000 + random(502));
Declareplayers;
wait(5000 + random(400));
if not(loggedin) then
begin
writeln('not logged in...logging in');
Loginplayer;
end;
Repeat
writeln('logged in...autotyping');
Setup;
wait(350 + random(100));
amount1 := amount1 + 1;
cleardebug;
Writeln('typed ' + IntToStr(amount1) + 'times');
if buysell = 1 then autobuy;
if buysell = 2 then autosell;
Until(someonetrades);
if(someonetrades) then
begin
writeln('someone traded you...trading them');
Accepttrade;
end;
end.