SRL Archive - Archive

TRiLeZ - SRL Member Application


TRiLeZ

2009-04-23 06:56:24

How Long have You Played Runescape?
4 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Java, C, C++, C#, PHP, HTML


Are you a member of any other communities?
MoparIsTheBest, MoparScape Forums, Scion Bot, RS Bot, Otaku Studios


Tell us about yourself…
From: TRiLeZ
I am a teenager that has fun in gaming and likes to hang out with friends. I think its fun to make GFX, programs, and scar scripts.
In the summer time I like to go camping and fishing =D



Please show us one (or multiple) of your scripts.
program CowFighter;
{.Script Info:
# ScriptName = Cow Fighter v3 [SMART]
# Author = TRiLeZ
# Description = A simple cow fighter that picks up bones and burries them.
# Version = 3
# Date = 4/10/09
Instructions:
Setup:
1. Fill in the Const secttion
2. Fill in the DeclarePlayers procedure
3. Run the script!
4. Sit back and let it auto

Info:
-Must be where cows are
-Only bring 3 items
-Walks back from dead!
-Attack the cows under fally!
-Needs Reflection!

Help:
-Report Bugs to me by PM on SRL Forums! (My username is TRiLeZ)

Possible Combat Styles:
-Attack, Strength, Defence, Even, Mage, MageDef, Accurate, Rapid,
LongRange

/Script Info}
{.Include SRL/SRL/Misc/Smart.Scar}
{.include srl/srl.scar}
{.include srl/srl/skill/ranging.scar}
{.include srl/srl/misc/worldswitcher.scar}
{.include srl/srl/reflection/Reflection.scar}

var
x,y,i,q: Integer;
gCowKill,gBones,gModsTRiLeZ,gDeathsTRiLeZ,gStartXP,gNowXP,gTxp,gArrowsUsed,gArrows: Integer;

const
SmartWorld = 154;//Change to world you want to auto on

LampSkillz = '';//If finds a lamp, it will use with this skill.

Username = ''; //Name used to id you on my stats website

procedure DeclarePlayers;
begin
HowManyPlayers := 1;// Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :=''; // Character Name
Players[0].Pass :=''; // Character Pass
Players[0].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[0].Active := True; // To be ran in the script?
Players[0].Strings[1] := ''; // Combat Styles - See line 24
Players[0].Strings[2] := ''; // The skill to record XP gain
Players[0].Strings[3] := '';// Only if using Mage or MageDef! Type in spell name in undercase letters!
{
Players[1].Name :=''; // Character Name
Players[1].Pass :=''; // Character Pass
Players[1].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[1].Active := True; // To be ran in the script?
Players[1].Strings[1] := ''; // Combat Styles - See line 24
Players[1].Strings[2] := ''; // The skill to record XP gain
Players[1].Strings[3] := '';// Only if using Mage or MageDef! Type in spell name in undercase letters!
}
{
Players[2].Name :=''; // Character Name
Players[2].Pass :=''; // Character Pass
Players[2].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[2].Active := True; // To be ran in the script?
Players[2].Strings[1] := ''; // Combat Styles - See line 24
Players[2].Strings[2] := ''; // The skill to record XP gain
Players[2].Strings[3] := '';// Only if using Mage or MageDef! Type in spell name in undercase letters!
}
{
Players[3].Name :=''; // Character Name
Players[3].Pass :=''; // Character Pass
Players[3].Nick :=''; // Nickname 3 - 4 Letter's of char name
Players[3].Active := True; // To be ran in the script?
Players[3].Strings[1] := ''; // Combat Styles - See line 24
Players[3].Strings[2] := ''; // The skill to record XP gain
Players[3].Strings[3] := '';// Only if using Mage or MageDef! Type in spell name in undercase letters!
}
end;

{*******************************************************************************
function PostReport(ScriptName, Website, Proggy : String): Boolean;
By: Camo Kyle & Floor66
Description: Posts the Progress Report to my database which you can see
*******************************************************************************}
function PostReport(ScriptName, Website, Proggy : string): Boolean;
var
Dbase : string;
Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(10);
AddPostVariable(Client, 'proggy', Proggy);
AddPostVariable(Client, 'scn', ScriptName);
Dbase := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
Result := true;
end;

procedure SetUpAutoCast(AutoSpell: string; Defensive: Boolean); //Works better than the srl one
begin
GameTab(1);
case Defensive of
True: Mouse(690, 270, 8, 8, True);
False: Mouse(695, 330, 8, 8, True);
end;
Wait(1200);
case LowerCase(AutoSpell) of
'wind strike': Mouse(583,240,1,1,true);
'water strike': Mouse(624,240,1,1,true);
'earth strike': Mouse(663,240,1,1,true);
'fire strike': Mouse(703,240,1,1,true);
'wind bolt': Mouse(584,299,1,1,true);
'water bolt': Mouse(625,299,1,1,true);
'earth bolt': Mouse(664,299,1,1,true);
'fire bolt': Mouse(704,299,1,1,true);
'wind blast': Mouse(582,363,1,1,true);
'water blast': Mouse(624,363,1,1,true);
'earth blast': Mouse(663,363,1,1,true);
'fire blast': Mouse(703,363,1,1,true);
'wind wave': Mouse(585,424,1,1,true);
'water wave': Mouse(625,424,1,1,true);
'earth wave': Mouse(664,424,1,1,true);
'fire wave': Mouse(704,424,1,1,true);
end;
Wait(1200);
end;

procedure SetCStyle;
begin
GameTab(1);
case Players[CurrentPlayer].Strings[1] of
'Strength': SetFightMode(2);
'Attack': SetFightMode(1);
'Defence': SetFightMode(4);
'Even': SetFightMode(3);
'Mage': SetUpAutoCast(Players[CurrentPlayer].Strings[3], false);
'MageDef': SetUpAutoCast(Players[CurrentPlayer].Strings[3], true);
'Accurate': Mouse(602, 272,0,0,true);
'Rapid': Mouse(677, 273,0,0,true);
'LongRange': Mouse(602, 319,0,0,true);
end;
end;

