SRL Archive - OSR Help

I'm very confused! Care to help me understand?


BeastofOne

2012-02-14 18:39:50

Grats, creator of super awesome script called 'YA 2,1' said he doesn't play Runescape anymore, and we could try to fix it if we wanted. I would like to do this, but I know nothing about coding, except for the basics. With a bunch of help from the community, we can pull this off! First off, it is attacking new yaks before the previous yaks are dead, therefore, I thought the problem might be in the part that decides whether the character is still fighting a yak or not. Problem is, I don't know what some of these terms are. Would someone please explain this in pretty basic terms, especially what the acronyms(:blushing:) stand for? For example 'GPA', 'RPA', 'TPointArray', 'PPoints' (Prayer Points?), 'CTS', 'TPA', 'MSCX', 'MSCY', and where I can learn more about this style or level of coding? Thank you!
:spot:I can do this! I just have to learn!:spot:
Function IsFighting: Boolean;
var
[B]CTS[/B]: Integer;
[B]PPoints[/B],[B]GPA[/B],[B]RPA[/B]: [B]TPointArray[/B];
begin
Result := False;

CTS := GetColorToleranceSpeed;
PPoints := [B]TPA[/B]FromBox(IntToBox(225, 125, 295, 145));

ColorToleranceSpeed(2);
FindColorsSpiralTolerance([B]MSCX[/B], [B]MSCY[/B], GPA, 52354, 200, 90, 330, 215, 10);
FindColorsSpiralTolerance(MSCX, MSCY, RPA, 524459, 200, 90, 330, 215, 10);
ColorToleranceSpeed(CTS);

GPA := ClearTPAFromTPA(GPA, PPoints);
RPA := ClearTPAFromTPA(RPA, PPoints);

if ((Length(GPA) > 0) or (Length(RPA) > 0)) then
Result := True;

end;
Thank you!:f:
BeastofOne

lilcmp1

2012-02-14 18:45:10

Same thing I said on your other;

There are lots to learn lol. TPoint are like an (x,y) coordinate. TPoint Array is a bunch of them. FindColorsSpiralTolerance is finding all the coordinate points with the color '52354' and storing it as GPA. All the coordinates with '524459' color are stored as RPA. These points are found within a box created by the next four points. MSCX and MSCY are main screen center coordinates. Since it's spiral tolerance these are the point it starts searching from. It starts from the middle of the screen and spirals out.

In order to find out where it's looking you'd have to see what box he searched in. Ppoints is a box 225, 125, 295, 145. To find out a general idea of where coordinates are designate the rs screen with the crosshairs and drag to rs screen then click on the dropper and click a spot and it will return the points.

Here is a guide I found handy on TPoint Arrays although there are other guides under 'Scripting Tutorials.' TPA is under the advanced section. http://villavu.com/forum/showthread.php?t=35504

BeastofOne

2012-02-14 18:45:43

lil, I'm confused on how to see the box he searched in.

lilcmp1

2012-02-14 18:49:05

The coordinates on the screen start in top left from 0, 0. If you open up runescape and open up simba you will see at the top of the simba screen is a button that looks like a target. Click & hold that button and drag it to the Runescape window. (You should have simba + rs open side by side or pretty close; also it should highlight red then disappear when you release the left click). Then click the dropper tool right next to hit and drag it to rs and it will show you what coordinate you are at (x,y). The coordinates you see listed in his screen create a box. The first two coordinates are the top left of the box and the last two the bottom right. For example (0, 0, 100, 100) Would make a box that starts at the top left and makes a 100x100 square in the corner.

BeastofOne

2012-02-14 18:49:59

:frusty:But the tutorial is like way over my head. I need this stuff for dummies!:frusty:
Yes! I did try to google this, nothing came up so no ':google:', and I did try to look on YouTube, again, nothing.
:spot:I can do this! I just have to learn!:spot:
:f:Thanks, :f:
BeastofOne

lilcmp1

2012-02-14 18:51:34

From: BeastofOne
:frusty:But the tutorial is like way over my head. I need this stuff for dummies!:frusty:
Yes! I did try to google this, nothing came up so no ':google:', and I did try to look on YouTube, again, nothing.
:spot:I can do this! I just have to learn!:spot:
:f:Thanks, :f:
BeastofOne


