SRL Archive - SRL Archives

Run function and procedurs


warship45

2006-09-27 11:52:32

hi, due to the sunescape update the run functions and procedurs do not work so i made my own functions that do the same job.


Function Run(NoOff:Boolean):Boolean;
begin
GameTab(11);
Sleep(250+Random(500));
if GetColor(595,241)=1251528 then
begin
Result:=True;
if NoOff=True then
begin
GameTab(11);
Sleep(250+Random(500));
Mouse(593+Random(9),220+Random(6),6,6,True);
end;
end else begin
Result:=False;
if NoOff=False then
begin
GameTab(11);
Sleep(250+Random(500));
Mouse(593+Random(9),237+Random(4),6,6,True);
end;
end;
end;

WhiteShadow

2006-09-29 00:30:52

Maybe just make that into one procedure.

Good job though, I was going to make this. Beat me. Doh. xP

Mr. Freeweed

2006-09-29 01:58:05

Im a firm believer in recycleing if its still good. Here ya go and have fun


{*******************************************************************************
procedure SetRun(run: Boolean);
By: RsN
Description: Sets Run on or off.
*******************************************************************************}

procedure SetRun(run: Boolean);
begin
GameTab(11);
case run of
True: if (GetColor(598, 239) = 724865) then
Mouse(598, 223, 5, 5, True);
False: if (GetColor(597, 224) = 7711612) then
Mouse(598, 239, 5, 5, True);
end;
end;

warship45

2006-09-29 09:27:01

i have not been able to fix these jsut yet i will move them into one procedure tonight i have been working on my emots more than this so i will get these working tonight.

m0u53m4t

2006-09-29 12:39:46

I would put gametab(4) on the end aswell, so its like this:

{*******************************************************************************
procedure SetRun(run: Boolean);
By: RsN
Description: Sets Run on or off.
*******************************************************************************}

procedure SetRun(run: Boolean);
begin
GameTab(11);
case run of
True: if (GetColor(598, 239) = 724865) then
Mouse(598, 223, 5, 5, True);
False: if (GetColor(597, 224) = 7711612) then
Mouse(598, 239, 5, 5, True);
end;
GameTab(4);
end;

Mutant Squirrle

2006-09-29 15:12:28

here how bout this? (btw this prolly needs edited a little to work with SRL since its from my personal include)

[PHP]procedure Game_Option(i : Integer; Which : Boolean); //By Mutant Squirrle
var
x_Find, y_Find, x_Click, y_Click, Find_Color : Integer;
begin
Game_Tab(11);
case i of
1: if(which)then begin x_Find := 598; y_Find := 223; Find_Color := 9026961; x_Click := 597; y_Click := 223; end else begin x_Find := 596; y_Find := 239; Find_Color := 1251528; x_Click := 597; y_Click := 240; end; //Run
2: if(which)then begin x_Find := 666; y_Find := 223; Find_Color := 10405029; x_Click := 665; y_Click := 223; end else begin x_Find := 663; y_Find := 240; Find_Color := 1251528; x_Click := 664; y_Click := 240; end; //Chat Effects
3: if(which)then begin x_Find := 729; y_Find := 223; Find_Color := 10405029; x_Click := 727; y_Click := 224; end else begin x_Find := 727; y_Find := 240; Find_Color := 1251528; x_Click := 727; y_Click := 240; end; //Split Private
4: if(which)then begin x_Find := 600; y_Find := 277; Find_Color := 10405029; x_Click := 598; y_Click := 278; end else begin x_Find := 598; y_Find := 294; Find_Color := 1251528; x_Click := 598; y_Click := 294; end; //2 Mouse Buttons
5: if(which)then begin x_Find := 667; y_Find := 277; Find_Color := 10405029; x_Click := 664; y_Click := 279; end else begin x_Find := 664; y_Find := 295; Find_Color := 1251528; x_Click := 664; y_Click := 295; end; //Accept Aid
end;
if(not(GetColor(x_Find, y_Find)=Find_Color))then
begin
repeat
Mouse(x_Click, y_Click, 5, 5, True);
Wait(10 + Random(10));
until(GetColor(x_Find, y_Find)=Find_Color)
end;
end;[/PHP]

Okay just wanted to show you all what it should hold it should be a well rounded function in my opinion that does just about everything in that tab. Now if you wanted to adjust music that would need a different function lol

WT-Fakawi

2006-09-29 15:44:22

From: m0u53m4t
I would put gametab(4) on the end aswell, so its like this:


GameTab(4) has nothing to do with SetRun.

warship45

2006-09-29 16:34:58

i think he ment to go back to game tab 4 after setting run

Mutant Squirrle

2006-09-29 18:12:31

yeah but thats not what it should do lol you dont always want it to go back to gametab(4) you might want it to do something else? like go to gametab(1) and set your fightmode then go to gametab(4) :spot:

Mr. Freeweed

2006-09-30 16:47:25

From: Mutant Squirrle
yeah but thats not what it should do lol you dont always want it to go back to gametab(4) you might want it to do something else? like go to gametab(1) and set your fightmode then go to gametab(4) :spot:


game tab is better left to the scripter or script like others have said

afi

2006-10-03 18:48:53

What SRL sciprt do we edit for this.