procedure NowEXP;
begin
gNowXp := (GetXP(Players[CurrentPlayer].Strings[2]));
end;

procedure ProgressReport;
begin
if not LoggedIn then exit;
ClearDebug;
if (HowManyPlayers = 1) then
begin
Writeln('****************************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('****************************************************************************');
Writeln('Running Time: '+TimeRunning);
Writeln('Killed: '+inttostr(gCowKill)+' Cows.');
Writeln('Xp Gained: '+inttostr(gTxp));
Writeln('Bones Picked Up: '+inttostr(gBones));
Writeln('Mods Found: '+inttostr(gModsTRiLeZ)+' Mods.');
Writeln('Deaths: '+inttostr(gDeathsTRiLeZ));
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
Writeln('Arrows Used: '+inttostr(gArrowsUsed));
Writeln('****************************************************************************');
end;
if (HowManyPlayers > 1) then
begin
Players[CurrentPlayer].Integers[1]:= Players[CurrentPlayer].Integers[1] + gCowKill;
gCowKill:= 0;
Players[CurrentPlayer].Integers[2]:= gNowXp-gStartXp;
Players[CurrentPlayer].Integers[3]:= Players[CurrentPlayer].Integers[3] + gBones;
gBones:= 0;
Players[CurrentPlayer].Integers[4]:= Players[CurrentPlayer].Integers[4] + gModsTRiLeZ;
gModsTRiLeZ:= 0;
Players[CurrentPlayer].Integers[5]:= Players[CurrentPlayer].Integers[5] + gDeathsTRiLeZ;
gDeathsTRiLeZ:= 0;
Players[CurrentPlayer].Integers[6]:= Players[CurrentPlayer].Integers[5] + gArrowsUsed;
Writeln('********************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('********************************************************************');
Writeln('| Nick | Killed | XP Gained | Bones | Mods | Deaths | Arrows Used |');
Writeln(' ******** ******** *********** ******* ****** ******** *************');
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| '
+Padr(IntToStr(Players[i].Integers[6]),12)+'| ');
end;
Writeln('**********************************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('**********************************************************************');
end;
end;
end;

procedure FindDoor;
var
P,Door: TPoint;
begin
Status('Finding Door');
if FindObject(P,8695) then
begin
Door:= TileToMsEx(Tile(3039,3296),15);
Mouse(Door.x+15,Door.y-30,4,4,false);
Wait(400+Random(200));
ChooseOption('Open');
Exit;
end else
if not FindObject(P,8695) and FindObject(P,8696) then
begin
Writeln('Door Not Found! Exiting!');
Logout;
end;
end;

procedure RandomEmote;
begin
if not IsInteractingWithMe('Cow') then
begin
GameTab(12);
case Random(20) of
0: Mouse(569,232,5,5,true);
1: Mouse(613,232,5,5,true);
2: Mouse(654,232,5,5,true);
3: Mouse(701,232,5,5,true);
4: Mouse(569,282,5,5,true);
5: Mouse(613,282,5,5,true);
6: Mouse(654,282,5,5,true);
7: Mouse(701,282,5,5,true);
8: Mouse(569,332,5,5,true);
9: Mouse(613,332,5,5,true);
10: Mouse(654,332,5,5,true);
11: Mouse(701,332,5,5,true);
12: Mouse(569,382,5,5,true);
13: Mouse(613,382,5,5,true);
14: Mouse(654,382,5,5,true);
15: Mouse(701,382,5,5,true);
16: Mouse(569,332,5,5,true);
17: Mouse(613,332,5,5,true);
18: Mouse(654,332,5,5,true);
19: Mouse(701,332,5,5,true);
end;
WaitForAnim(1000);
While (GetAnimation > 0) do wait(20);
end;
end;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(6+random(2)) of
0: wait(500+random(3000));
1: begin
case Random(2) of
0: HoverSkill('random', false);
1: begin
HoverSkill('random', false);
GetMousePos(x,y);
Mouse(x,y,5,5,true);
Wait(1000+random(500));
Mouse(498,21,8,8,false);
if not ChooseOption('Close') then
Mouse(449,51,8,8,true);
end;
end;
end;
2: PickUpMouse;
3: BoredHuman;
4: RandomRClick;
5: RandomEmote;
end;
end;

procedure Intro;
begin
ClearReport;
ChangeReportWidth(300);
AddtoReport(' _ _ _ _ _ _ _ _ _ _ _ _ _');
Wait(500);
AddtoReport('|_ _|| |_| ||_|| | | O_||__ /');
Wait(500);
AddtoReport(' | | | _ \ | || |_ | \_ / /_');
Wait(500);
AddtoReport(' |_| |_| \_\|_||_ _||_ _| /_ _ |');
Wait(500);
AddtoReport('Cow Fighter v3 [SMART] By TRiLeZ');
Disguise('Cow Fighter v3 [SMART]');
Status('Running...');
end;

procedure SetupScript;
var
v: string;
begin
SmartSetUpEx(SmartWorld, False, True, False);
Wait(3000);
SetTargetDC(SMARTGetDC);
ActivateClient;
v:= GetPage('http://scardevreflection.googlecode.com/svn/trunk/RSBuild.txt');
if not (RSBuild = StrToInt(GetNumbers(v))) then UpdateHooks;
DeclarePlayers;
LoginPlayer;
Wait(800);
end;

procedure SetupPlayer;
begin
q:= 1;
KeyDown(VK_Up);
SetRun(True);
gStartXp := (GetXP(Players[CurrentPlayer].Strings[2]));
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
begin
gArrows:= ArrowAmount;
end;
end;

function DeathWalkPath: TPointArray;
begin
Result := [Point(3227, 3219), Point(3229, 3219), Point(3232, 3227), Point(3222, 3238),
Point(3209, 3238), Point(3195, 3238), Point(3180, 3236), Point(3166, 3233), Point(3150, 3229),
Point(3134, 3228), Point(3119, 3227), Point(3106, 3236), Point(3105, 3248), Point(3093, 3249),
Point(3079, 3251), Point(3072, 3265), Point(3059, 3276), Point(3043, 3275), Point(3033, 3286),
Point(3039, 3295)];
end;

procedure WalkFromDead;
var
I: Integer;
Path: TPointArray;
begin
gDeathsTRiLeZ := gDeathsTRiLeZ + 1;
Status('Walking back to cows from death');
Logout;
LoginPlayer;
SetRun(true);
Path := DeathWalkPath;
for i:=0 to High(Path) do
begin
WalkToTile(Path[i], 0, 3);
if (i = High(Path)) then break;
while(not TileOnMM(Path[(i+1)]))do
Wait(RandomRange(50, 150));
end;
Mouse(579,224,0,0,false);
ChooseOption('Wield');
Mouse(620,229,0,0,false);
ChooseOption('Weild');
Mouse(662,228,0,0,true);
ChooseOption('Weild');
MakeCompass('N');
OpenDoor;
Wait(400+Random(200));
Mouse(608,42,4,4,true);
SetAngle(true);
Flag;
Mouse(91,493,0,0,true);
Flag;
Wait(2000+Random(200));
end;

function FindDeadTRiLeZ: Boolean;
begin
Result := False;
if ChatBoxTextExists('black','Oh dear, you are dead!') then
begin
Result := True;
SaveToChatLog;
if (SRL_Procs[srl_OnFindDead] <> nil) then
SRL_Procs[srl_OnFindDead]();
TakeScreen('Found Dead');
WalkFromDead;
end;
end;

function FindModTRiLeZ: Boolean;
var
tx, ty: Integer;
begin
if (not UseFindMod) or (not LoggedIn) then exit;
if (BmpMod = 0) or (BmpAdmin = 0) then LoadSRLBitMaps;
if (FindColorTolerance(tx, ty, 14737632, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindColorTolerance(tx, ty, 589815, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
if (FindBitmapToleranceIn(bmpMod, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindBitmapToleranceIn(bmpAdmin, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
begin
Result := True;
AddToSRLLog('******** FOUND MOD ********');
AddToReport('******** FOUND MOD ********');
TakeScreen('Found mod');
TypeSend('Hoy');
gModsTRiLeZ:= gModsTRiLeZ + 1;
SaveToChatLog;
if (SRL_Procs[srl_OnFindMod] <> nil) then
SRL_Procs[srl_OnFindMod]();
if (LogoutOnMod) then
begin
Players[CurrentPlayer].Rand := 'Found Mod';
repeat
Logout;
Wait(1500 + Random(500));
until not (LoggedIn);
Wait((60000) + Random(60000));
LoginPlayer;
end;
end;
FreeBitmap(bmpMod);
FreeBitmap(bmpAdmin);
end;

function FindRandoms: Boolean;
var
Int: Integer;
begin
for Int := 1 to 7 do
begin
case Int of
1: Result := SolveTeleportRandoms;
2: Respond;
3: Result := FindDeadTRiLeZ;
4: Result := FindLamp(LampSkillz);
5: Result := RC;
6: Result := FindModTRiLeZ;
7: if (SRL_Procs[srl_OnRandomCall] <> nil) then
SRL_Procs[srl_OnRandomCall]();
end;
if Result then
begin
if High(Players[CurrentPlayer].BoxRewards) > -1 then
UseRewardBox;
if (SRL_Procs[srl_OnFindRandom] <> nil) then
SRL_Procs[srl_OnFindRandom]();
Break;
end;
end;
end;

procedure ArrowCheck;
begin
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
begin
Wait(200+random(100));
if (ArrowAmount = 0) then
begin
Writeln('No arrows left to continue');
if IsInteractingWithMe('Cow') then
begin
GameTab(5);
Mouse(587,304,10,10,true);
repeat
wait(20);
until not IsInteractingWithMe('Cow');
end;
Logout;
Exit;
end else
gArrowsUsed:= (gArrows-ArrowAmount);
end;
end;

procedure MageCheck;
begin
if (Players[CurrentPlayer].Strings[1] = 'Mage') or
(Players[CurrentPlayer].Strings[1] = 'MageDef') then
begin
repeat
Wait(20);
if not IsInteractingWithMe('Cow') then
begin
Writeln('You dont have enough runes to continue');
Logout;
Exit;
end;
until (GetAnimation = 1162);
end;
end;

function CowInFight: Boolean;
var
X1,Y1,X2,Y2,cx,cy: Integer;
begin
GetMousePos(cx,cy);
X1:=cx-45;
Y1:=cy-45;
X2:=cx+45;
Y2:=cy+45;
if FindColorSpiralTolerance(cx,cy,255,X1,Y1,X2,Y2,10)
or FindColorSpiralTolerance(cx,cy,65280,X1,Y1,X2,Y2,10)
or FindColorSpiralTolerance(cx,cy,192,X1,Y1,X2,Y2,10)
or FindColorSpiralTolerance(cx,cy,16728128,X1,Y1,X2,Y2,10) then
Result:= True
else
Result:= False;
end;


procedure AttackCow;
begin
FindDeadTRiLeZ;
FindModTRiLeZ;
repeat
if (not LoggedIn) then exit;
FindRandoms;
FindDeadTRiLeZ;
ArrowCheck;
Status('Finding Cow');
if FindObjCustom(x,y,['Cow'], [8760772,11646651,5265252,3952985,7240330,4941444], 1) then
begin
MMouse(x,y,3,3);
if not CowInFight then
begin
if IsInteractingWithMe('Cow') then Break;
Mouse(x,y,0,0,False);
if IsInteractingWithMe('Cow') then Break;
if ChooseOption('Attack') then
begin
FindDeadTRiLeZ;
FindModTRiLeZ;
FindRandoms;
WaitToMove(800);
if CharacterMoving then wait(10);
WaitForAnim(1600);
while (GetAnimation > 0) do wait(10);
end;
end;
end
else
wait(200+random(150));
until IsInteractingWithMe('Cow');
Status('Fighting Cow');
MageCheck;
FindRandoms;
NowEXP;
AntiBan;
repeat
ArrowCheck;
wait(10);
until not IsInteractingWithMe('Cow');
gCowKill:= gCowKill+1;
end;

procedure BuryBones;
var
x,y,Bones: Integer;
begin
GameTab(4);
Wait((100)+ Random(80));
Bones := DTMFromString('78DA63CC616260F8C18002CE1C3DCAC00AA41' +
'981F83F10306600D57C475573E2E001B81A10602C06AAF989AA66' +
'FFB6ADA86A32816AFEA1AA99337102AA9A7CA09ACFA86AF66DD98' +
'2A20600F06D15CE');
repeat
if FindDTM(Bones,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('Bury');
Wait(650+random(200));
end;
Wait(400+Random(200));
until not FindDTM(Bones,x,y,MIX1,MIY1,MIX2,MIY2);
FreeDTM(Bones);
end;

procedure PickupBones;
begin
if (Players[CurrentPlayer].Strings[1] = 'Attack') or
(Players[CurrentPlayer].Strings[1] = 'Strength') or
(Players[CurrentPlayer].Strings[1] = 'Defence') or
(Players[CurrentPlayer].Strings[1] = 'Even') then
begin
if InvCount = 28 then BuryBones;
MakeCompass('n');
if FindColorSpiralTolerance(x,y,1319583,184, 100,339, 253, 4) then Mouse(x,y,4,4,false);
if FindText(x,y,'Bones',upchars,115,93,373,337) then
begin
Mouse(x,y,1,1,true);
gBones := gBones+1;
end;
wait(650+random(150));
end;
end;

procedure CheckBreak;
begin
if HowManyPlayers = 1 then
begin
if (gCowKill = (q*25)) then
begin
Status('Taking a 15-100 second break and switching worlds');
Logout;
Wait(15000+random(100000));
OpenWorldScreen;
SelectWorld(RandomWorld(false,false));
LoginPlayer;
q:= q+1;
end;
end;
if HowManyPlayers > 1 then
begin
if (Players[CurrentPlayer].Integers[1] = (q*25)) then
begin
Status('Taking a 15-100 second break and switching worlds');
Logout;
Wait(15000+random(100000));
RandomWorld(false,false);
LoginPlayer;
q:= q+1;
end;
end;
end;

procedure MainLoop;
begin
repeat
SetupPlayer;
SetCStyle;
repeat
if (not LoggedIn) then break;
FindRandoms;
Antiban;
FindLamp(LampSkillz);
FindDeadTRiLeZ;
AttackCow;
Wait(2500);
PickupBones;
ProgressReport;
SetRun(true);
CheckBreak;
until (not LoggedIn);
Status('Running...');
if (not LoggedIn) then
begin
if (CurrentPlayer = HowManyPlayers-1) then Break;
NextPlayer(false);
end;
until(false);
Postreport('Cow Fighter v3 [SMART]', 'http://stats.trilez.comuf.com/add.php', GetDebugText);
end;

begin
SetupSRL;
Intro;
ClearDebug;
SetupScript;
MainLoop;
end.

Harry

2009-04-23 07:10:01

Looks a LOT like Fakawi's old cow killer.

Just wondering, is it all your work? Or have you taken snippets and ideas out of his work?

Brain

2009-04-23 07:14:51

From: Harry
Just wondering, is it all your work? Or have you taken snippets and ideas out of his work?


Keep in mind that he cannot see this thread, so he cannot answer for himself.


edit: pm'ed pretty much everyone their app links, works now, thanks hobbster.

ian.

2009-04-23 07:15:01

RandomEmote and SetupUpAutoCast can be used using SRL functions can't they? And SetCStyle can be a case. Also, if using reflection, I'd like it if it looked for the closed door ID instead of using FindObjCustom. Case 1 of case 1 seems weird, why not just do HoverSkill('random', True);? That would do the same thing, I believe. Just close the window after :)

WalkFromDead looks ugly and could be done better in my opinion. Maybe if you just made it… Prettier :) Is their something wrong with the SRL FindMod? If not, why make your own? ;)

Again with the not very good color in a reflection script (AttackCow procedure).

Overall, decent. I'm not sure if I'd say yes or no, but still not voting either way ;)

Good luck.

Edit: Brain, this will be changed :) And if he doesn't get accepted, Hobbit will send him this page. (I told him to! :D Ha ha)

TRiLeZ

2009-04-23 08:12:55

This is all my work.
The reason why I didnt use srl's findmod is because I wanted the bot to respond to the mod. If the mod speaks to you, and logout, it will look suspicious, so it talks to them.
I tryed to make reflection attack the cow, but it has an offclick when the cow is straight up or down.

ian.

2009-04-23 08:16:50

Couldn't you just add a failsafe in their so it won't miss the cow? ;)

TRiLeZ

2009-04-23 08:20:56


Couldn't you just add a failsafe in their so it won't miss the cow?


I never really thought of that, I should try that soon. Thanks for the feedback.
Also, the reason for not using srl's Auto Cast was because it didnt find every spell and click it.
Also, I tryed making WalkFromDead an array, but it only clicked like 4/5 points and carried on.

ZaSz

2009-04-23 08:21:29

From: 99_
Couldn't you just add a failsafe in their so it won't miss the cow? ;)


As in offsets.

mormonman

2009-04-23 08:29:14

Hmm… no. Just because of the dumb decisions you made on choosing how to do stuff. Go learn TPA's and if you already know them then use them for finding the cow. Maybe add cowhide picking and banking. Seems like an incredibly simple script, plus if you use reflection why not use it more powerfully. It is scripts like this that have reflection and don't use it to the entirety(is that a word?) that I don't like. Your deathwalk is just ugly. I have used an array for a lot longer deathwalk, and it worked perfectly.
Try something like this out:

function DeathWalkPath: TPointArray;
begin
SetLength(Result, 32);

Result[0] := Point(3227, 3219);
Result[1] := Point(3233, 3219);
Result[2] := Point(3233, 3225);
Result[3] := Point(3233, 3230);
Result[4] := Point(3228, 3232);
Result[5] := Point(3223, 3235);
Result[6] := Point(3217, 3236);
Result[7] := Point(3209, 3238);
Result[8] := Point(3201, 3237);
Result[9] := Point(3195, 3238);
Result[10] := Point(3187, 3238);
Result[11] := Point(3180, 3237);
Result[12] := Point(3174, 3237);
Result[13] := Point(3168, 3237);
Result[14] := Point(3161, 3237);
Result[15] := Point(3155, 3237);
Result[16] := Point(3151, 3237);
Result[17] := Point(3146, 3237);
Result[18] := Point(3142, 3235);
Result[19] := Point(3138, 3233);
Result[20] := Point(3137, 3227);
Result[21] := Point(3133, 3225);
Result[22] := Point(3127, 3224);
Result[23] := Point(3121, 3223);
Result[24] := Point(3114, 3223);
Result[25] := Point(3110, 3225);
Result[26] := Point(3108, 3230);
Result[27] := Point(3107, 3235);
Result[28] := Point(3100, 3237);
Result[29] := Point(3098, 3244);
Result[30] := Point(3095, 3248);
Result[31] := Point(3092, 3245);
end;

Procedure DeathWalk;
Var
I: Integer;
Path: TPointArray;

Begin
Path := DeathWalkPath;
for i:=0 to High(Path) do
begin
WalkToTile(Path[i], 0, 3);
if(i = High(Path))then break;
while(not TileOnMM(Path[(i+1)]))do
Wait(RandomRange(50, 150));
FindRandoms;
end;
end;

ian.

2009-04-23 08:29:30

if you added a failsafe (UpText checking or if using ref, options) then you could re look for the cow, change compass, or choose a different cow :)

Edit: mormon, that's ugly too =X

Why not make it an array like Result := [Point(0, 0), Point(0, 1)]; ? :) It makes it shorter and neater :D