Dw it will get it better. Maybe start in the beginners tutorial section. Look at YoHoJo's guided video tutorials. Start with #1 then work through them.

BeastofOne

2012-02-14 18:54:00

When I tried draggin it toe the Runescape window, it just highlights the whole thing red. How do I edit how big the box is? Where is the dropper tool?

BeastofOne

2012-02-14 18:55:11

I've done yohojos tutorials. I've done the text and dipped my toes into booleans and string and stuff.
:spot:I can do this! I just have to learn!:spot:

BeastofOne

2012-02-14 18:56:23

Perhaps I should do them again. For a second time…

lilcmp1

2012-02-14 19:21:21

From: BeastofOne
Perhaps I should do them again. For a second time…


Yes because they should show you how to 'target' the rs screen and use the color finder (dropper). You can't edit the red box, that is just so it sets the coordinates you get relative to the rs window, otherwise 0,0 might be the top left of your whole screen/browser rather than just rs

BeastofOne

2012-02-14 19:23:06

I have found out the dropper thing, and what it meant by the rs window
but the colors he has set are pretty much a sort of black and a sort of white. It doesn't make sense.
Why would he try to find black and white when yaks are brown?

BeastofOne

2012-02-14 19:26:56

  CTS: Integer;
PPoints,GPA,RPA: TPointArray;
begin
Result := False;

CTS := GetColorToleranceSpeed;
PPoints := TPAFromBox(IntToBox(225, 125, 295, 145));
Will someone please break this down for me? What is happening with this?
I have found out basicly what is going on with the spiral color tolerance thing.

GPA := ClearTPAFromTPA(GPA, PPoints);
RPA := ClearTPAFromTPA(RPA, PPoints);

if ((Length(GPA) > 0) or (Length(RPA) > 0)) then
Result := True;
What about that one too? What is the '((Length(GPA) > 0) or (Length(RPA) > 0)) then Result := True;'?

lilcmp1

2012-02-14 19:35:14

From: BeastofOne
  CTS: Integer;
PPoints,GPA,RPA: TPointArray;
begin
Result := False;

CTS := GetColorToleranceSpeed;
PPoints := TPAFromBox(IntToBox(225, 125, 295, 145));
Will someone please break this down for me? What is happening with this?
I have found out basicly what is going on with the spiral color tolerance thing.

GPA := ClearTPAFromTPA(GPA, PPoints);
RPA := ClearTPAFromTPA(RPA, PPoints);

if ((Length(GPA) > 0) or (Length(RPA) > 0)) then
Result := True;
What about that one too? What is the '((Length(GPA) > 0) or (Length(RPA) > 0)) then Result := True;'?


Well the first two lines you listed your still in the variables. They don't do anything but list variables that can be defined in the script. CTS means nothing until it's defined. It is set equal to GetcolorToleranceSpeed which is the CTS the script is currently utilizing. For more information you'll need to read http://villavu.com/forum/showthread.php?t=74908&highlight=tutorial

The second part I'm not as sure on. Length(GPA) is the length of the points you've gather earlier mixed in with Ppoints. How they are mixed depends on what ClearTPAfromTPA does. I'm guessing it cancels out like-points but don't quote me on that. The length is probably like how many you have left and it must be > 0 to change the result to true.

BeastofOne

2012-02-14 19:37:58

What do you mean length of the points? the points are connected?

BeastofOne

2012-02-14 19:39:54

Is he grabbing a Certain section of the screen, checking if for 2 colors using spiral thing, if he sees them he puts that through the clearTPAfromTPA, and checks whats left and sees if it is more than 0, and if it is more than 0, it makes the statement true?

If he has it checking for whether something is true, why does he state that the result is false at the begging?

lilcmp1

2012-02-14 19:46:01

From: BeastofOne
Is he grabbing a Certain section of the screen, checking if for 2 colors using spiral thing, if he sees them he puts that through the clearTPAfromTPA, and checks whats left and sees if it is more than 0, and if it is more than 0, it makes the statement true?

If he has it checking for whether something is true, why does he state that the result is false at the begging?


That's the jist of what I think is happening. He just wanted the result to be false unless proven otherwise as a failsafe.

BeastofOne

2012-02-14 19:50:58

What purpose does that serve? What Does it matter if there is any white or black in the PPoints box?
Also, I look at the light guide, which I shall read in detail later, but it didn't have anything like
 CTS := GetColorToleranceSpeed;