marpis

2009-04-23 08:48:04

Yes from me :) It's a very good start.
I have no time to tell more, sry, school ->

Also 'even' training does not mean FightMode(3).
It means you must check which melee skill has the lowest level and train it.

mormonman

2009-04-23 08:51:55

From: 99_

Edit: mormon, that's ugly too =X

Why not make it an array like Result := [Point(0, 0), Point(0, 1)]; ? :) It makes it shorter and neater :D


meh… that was on my first script with reflection. My other ones don't need a deathwalk :o

ian.

2009-04-23 08:54:13

:p Sorry, didn't want to sound rude in my post but, you kinda were to him and he's pretty new (I think? Ha ha), and he could've learned what he needed to do if you said it nice :)

Yeah he's new. ;)

EvilChicken!

2009-04-23 09:17:16

It's a yes from me - but you should learn cases and their usefulness in scripts.
There's several tutorials about it in the beginner's section. :)

Floor66

2009-04-23 09:33:28

Yes. At first I was sceptical because it was Reflection, but also I know that even Reflection can be very difficult in some things.

ShowerThoughts

2009-04-23 10:07:44

Since when is reflection allowed in SRL member applications, also I don't think he's good enough yet.
sorry, but you have a lot to learn like finding the cow better way instead of a findcolorspiral, since if some pixel has the same color it will hover that and that is for me already annoying ;)