PPoints := TPAFromBox(IntToBox(225, 125, 295, 145));

ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, GPA, 52354, 200, 90, 330, 215, 10);
FindColorsSpiralTolerance(MSCX, MSCY, RPA, 524459, 200, 90, 330, 215, 10);
ColorToleranceSpeed(CTS);
Instead, it mostly dealt with whether or not the colors were the same, and worked with red and blues and greens

lilcmp1

2012-02-14 19:51:56

From: BeastofOne
What purpose does that serve? What Does it matter if there is any white or black in the PPoints box?

Well where is the box? If I had free time I'd check. By rs window I just mean the actual game screen within the browser window, not the whole browser window.

BeastofOne

2012-02-14 20:07:50

It is a smallish rectangle on the left side of the character, just about underneath them, that goes literally right to the chat window, like pixel to pixel. with chat window. The very edge of the chat window is black, so that may be where the black comes into play, and the actual window is a majority of white, but how the heck does that have anything to do with whether or not your character is attacking a yak.
I loaded the YA script do use the Public SMART window, and ran the script. It no longer logs you in, and when it searches for a yak, it doesn't even wait 100ms if feels like. :frusty:The problem has only gotten worse!:frusty: Someone please help!

P.S. I'm getting sort of desperate to find where this problem may be at, so if you have an idea what you are doing, please take a look at the scripting for it below and tell me what I could try to solve the following:
a)Log in - It puts in your info, but doesn't click the log in button.
b)Wait before it attacks another yak - It was not waiting long enough before the yak was dead before attacking another one, but now it just simply doesn't wait at all!
program YA2;

{$DEFINE SMART}

{$i SRL/srl.simba}
{$i SRL/SRL/misc/reports.simba}
{$i SRL/SRL/misc/paintsmart.simba}


Const

//SRL Stats
SRLStats_Username = 'Username';
SRLStats_Password = 'Password';

NumToKill = 0; //Stop script after we've killed this many Yaks (0 for infinite)
WeaponSpeed = 'Fast'; //Fast,Normal,Slow (fast for scimitars/shortbows/darts/slings)
Training = 'Attack';
HPLevel = 74; //The Max constitution (hitpoints) level
MSpeed = 18; //The higher this is, the faster the mouse goes!

YakColor = 4211787; //Yak color
YakTol = 2; //Tolerance (recommended you keep this low)

//Break settings
SwitchWorlds = True; //Switch worlds after a break?
BreakIn = 120; //How long before we take a break? (minutes)
BreakFor = 25; //How long will we break for? (minutes)
Bir = 20; //Random minutes to add/subtract from how long until we break
Bfr = 7; //Random minutes to add/subjtract from break duration

Var
KillCount,Exp,HPExp,
WeaponTimer,KillCount_C,
ReportTime,CommitTime: Integer;

//Break variables
w,x,y,z,RealBTime,CurrentBTime,
BreakRounds,TotalBreaks: Integer;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'Username';
Pass := 'Password';
Level[SKILL_HITPOINTS] := HPLevel;
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_HITPOINTS;
Active := True;
end;
end;

Procedure LoadVars;
begin

Retaliate(True);
MarkTime(ReportTime);
MarkTime(CommitTime);

w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-Bir * 60000, Bir * 60000);
z := RandomRange(-Bfr * 60000, Bfr * 60000);

case Lowercase(WeaponSpeed) of
'fast': WeaponTimer := 1200;
'normal': WeaponTimer := 1800;
'slow': WeaponTimer := 3000;
end;

end;

Procedure OnScreen;
var
XPH,XPH2,KPH: Integer;
begin

XPH := Round((Exp * 3600) / (GetTimeRunning / 1000));
XPH2 := Round((HPExp * 3600) / (GetTimeRunning / 1000));
KPH := Round((KillCount * 3600) / (GetTimeRunning / 1000));

SMART_DrawTextMulti(True, True, ['YA2.1 by Grats & Flight','',
''+MsToTime(GetTimeRunning, Time_Abbrev),'',
''+Capitalize(Training)+' XP: '+IntToStr(Exp)+' ('+IntToStr(XPH)+' / hour)','',
'Hitpoints XP: '+IntToStr(HPExp)+' ('+IntToStr(XPH2)+' / hour)','',
'Kills: '+IntToStr(KillCount)+' ('+IntToStr(KPH)+' / hour)'],
Point(10, 200), SmallCharsNS, 16777215);