Good luck.

ian.

2009-04-23 10:13:47

It's been allowed.

lordsaturn

2009-04-23 10:26:35

In FindModTrilez the bitmaps are never freed.

In WalkThenFlag, the result is always true, even if the script fails to walk. Try adding some failsafes aswell.

In RandomEmote, some maths could easily be used, instead of 20 different coordinates.

Sorry, I'll have to say no. The only color methods in your entire script are FindColorTolerance and FindObj, and your reflection fails to impress me. Try reapplying with a non-reflection script, maybe after you've become a bit more active (if you don't get in of course).

MasterKill

2009-04-23 11:19:36

procedure SetCStyle;
begin
GameTab(1);
if Players[CurrentPlayer].Strings[1] = 'Strength' then SetFightMode(2);
if Players[CurrentPlayer].Strings[1] = 'Attack' then SetFightMode(1);
if Players[CurrentPlayer].Strings[1] = 'Defence' then SetFightMode(4);
if Players[CurrentPlayer].Strings[1] = 'Even' then SetFightMode(3);
if Players[CurrentPlayer].Strings[1] = 'Mage' then SetUpAutoCast(Players[CurrentPlayer].Strings[3], false);
if Players[CurrentPlayer].Strings[1] = 'MageDef' then SetUpAutoCast(Players[CurrentPlayer].Strings[3], true);
if Players[CurrentPlayer].Strings[1] = 'Accurate' then Mouse(602, 272,0,0,true);
if Players[CurrentPlayer].Strings[1] = 'Rapid' then Mouse(677, 273,0,0,true);
if Players[CurrentPlayer].Strings[1] = 'LongRange' then Mouse(602, 319,0,0,true);
end;

aaa! use cases please! Now the script is checking the players string1 9 times, instaid of 1 with a case

procedure SetCStyle;
begin
GameTab(1);
Case Players[CurrentPlayer].Strings[1] Of
'Strength': SetFightMode(2);
'Attack': SetFightMode(1);
'Defence': SetFightMode(4);
'Even': SetFightMode(3);
'Mage': SetUpAutoCast(Players[CurrentPlayer].Strings[3], false);
'MageDef': SetUpAutoCast(Players[CurrentPlayer].Strings[3], true);
'Accurate': Mouse(602, 272,0,0,true);
'Rapid': Mouse(677, 273,0,0,true);
'LongRange': Mouse(602, 319,0,0,true);
End;
end;

And also, your progress report could be way and way shorter O.O

You should try FindObjTPA for object finding

sorry it's a no for now, but you on the right path to srl members. Keep up the scripting! You made a really good start.

EvilChicken!

2009-04-23 13:37:10

If he doesn't get in, (which I doubt he will considering people's current comments) he should be allowed to re-apply in two weeks..