end;

Procedure Report;
begin
ClearDebug;
SRLProgressReport(ResultDebugBox, 'YA2', 'Grats/Flight', '1.0',
['Run time:', ''+Capitalize(Training)+' XP:', 'Hitpoints XP:', 'Kills:'],
[MsToTime(GetTimeRunning, Time_Abbrev), Exp, HPExp, Killcount]);

MarkTime(ReportTime);
end;

Procedure Commit;
begin
stats_IncVariable('Yaks (Killed)', KillCount_C);
Stats_Commit;
KillCount_C := 0;
MarkTime(CommitTime);
end;

Procedure SafeLogout;
begin
While srl_InFight do
begin
FindNormalRandoms;
Wait(1);
end;

While LoggedIn do
Logout;

end;

Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;

randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;

Procedure HumanRandomMouse;
var
randSpeed: extended;
x, y, firstSpeed: integer;
begin
case(Random(10)) of
2..8:
begin
firstSpeed := mouseSpeed;

mouseSpeed := RandomRange(5,10);
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
GetMousePos(x, y);
WindMouse(x, y, RandomRange(x - 75, x + 75), RandomRange(y - 75, y + 75),
30, 55, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);

mouseSpeed := firstSpeed;
end;
end;
end;

[B] Function IsMoving_F: Boolean;
begin
Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 200) > 200;
end;

Function IsAttacking: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 135, 280, 185);
Result := (AveragePixelShift(PBox, 250, 500) > 500);
end;

Function IsFighting: Boolean;
var
CTS: Integer;
PPoints,GPA,RPA: TPointArray;
begin
Result := False;

CTS := GetColorToleranceSpeed;
PPoints := TPAFromBox(IntToBox(225, 125, 295, 145));

ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, GPA, 52354, 200, 90, 330, 215, 10);
FindColorsSpiralTolerance(MSCX, MSCY, RPA, 524459, 200, 90, 330, 215, 10);
ColorToleranceSpeed(CTS);

GPA := ClearTPAFromTPA(GPA, PPoints);
RPA := ClearTPAFromTPA(RPA, PPoints);

if ((Length(GPA) > 0) or (Length(RPA) > 0)) then
Result := True;

end;
[/B]
Function DidAntiban: Boolean;
var
i: Integer;
begin
Result := False;
if not LoggedIn then Exit;

i := Random(450);
case i of
1..45:
begin
HumanRandomMouse;
Result := True;
end;
46:
begin
HoverSkill('Strength', False);
Result := True;
end;
47:
begin
HoverSkill('Attack', False);
Result := True;
end;
48:
begin
HoverSkill('Hitpoints', False);
Result := True;
end;
49..450: Exit;
end;

end;

Function Eat: Boolean;
var
i: Integer;
begin
Result := False;

if Not LoggedIn then Exit;
if (HPPercent >= 60) then Exit;
if InvEmpty then SafeLogout;

for i := 1 to 28 do
begin
FindNormalRandoms;

if ExistsItem(i) then
begin
InvMouse(i, mouse_move);

if WaitUpText('Eat', 300) then
begin
ClickMouse2(True);
Wait(RandomRange(875, 990));
if (HPPercent >= 90) then
Exit;
end;

if (i = 28) then
Exit;

end;

end;
end;

Function FindFreeYaks: TPointArray;
var
B,HPB: TBox;
TP,MHPB,MNPCB: TPoint;
TPA,GPA,RPA,
GPB,RPB,RTPA,PBox: TPointArray;
i,l,CTS,R: Integer;
ATPA: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
PBox := TPAFromBox(IntToBox(245, 135, 280, 185));
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, YakColor, MSX1, MSY1, MSX2, MSY2, YakTol);

if (Length(TPA) < 1) then
begin
ColorToleranceSpeed(CTS);
Exit;
end;

TPA := ClearTPAFromTPA(TPA, PBox);
ATPA := TPAtoATPAEx(TPA, 30, 30);

l := High(ATPA);
SetArrayLength(ATPA, l+1);
for i := 0 to l do
begin
if (Length(ATPA[i]) > 20) then
B := GetTPABounds(ATPA[i])
else
Continue;

with B do
begin

TP := Point(((B.X1+B.X2)/2), B.Y1);

if (TP.X < MSX1) then
TP.X := MSX1;
if (TP.Y < MSY1) then
TP.Y := MSY1;

HPB:= IntToBox(TP.X-30, TP.Y-40, TP.X+30, TP.Y);

if (HPB.X1 < MSX1) then
HPB.X1 := MSX1;
if (HPB.X2 > MSX2) then
HPB.X2 := MSX2;
if (HPB.Y1 < MSY1) then
HPB.Y1 := MSY1;
if (HPB.Y2 > MSY2) then
HPB.Y1 := MSY2;

MHPB := Point(((HPB.x1+HPB.x2)/2), ((HPB.y1+HPB.y2)/2));
MNPCB := Point(((B.x1+B.x2)/2), ((B.y1+B.y2)/2));

ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MNPCB.X, MNPCB.Y, GPA, 52354, B.X1, B.Y1, B.X2, B.Y2, 10);
FindColorsSpiralTolerance(MNPCB.X, MNPCB.Y, RPA, 524459, B.X1, B.Y1, B.X2, B.Y2, 10);
FindColorsSpiralTolerance(MHPB.X, MHPB.Y, GPB, 52354, HPB.X1, HPB.Y1, HPB.X2, HPB.Y2, 10);
FindColorsSpiralTolerance(MHPB.X, MHPB.Y, RPB, 524459, HPB.X1, HPB.Y1, HPB.X2, HPB.Y2, 10);
ColorToleranceSpeed(CTS);

if ((Length(GPA) = 0) and (Length(RPA) = 0)
and (Length(GPB) = 0) and (Length(RPB) = 0)) then
begin
SetArrayLength(RTPA, (Length(RTPA)+1));
RTPA[R] := MNPCB;
Inc(R);
end;

end;

end;

SortTPAFrom(RTPA, Point(MSCX, MSCY));
Result := RTPA;

end;

procedure Attack_A_Yak;
var
T: Integer;
GoOn: Boolean;
Closest: TPoint;
TPA: TPointArray;
label
Search;
begin
if not LoggedIn then Exit;
Eat;

Search:
GoOn := False;
MouseSpeed := RandomRange(14, 22);
TPA := FindFreeYaks;

if (Length(TPA) > 0) then
begin
Closest := TPA[0];
Smart_DrawBoxEx(False, IntToBox(Closest.X-15, Closest.Y-15, Closest.X+15, Closest.Y+15), 63232);
HumanMMouse(Closest.X, Closest.Y, 5, 5);
if WaitUpText('ck Y', 400) then
begin
ClickMouse2(True);
if not DidRedClick then
goto Search;

OnScreen;
end else
goto Search;

FFlag(0);
While IsMoving_F do
Wait(1);

MarkTime(T);
repeat
if not LoggedIn then Exit;
FindNormalRandoms;

if (TimeFromMark(T) > 2000) then
Exit;

if (IsAttacking and IsFighting) then
break;

if FindBlackChatMessage('omeone else is fighting') then
break;

until(false)

Wait(RandomRange(250, 474));
if FindBlackChatMessage('omeone else is fighting') then
goto Search;

GoOn := True;

MarkTime(T)
repeat
if not LoggedIn then Exit;
FindNormalRandoms;
Eat;

if (TimeFromMark(T) > WeaponTimer) then
break;

if IsAttacking then
MarkTime(T);

if not IsFighting then
break;

until(false)

if GoOn then
begin
GoOn := False;
Inc(KillCount);
Inc(KillCount_C);
IncEx(Exp, 200);
IncEx(HPExp, 67);
end;

end;
end;

Function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
Var
h,m,s: integer;
begin
if not LoggedIn then Exit;

if (HowManyPlayers = 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
RealBTime := ((x+z)/60000);
Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
SafeLogout;
MarkTime(CurrentBTime);
repeat
Wait(21000);
ConvertTime((x+z)-TimeFromMark(CurrentBTime), h, m, s);
ClearDebug;
Writeln('Breaktime left: '+IntToStr(h)+':'+IntToStr(m)+':'+IntToStr(s));
until(TimeFromMark(CurrentBTime)>(x+z));
Writeln('Logging in.');
if SwitchWorlds then
if LoginPlayerToLob then
ChangeWorld(RandomWorld(True, False))
else
LoginPlayer;
Wait(4000);
Result := LoggedIn;
ClickNorth(SRL_ANGLE_HIGH);
IncEx(BreakRounds, (w) + (x));
Inc(TotalBreaks);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-Bir * 60000, Bir * 60000);
z := RandomRange(-Bfr * 60000, Bfr * 60000);
end;
end;
end;