Torrent of Flame

2009-04-23 21:55:08

I voted yes. We are forgetting that people have the capacity to learn here. What happened to the days of "Well its a great start, and you seem to want to learn"?

ShowerThoughts

2009-04-23 23:07:51

Let anyone start with SRL member and then let em learn?
It is a title you have to earn.
We can't let everyone in.

Torrent of Flame

2009-04-23 23:14:35

From: Hermpie
Let anyone start with SRL member and then let em learn?
It is a title you have to earn.
We can't let everyone in.


I didnt say that.

Markus

2009-04-23 23:16:55

From: Hermpie
Let anyone start with SRL member and then let em learn?
It is a title you have to earn.
We can't let everyone in.

Indeed, maybe we should let some members re-apply?

Torrent of Flame

2009-04-23 23:33:58

I'm saying the guy knows what he is doing, he's just lacking a bit of direction. I'm not saying let any old billy or flanders in and let them learn whilst they are here.

mormonman

2009-04-23 23:42:02

From: Markus
Indeed, maybe we should let some members re-apply?


Let's do it!!! Make all members that haven't released a good script for some time re-apply… would be epic![/jokes]

JAD

2009-04-23 23:58:50

Your progress report:


procedure ProgressReport;
begin
if not LoggedIn then exit;
ClearDebug;
if (HowManyPlayers = 1) then
begin
Writeln('****************************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('****************************************************************************');
Writeln('Running Time: '+TimeRunning);
Writeln('Killed: '+inttostr(gCowKill)+' Cows.');
Writeln('Xp Gained: '+inttostr(gTxp));
Writeln('Bones Picked Up: '+inttostr(gBones));
Writeln('Mods Found: '+inttostr(gModsTRiLeZ)+' Mods.');
Writeln('Deaths: '+inttostr(gDeathsTRiLeZ));
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
Writeln('Arrows Used: '+inttostr(gArrowsUsed));
Writeln('****************************************************************************');
end;
if (HowManyPlayers > 1) then
begin
Players[CurrentPlayer].Integers[1]:= Players[CurrentPlayer].Integers[1] + gCowKill;
gCowKill:= 0;
Players[CurrentPlayer].Integers[2]:= gNowXp-gStartXp;
Players[CurrentPlayer].Integers[3]:= Players[CurrentPlayer].Integers[3] + gBones;
gBones:= 0;
Players[CurrentPlayer].Integers[4]:= Players[CurrentPlayer].Integers[4] + gModsTRiLeZ;
gModsTRiLeZ:= 0;
Players[CurrentPlayer].Integers[5]:= Players[CurrentPlayer].Integers[5] + gDeathsTRiLeZ;
gDeathsTRiLeZ:= 0;
Players[CurrentPlayer].Integers[6]:= Players[CurrentPlayer].Integers[5] + gArrowsUsed;
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
begin
Writeln('********************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('********************************************************************');
Writeln('| Nick | Killed | XP Gained | Bones | Mods | Deaths | Arrows Used |');
Writeln(' ******** ******** *********** ******* ****** ******** *************');
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| '
+Padr(IntToStr(Players[i].Integers[6]),12)+'| ');
end;
Writeln('**********************************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('**********************************************************************');
end else
begin
Writeln('******************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('******************************************************');
Writeln('| Nick | Killed | XP Gained | Bones | Mods | Deaths |');
Writeln(' ******** ******** *********** ******* ****** ********');
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| ');
end;
Writeln('******************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('******************************************************');
end;
end;
end;

If you took out the gcowkill, gbones…etc. and just incremented the Players[currentplayers].integers then you could eliminate all those lines in your progress report with the same end result. Then your progress report could be shortened down to this:


procedure ProgressReport;
begin
if not LoggedIn then exit;
ClearDebug;
Writeln('********************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('********************************************************************');
if (HowManyPlayers = 1) then
begin
Writeln('Running Time: '+TimeRunning);
Writeln('Killed: '+inttostr(gCowKill)+' Cows.');
Writeln('Xp Gained: '+inttostr(gTxp));
Writeln('Bones Picked Up: '+inttostr(gBones));
Writeln('Mods Found: '+inttostr(gModsTRiLeZ)+' Mods.');
Writeln('Deaths: '+inttostr(gDeathsTRiLeZ));
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
Writeln('Arrows Used: '+inttostr(gArrowsUsed));
Writeln('****************************************************************************');
Exit;
end;
Writeln('| Nick | Killed | XP Gained | Bones | Mods | Deaths | Arrows Used |');
Writeln(' ******** ******** *********** ******* ****** ******** *************');
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
begin
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| '
+Padr(IntToStr(Players[i].Integers[6]),12)+'| ');
end;
end else
begin
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| ');
end;
end;
Writeln('**********************************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('**********************************************************************');
end;

This should give you the same result as the other one if you incremented the integers instead of using the pointless vars. Or, you could simply combine the single player and multi player progress reports to make it even shorter by cutting out the single player progress report:


procedure ProgressReport;
begin
if not LoggedIn then exit;
ClearDebug;
Writeln('********************************************************************');
Writeln('Cow Fighter v3 [SMART] by TRiLeZ ' + ' Used by: ' + Username);
Writeln('********************************************************************');
Writeln('| Nick | Killed | XP Gained | Bones | Mods | Deaths | Arrows Used |');
Writeln(' ******** ******** *********** ******* ****** ******** *************');
if (Players[CurrentPlayer].Strings[1] = 'Accurate') or
(Players[CurrentPlayer].Strings[1] = 'Rapid') or
(Players[CurrentPlayer].Strings[1] = 'LongRange') then
begin
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| '
+Padr(IntToStr(Players[i].Integers[6]),12)+'| ');
end;
end else
begin
for i:= 0 to HowManyPlayers-1 do
begin
Writeln('| '+Padr(Players[i].Nick, 7)+'| '+Padr(IntToStr(Players[i].Integers[1]),7)+'| '
+Padr(IntToStr(Players[i].Integers[2]),10)+'| '+Padr(IntToStr(Players[i].Integers[3]),6)+'| '
+Padr(IntToStr(Players[i].Integers[4]),5)+'| '+Padr(IntToStr(Players[i].Integers[5]),7)+'| ');
end;
end;
Writeln('**********************************************************************');
Writeln(' Total Running Time: '+TimeRunning);
Writeln('**********************************************************************');
end;

Now we're down to a reasonable size for a progress report.


Everyone pointed out everything else that really needed to be said. Good job though. I'm not going to vote.

Brain

2009-04-24 00:18:12

I voted yes.

I took a peek at your post history. Based on that it seems like you have been helpful with people, you have been playing some of the little board games that go around (but not too much of them). You seem to have a great attitude, taking any criticism on this thread very constructively.

WT-Fakawi

2009-04-24 00:27:36

Nice.

Give SetupAutoCast a lil' more randomness in the mouseclick. 1,1 is a bit on the small side.

TRiLeZ

2009-04-24 00:28:03

Since some people didnt like my attacking procedure, I made a new one and it works smoothly, and its reflection :)


procedure AttackCow;
var
NPC: TNPC;
P: TPoint;
begin
FindDeadTRiLeZ;
FindModTRiLeZ;
repeat
if (not LoggedIn) then exit;
FindRandoms;
FindDeadTRiLeZ;
ArrowCheck;
Status('Finding Cow');
if FindFreeNPC('Cow', NPC) then
begin
P:= NPC.MS
if IsInteractingWithMe('Cow') then Break;
Mouse(P.x,P.y,0,0,False);
if IsInteractingWithMe('Cow') then Break;
if ChooseOption('Attack') then
begin
FindDeadTRiLeZ;
FindModTRiLeZ;
FindRandoms;
Wait(700);
if CharacterMoving then wait(10);
Wait(700);
if not (Players[CurrentPlayer].Strings[1] = 'Attack') or not
(Players[CurrentPlayer].Strings[1] = 'Strength')
or not (Players[CurrentPlayer].Strings[1] = 'Defence') or not
(Players[CurrentPlayer].Strings[1] = 'Even') then
Wait(900+random(200));
end;
end
else
wait(200+random(150));
until IsInteractingWithMe('Cow');
Status('Fighting Cow');
MageCheck;
FindRandoms;
NowEXP;
AntiBan;
repeat
ArrowCheck;
wait(10);
until not IsInteractingWithMe('Cow');
gCowKill:= gCowKill+1;
end;

Wizzup?

2009-04-24 00:48:35

From: TRiLeZ
Since some people didnt like my attacking procedure, I made a new one and it works smoothly, and its reflection :)


No offence - but personally I don't think using Reflection is a good thing.
(Wasn't an Application supposed to be non Reflection?)

Also - it is nice if you click on ads that you like. But clicking them too much ill bring our ad sense accounts it danger - so don't abuse it.

Voted yes.

ian.

2009-04-24 00:55:41

Wizzup?, a few people have applied using Reflection :)

TRiLeZ

2009-04-24 00:59:29

Dont worry, I only click on ads once a day and I try to not click the same ad more than twice a week.
Also Im going to see which attacking procedure is faster, and Ill stick to the faster one.

JAD

2009-04-24 01:07:45

I decided. Yes from me.

ian.

2009-04-24 02:24:25

;) Sneaky sneaky, JAD :)