procedure CrashSMART;
begin
Writeln('You are using CRASHSMART, so we are going to reload your client after the RS update!');
SmartgetFieldObject(1488,'crash');// will crash SMART (and Simba).
// IF THIS DOES NOT CRASH YOUR SIMBA, YOU ARE NOT USING THE PORPER PLUGIN
// AN ACCESS VIOLATION HERE IS NOT THE CRASH; MAKE SURE YOU MOVED THE EDITED PLUGIN
Wait(5000);
Writeln('CRASHSMART Failed: Make sure you are using the proper plugin!');
Writeln('Read more about this feature at villavu.com/forum/showthread.php?t=67864');
TerminateScript;
end;

begin
Smart_Server := 135;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

setupSRL();
SRL_Procs[srl_OnRSUpdate] := @CrashSMART;
DeclarePlayers;

LoadVars;
SetupSRLStats(543, SRLStats_Username, SRLStats_Password);

Smart_ClearCanvas;
Wait(RandomRange(500, 675));
OnScreen;

Repeat

if not LoggedIn then
begin
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
end;

BreakHandler(BreakIn,BreakFor,Bir,Bfr);

if (TimeFromMark(ReportTime)>=5000) then
Report;

if (TimeFromMark(CommitTime)>=30000) then
Commit;

if not (NumToKill = 0) then
begin
if (KillCount = NumToKill) then
begin
SafeLogout;
Report;
NextPlayer(False);
end;
end;

FindNormalRandoms;
Attack_A_Yak;

Until(AllPlayersInactive)

end.

lilcmp1

2012-02-14 20:16:38

Well it looks it is looking for the yak's hp bar or yours. You might just add

Repeat
Wait(Randomrange(500,600));
Until(IsMoving = False);

I think that's it. It might be (NOT IsMoving)

Instead of this complex procedure.

BeastofOne

2012-02-14 20:24:51

What if it detects someone else's movement, and not yours? We don't wish to wait for eons before attacking a Yak!
Also what do you mean by
It might be (NOT IsMoving)

lilcmp1

2012-02-14 20:47:05

Will I haven't looked right at the IsMoving function but it should create a rectangle only around your character

BeastofOne

2012-02-14 21:01:05

Yes! you're still helping me! Please take a look at the script data. This is seriously frustrating. Almost as confusing as the Math Quiz I just took. Class average was like 30%, but I got a 90%, so yes, I am in above average smart (I'm in advanced math), but this is like trying to think in someone else's shoes, or correct a College Math Professor's Theory paper on advanced aerodynamics and how they relate to fuel efficiency! It makes no sense. I tried looking where I thought the problem would be, took time to understanding it, and guess what? I got no where!:frusty:ZOMG:frusty: I need help! :fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery::fiery:
14m bonus points to who ever can help me the best!
BeastofOne
:spot:I can do this! I've just got to learn!:spot:

wantonman

2012-02-14 23:18:00



program information;

var // variable
tpa, poop: tpointarray // you see you can call it anything you like

x, y, ass, jizz: integer // same goes for any type of variable.

begin
end.




you can name a variable anything you like, when tpa can be fta.

tpointarray is a type of variable. there are many types (integer, tpoint, tbox, tpointarrat, tintegeraray, tboxarray) and many more.

array just means a list of something.

integer - holds a number
tpoint - holds x and y value

add array and you get a list of these.


program types;

var

tpa, x123: tpointarray;
point1, x5j3: tpoint;

x, y, cee, pee: integer;
tia1, cfg: tintegerarray;

begin

end.


a tpointarray holds one or more tpoints

a tintegerarray holds one or more integers

arrays are useful when storing data.

a tpoint is a,b or 15,39.

its a point on screen where horizontal and verticle meet.

(btw this is the 2nd version of my post, the first one i was writing got timed out and i had to re-log in, i lost everything)