noidea

2009-04-24 03:55:57

Sorry man, NO.
No TPA's, no DTM's, no DDTM's, the ONLY walking done is using reflection, not many failsafes.
Cmon, you can do better ;)

3Garrett3

2009-04-24 04:56:47

What happened to this stuff guys?

[X]: DTMs
[X]: DDTMs
[X]: Walking - Colour = non existant
[X]: Antiban/Antirandom
[X]: Multiplayer
[X]: TPAs/T2DTPAs

Looks pretty clear cut no to me.. I voted no.

Lancelot074

2009-04-24 06:19:41

Voted no, reflection walking? C'mon way too easy. I don't see any TPA's or even DTM's for that matter! Could use more randomness too…

XcanadamanX

2009-04-24 06:24:21

i am also going to say no. I think you need to work on colour walking and using colour in general in your script instead of just using reflection. I know that reflection is powerful i just believe it should be used as a back up rather than having reflection as the whole script. good luck next time.

Smartzkid

2009-04-24 07:57:46

{.include srl/srl/reflection/Reflection.scar}

No.

mormonman

2009-04-24 08:00:18

From: Smartzkid
{.include srl/srl/reflection/Reflection.scar}

No.


lawl.:D

ZaSz

2009-04-24 08:11:58

From: 99_
Wizzup?, a few people have applied using Reflection :)


= me.

TRiLeZ

2009-04-24 10:00:16

Forgot about using DTMs :P
I inserted a DTM into the bone burrying procedure.
Anywhere else it would be usefull?

ian.

2009-04-24 10:13:40

I use DTMs for almost everything in the inventory or bank :) I love them <3

Quickmarch

2009-04-24 10:37:18

No from me, too simple. Maybe learn some TPA/ATPA's, DTM/DDTM's, etc. I feel SRL is letting in to many inexperienced members.

Laur€ns

2009-04-24 17:52:51

From: 3Garrett3
What happened to this stuff guys?

[X]: DTMs
[X]: DDTMs
[X]: Walking - Colour = non existant
[X]: Antiban/Antirandom
[X]: Multiplayer
[X]: TPAs/T2DTPAs

Looks pretty clear cut no to me.. I voted no.


Totally agreed. I voted NO.

TRiLeZ

2009-04-24 21:19:07

I have a DTM in the bone burrying procedure though

Nava2

2009-04-24 23:24:35

There needs to be a change here.

Reflection is acceptable, when used in advanced ways. This isn't advanced, but you can't cut someone up for reflection before you see how they used it.

By the way no from me, I want to see some form of colour used. :)

Torrent of Flame

2009-04-25 11:49:27

From: Nava2
There needs to be a change here.

Reflection is acceptable, when used in advanced ways. This isn't advanced, but you can't cut someone up for reflection before you see how they used it.

By the way no from me, I want to see some form of colour used. :)


I agree. If you look at Nava's reflection code it is very complex. You can't discriminate reflection, you have to look at it in the same way as colour, has it been used in advanced ways.

I voted No, also.

Naike

2009-04-25 13:12:33

No, Sorry, But i think you should be allowed to apply again in 2-3 weeks..

Wizzup?

2009-04-25 14:32:55

From: Nava2
There needs to be a change here.

Reflection is acceptable, when used in advanced ways. This isn't advanced, but you can't cut someone up for reflection before you see how they used it.

By the way no from me, I want to see some form of colour used. :)


If I look at his code, I think the Reflection part still needs work, too.
This is good:

function DeathWalkPath: TPointArray;
begin
Result := [Point(3227, 3219), Point(3229, 3219), Point(3232, 3227), Point(3222, 3238),
Point(3209, 3238), Point(3195, 3238), Point(3180, 3236), Point(3166, 3233), Point(3150, 3229),
Point(3134, 3228), Point(3119, 3227), Point(3106, 3236), Point(3105, 3248), Point(3093, 3249),
Point(3079, 3251), Point(3072, 3265), Point(3059, 3276), Point(3043, 3275), Point(3033, 3286),
Point(3039, 3295)];
end;

But this:



procedure WalkFromDead;
var
I: Integer;
Path: TPointArray;
begin
gDeathsTRiLeZ := gDeathsTRiLeZ + 1;
Status('Walking back to cows from death');
Logout;
LoginPlayer;
SetRun(true);
Path := DeathWalkPath;
for i:=0 to High(Path) do
begin
WalkToTile(Path[i], 0, 3);
if (i = High(Path)) then break;
while(not TileOnMM(Path[(i+1)]))do
Wait(RandomRange(50, 150));
end;
Mouse(579,224,0,0,false);
ChooseOption('Wield');
Mouse(620,229,0,0,false);
ChooseOption('Weild');
Mouse(662,228,0,0,true);
ChooseOption('Weild');
MakeCompass('N');
OpenDoor;
Wait(400+Random(200));
Mouse(608,42,4,4,true);
SetAngle(true);
Flag;
Mouse(91,493,0,0,true);
Flag;
Wait(2000+Random(200));
end;

Is not that as good. It is the wrong way of using reflection walking, the logic is flawed. (Just one for loop, and walk one tile once, even if the previous one fails.) Trust me, I had to find out the hard way. ;)

Taken from a script I made:


Function AtTile(Tile: TPoint; Dist: Integer): Boolean;

Var
P: TPoint;
Begin
GetMyPos(P.X, P.Y);
Result := Distance(P.X, P.Y, Tile.X, Tile.Y) <= Dist;
End;

Function WalkTile(Tile: TPoint; Randomness, FlagD: Integer): Boolean;

Var
wTile: TPoint;
t: Integer;

Begin
TileToMiniMap(Tile.X, Tile.Y, wTile.X, wTile.Y);

If Not rs_OnMiniMap(wTile.X, wTile.Y) Then
Begin
Result := False;
Exit;
End;
Result := True;

MFNF(wTile.x, wTile.y, -1, -1);
t := getsystemtime;
FFlag(FlagD);
Result := (GetSystemTime - t) < 60000;
End;

Function ClosestTile(Path: TPointArray): Integer;

Var
I: Integer;
p: TPoint;

Begin
GetMyPos(p.X, p.Y);
Result := 0;
For I := 0 To High(Path) Do
If Distance(p.x, p.y, Path[I].X, Path[I].Y) < Distance(p.x, p.y, Path[Result].X, Path[Result].Y) Then
Result := I;
End;

Function WalkNextStep(Path: TPointArray; Rand, FlagD: Integer): Boolean;

Var
I: Integer;

Begin
Result := False;
I := ClosestTile(Path);
If I = High(Path) Then
Exit;
If Not LoggedIn Then
Exit;
Result := True;
WalkTile(Path[I + 1], Rand, FlagD);
FindNormalRandoms;
End;

Function InsideEssenceAltar(Var Dist: Integer):Boolean;

Var
P: TPoint;

Begin
GetMyPos(P.X, P.Y);
Dist := Distance(P.X, P.Y, 2400, 4835);
Result := Dist < 20;
End;

{ Somewhere in the script }

Path := LoadPath('ToGlider');
T := GetSystemTime;
While WalkNextStep(Path, 3, 10) Do
Begin
Wait(50);
If GetSystemTime - T > 180000 Then
Begin
LogOut;
Exit;
End;
End;
FTWait(5);
FFlag(0);
SetLength(Path, 0);

This walking actually is consistent, the way he implemented walking is wrong. The rest of Reflection isn't much.
If one wants to apply with a Reflection script, it better be a complex one. :)

From: Torrent of Flame
I agree. If you look at Nava's reflection code it is very complex. You can't discriminate reflection, you have to look at it in the same way as colour, has it been used in advanced ways.

I voted No, also.


Could you show me some of his complex code?


Trilez, keep it up. I'm sure you have learned from this application, and amaze us with your script next time. :)

Hobbit

2009-05-05 08:57:50

11 - Yes
24 - No

Sorry but you didn't make it

Please stick around and read some tutorials and take what people have suggested to improve on your script then apply in one month.