SRL Archive - MSI Archives

[MVP] Multi-Skill Varrock Pwner 2.0


Special Ed

2008-04-27 00:44:12

Well since Macrosoft left and support for this has once again increase I've decided Due to some nagging *Ehem, Faster* to re-make this project and give it a shiny, new, organized thread of its own!

Multi-Skill Varrock Pwner
Codename: M.V.P.

This project script is going to harness the power of the collective mind that is SRL and pour all of that skill and intelligence into 1 Amazing script.

This script is meant to draw out all of the possibilities that Varrock and its surrounding area offers and give any and all characters running this script the ability to train specific skills or wander around and take advantage of all the things that Varrock has to offer.

The Objective

Develop a script that has the ability to act autonomously or follow specific instructions that are given to it by the end user. This script should perform all tasks assigned to it flawlessly while still maintaining a very human-like quality meaning extensive anti-ban and auto-responding features as well as highly tested functions and procedures.

This script can / will be able to train the following skills…

  • *All Combat Stats*
  • Mining
  • Smithing
  • Woodcutting
  • Crafting
  • Cooking *Ok I forgot the "all important" Cooking Skill, I'm sorry :p*
  • …

How to Contribute

Go to http://www.sourceforge.net and create an account. PM your sourceforge username to me on SRL, and I will add you to the project.

Next go to http://tortoisesvn.net/downloads and download the latest version of TortoiseSVN.

After you've installed ToroiseSVN create a folder on your desktop or wherever called MSI. Once you've created that folder, right click on it and selected SVN Checkout. For URL of Repository put

https://fcmb.svn.sourceforge.net/svnroot/fcmb

Don't change anything else, and click Ok.

Right click on that folder again and click update and you're good to go!

Other

I'm going to clean up the Sourceforge.net Member list for this project so if you don't RSVP your spot before May 1st I'll remove you from the project. You can get re-added but I just want the people who are contributing to be on there right now.

Any ideas and suggestions, let me know!


Current Contributing Members

  • Special Ed
  • Bullzeye95
  • Faster789
  • Timer
  • ZephyrsFury
  • Cazax
  • xCanadamanx
  • NaumanAkhlaQ
  • Mylesmadness
  • Bobarkinator

faster789

2008-04-27 00:49:12

:p Yay, its up! I'll check it out and see where I should start :D

Btw I'm already added right?

Special Ed

2008-04-27 00:54:01

From: faster789
:p Yay, its up! I'll check it out and see where I should start :D

Btw I'm already added right?


Yes you are apart of the SvN so long as you PM'ed me the correct sourceforge.net name. You can really do anything right now, me and bullzeye95 are working on a new walking system right now that would be revolutionary if we can get it to work correctly!

faster789

2008-04-27 01:00:21

:p Guys update it to 314! I changed something lets see if it worked? If you see changes please tell me what it is and if it is ok with you! :D

Edit: I've finished the Clay softener so if anyone edits feel free to but don't screw it up :p
btw I am currently making a Yew Chopper, it starts at GE and walks east from there to varrock castle and chops yews and banks. I have just started but there is a problem after it walks east of the GE I want it to find the dirt color. It finds the dirt color and writes it into the debug box but never actually clicks the color on the Minimap. As you can see I am using radial walk.
All help is appreciated, this is the script that messes up:

program Yewchopper;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}

var x, y : integer;

const

//Smart Setup//
SmartWorld = 118; // what world do you want to login to??
Signed = True; // leave alone..

procedure DeclarePlayers;
begin
HowManyPlayers :=1; // how many players do you want
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; //true if you want this player to be ran in the script false if you dont want it to run
end;

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;

Function GEFloorColor : Integer; // by Cazaz --- THANKS!
var
H,S,L,X,Y,Z : Extended;
R,G,B,P,A,TestColor,xx,xy : Integer;
TPA : TPointArray;
begin
if Not(LoggedIn) then Exit;
xx:= MMCX;
xy := MMCY;
FindColorsSpiralTolerance(xx, xy, TPA, 6910322, MMX1, MMY1, MMX2, MMY2, 60)
P := High(TPA);
for A := 0 to P do
begin
if RS_OnMinimap(TPA[A].X, TPA[A].Y) then
begin
TestColor := GetColor(TPA[A].X, TPA[A].Y);
if SimilarColors(TestColor, 6910322, 50) then
begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
if InRange(R - G, -9, 9) then
if InRange(R - B, 0, 17) then
if InRange(G - B, 1, 17) then
if InRange(Round(S) - Round(H), -23, 0) then
if InRange(Round(L) - Round(H), 16, 34) then
if InRange(Round(S) - Round(L), -57, -19) then
if InRange(Round(X) - Round(Y), -8, 6) then
if InRange(Round(Y) - Round(Z), -4, 6) then
if GetColor(TPA[A].X + 2, TPA[A].Y + 2) = TestColor then
if GetColor(TPA[A].X + 1, TPA[A].Y + 1) = TestColor then
begin
Writeln('GEFloorColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
end;
end;
end;
end;
Writeln('Couldnt find GEFloorColorColor!');
Result := 0;
end;


Function FindDirtColor : Integer;
var
H,S,L,X,Y,Z : Extended;
R,G,B,P,A,TestColor,xx,xy : Integer;
TPA : TPointArray;
begin
if Not(LoggedIn) then Exit;
xx:= MMCX;
xy := MMCY;
FindColorsSpiralTolerance(xx, xy, TPA, 2513511, MMX1, MMY1, MMX2, MMY2, 60)
P := High(TPA);
for A := 0 to P do
begin
if RS_OnMinimap(TPA[A].X, TPA[A].Y) then
begin
TestColor := GetColor(TPA[A].X, TPA[A].Y);
if SimilarColors(TestColor, 2513511, 50) then
begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
if InRange(R - G, -9, 32) then
if InRange(R - B, 27, 78) then
if InRange(G - B, 28, 67) then
if InRange(Round(S) - Round(H), 25, 51) then
if InRange(Round(L) - Round(H), -2, 24) then
if InRange(Round(S) - Round(L), 9, 47) then
if InRange(Round(X) - Round(Y), -9, 9) then
if InRange(Round(Y) - Round(Z), -4, 13) then
if GetColor(TPA[A].X + 2, TPA[A].Y + 2) = TestColor then
if GetColor(TPA[A].X + 1, TPA[A].Y + 1) = TestColor then
begin
Writeln('DirtRoadColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
end;
end;
end;
end;
Writeln('Couldnt find DirtRoadColor!');
Result := 0;
end;


function Energy20: Boolean;
var
Colour: string;
Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
Result := Level > 50;
end;

procedure WalktoYews;
begin
Status('setting up');
SetAngle(True);
MakeCompass('n');
if Energy20 then
begin
SetRun(true);
end;
begin
Status('Walking to yews');
RadialWalk(GEFloorColor,80,100,65,-2,0);
FFlag(0);
if RadialWalk(FindDirtColor,60,130,65,-2,0)then
begin
FFlag(0);
end else
writeln('we arent at varrock');
if RadialWalk(FindDirtColor,340,390,65,-2,0)then
begin
FFlag(0);
end else
writeln('we arent at varrock');
FFlag(0);
if FindSymbol(x,y,'tree')then
Status('found tree symbol');
begin
Mouse(x,y,2,2,True);
end;
end;
end;

function FindTree(var tx, ty: Integer):boolean; //Made by Me :)...
var
i: integer;
YewPoints: TPointArray;
Yew2D : T2DPointArray;
YewPoint : TPoint;
begin
if not LoggedIn then exit;
x:= MSCX;
y:= MSCY;
begin
FindColorsSpiralTolerance(tx,ty,YewPoints,2832993,MSX1,MSY1,MSX2,MSY2,6);
Yew2D:= TPAtoATPAEx(YewPoints,3,3);
for i:= 0 to length(Yew2D)-1 do
begin
if not LoggedIn then exit;
Yewpoint:= MiddleTPA(Yew2D[i]);
tx:= YewPoint.X;
ty:= YewPoint.Y;
MMouse(tx,ty,2,2);
wait(90+random(50));
if isuptext('hop')then
begin
GetMousePos(tx,ty);
result:= true;
Exit;
end else Continue;
end;
end;
end;


begin
SetupSmart;
SetupSRL;
DeclarePlayers;
LoginPlayer;
WalktoYews;
end.

ZephyrsFury

2008-04-27 01:59:23

Ok I'd still like to help with the walking… if thats needed of course and if you want to combine all the walking into one.

bullzeye95

2008-04-27 02:05:49

From: ZephyrsFury
Ok I'd still like to help with the walking… if thats needed of course and if you want to combine all the walking into one.


Definitely. I'd really like to hear what you're working on!

ZephyrsFury

2008-04-27 02:07:27

Hmm well I'll have to setup my SvN again. I'll add some stuff in there. It doesn't work atm and I'm not very confident that it will work at all.

Santa_Clause

2008-04-27 04:01:59

So…all the cooking stuff I made has been put to waste?

Sir R. M8gic1an

2008-04-27 06:37:07

I'm willing to help with woodcutting atm. i'm not much of a walker, and i g2g right now but i'll setup SVN once i get back. check out my power chopper here in the member scripts section.

if anyone wishes to use SmartColorsCustom for this script i'm willing to explain it better to them.

~RM

ZephyrsFury

2008-04-27 06:39:36

From: Santa_Clause
So…all the cooking stuff I made has been put to waste?


Nah why would it?

ShowerThoughts

2008-04-27 07:38:50

I Join how can i add files? to the svn? to post it here?

ZephyrsFury

2008-04-27 08:03:59

From: Hermpie
I Join how can i add files? to the svn? to post it here?


Read the first post.

ShowerThoughts

2008-04-27 08:07:36

I did it only explains how to get files or should i add a file and then click commit?

ZephyrsFury

2008-04-27 08:18:47

Yes move the files into the SvN folder and press Commit. You'll need to type your username and pass that you sent to Ed. Once you've done that it should update the files. :)

ShowerThoughts

2008-04-27 08:30:05

0.o i send as pass my ass because i thought he was kidding :S

ZephyrsFury

2008-04-27 08:37:01

From: Hermpie
0.o i send as pass my ass because i thought he was kidding :S


Woops sorry, you only have to send your username. I was supposed to say the username and pass that you registered at SourceForge with.

ShowerThoughts

2008-04-27 08:44:07

ow k.. :p

Santa_Clause

2008-04-27 09:50:46

From: ZephyrsFury
Nah why would it?

  • * *All Combat Stats*
  • * Mining
  • * Smithing
  • * Woodcutting
  • * Crafting
  • * …


That's why.

ZephyrsFury

2008-04-27 09:52:48

The '…' means cooking. ;)

Santa_Clause

2008-04-27 09:56:30

From: ZephyrsFury
The '…' means cooking. ;)


Special Ed was bored enough to write out that whole post, but too lazy to write cooking…weird :p

Naum

2008-04-27 11:48:05

Ok Ed I've joined :)

Special Ed

2008-04-27 11:51:50

Edit, it wasn't that I was bored enough to write the post. It was that I got annoyed enough by a certain unnamed member to write it :p

No, I had just forgotten about it. I updated the first post!

So can I count on all of you to contribute to MSI? I don't want any "Oh I'll help!" *Goes inactive for 3 months* crap…

Santa, you can add the cooking to the SvN whenever you want! What have you made for cooking, specifically?

Also, if you know how to setup an IRC channel let me know… I was thinking of making a specific MSI one. Although I don't know a lot about IRC so I don't know if you can make private channels and what-not.

Sir R. M8gic1an

2008-04-27 12:11:35

oh, a question, is this going to be members or juniors after all?

~RM

Special Ed

2008-04-27 12:14:04

From: Rasta Magician
oh, a question, is this going to be members or juniors after all?

~RM


I was planning on this being members only since MSI is a members only group. SRL-Members needs a cool new script that only SRL-Members can have. Granted there are some but not many new ones!

I guess it really depends on the popular vote but IMO it should be Members only.

Cazax

2008-04-27 12:43:18

I want to help with the walking :)

ShowerThoughts

2008-04-27 12:48:42

Okay What Do I Have to Make? Can I Make 1 Bank Opener for the 2 banks And 1 for GE?

Special Ed

2008-04-27 13:08:29

@ Cazax - If you want to help with walking contact Zephyr or Bullzeye. We don't need that many people working on walking though so if you'd like to work on Guard Finding or Something in the mean time that would be just as helpful as walking. Just make sure you talk to Bullzeye first before you start walking at least.

@Hermpie - Ya if you want to make a bank opener be my guest! Once you finish them commit and we'll get people to test it out so we can improve if need be. They need to work 100% of the time without fail, remember that Hermpie! :)

Cazax

2008-04-27 13:12:07

Ok Ed, so im going to make the guard finder and an item picker ok?

Special Ed

2008-04-27 13:23:31

From: Cazax
Ok Ed, so im going to make the guard finder and an item picker ok?


Sweet! I'm thinking we should have it pick up "all" the items guards can drop. Include bone burying and banking / selling of items.

faster789

2008-04-27 15:25:46

From: Special Ed
Edit, it wasn't that I was bored enough to write the post. It was that I got annoyed enough by a certain unnamed member to write it :p

No, I had just forgotten about it. I updated the first post!

So can I count on all of you to contribute to MSI? I don't want any "Oh I'll help!" *Goes inactive for 3 months* crap…

Santa, you can add the cooking to the SvN whenever you want! What have you made for cooking, specifically?

Also, if you know how to setup an IRC channel let me know… I was thinking of making a specific MSI one. Although I don't know a lot about IRC so I don't know if you can make private channels and what-not.


Unnamed eh? :p :D Hmm I'm guessing the progress of the MVP has an improvement from the last time? :rolleyes:

MylesMadness

2008-04-27 17:46:32

Can I do varock east mine? I started it last time.

Special Ed

2008-04-27 20:26:27

From: Mylesmadness
Can I do varock east mine? I started it last time.


Go for it, I'd suggest using Benland100s FindRock procedure and functions from his CrazyFast.dll. Both of those are in the SVN but they're in the Multiple-Miner and Smither Folder. I was working on that as well, but you can work on it too.

Bobarkinator

2008-04-27 21:21:37

Put me on the list, I'll start doing the Varrock East Mine. I'm already on the sourceforge I think

MylesMadness

2008-04-27 22:49:47

From: Mylesmadness
Can I do varock east mine? I started it last time.
From: Bobarkinator
Put me on the list, I'll start doing the Varrock East Mine. I'm already on the sourceforge I think
yeah um
edit:I think I got removed from the list because I can't commit

bullzeye95

2008-04-27 22:50:38

You can both work on different parts ;)

P1nky

2008-04-27 23:05:23

is this for srl members or junoirs?

faster789

2008-04-27 23:30:06

:p SRL members plzz ed?

P1nky

2008-04-27 23:40:38

should be lol…

only srl members are working i doubt its for juniors or ever will be :) hopefully -.-

Gu3st...

2008-04-29 10:00:31

since SMART got out, we should have MSI for ourselfes :p

ShowerThoughts

2008-04-29 10:34:29

Should i make the HOpenBank Like This?

function HOpenBank(Pin:integer; VarrockEastBank:Boolean):Boolean;

k?
HOpenBank(Players[currentplayer].Integers[0],False)
for example….

Wizzup?

2008-04-29 10:54:06

From: Special Ed
Go for it, I'd suggest using Benland100s FindRock procedure and functions from his CrazyFast.dll. Both of those are in the SVN but they're in the Multiple-Miner and Smither Folder. I was working on that as well, but you can work on it too.


A suggestion: Do not concentrate on Rock Finding too much, Sumilion has a nice surprise for you guys in the next SRL. ;)

MylesMadness

2008-04-29 11:19:24

So many surprise. New autocolor stuff that rock finding thingy. Just release it for have the site down for a day.

Special Ed

2008-04-29 17:46:45

From: Mylesmadness
yeah um
edit:I think I got removed from the list because I can't commit


@Myles - I just checked sourceforge.net and you are still registered on this project. Try recovering your name / password on sourceforge and try again.

From: P1NKY
is this for srl members or junoirs?


From: faster789
:p SRL members plzz ed?


From: Zytex!
since SMART got out, we should have MSI for ourselfes :p


From: Rasta Magician
oh, a question, is this going to be members or juniors after all?

~RM


From: Special Ed
I was planning on this being members only since MSI is a members only group. SRL-Members needs a cool new script that only SRL-Members can have. Granted there are some but not many new ones!

I guess it really depends on the popular vote but IMO it should be Members only.


@You guys need to learn to read. Hahahaha… I'll add a poll!

ShowerThoughts

2008-04-29 18:02:07

W00t my HopenBank Works Great it will tommorow be ready to p0wnz your ass!

MylesMadness

2008-04-29 19:34:35

From: Special Ed
@Myles - I just checked sourceforge.net and you are still registered on this project. Try recovering your name / password on sourceforge and try again.
I can log on fine on the site not with tortoisesvn.

Special Ed

2008-04-29 21:16:27

Do you have the latest TortoiseSVN? I was having this exact same problem a while ago… I can't remember how I fixed it… Try resetting your password on sourceforge.net and trying again.

EDIT:

From: Wizzup?
A suggestion: Do not concentrate on Rock Finding too much, Sumilion has a nice surprise for you guys in the next SRL. ;)


Oooooh… I like surprises! At least… when they're beneficial. :)

Bobarkinator

2008-04-29 21:17:08

Sorry Myles, I didn't see your post :p, I'll work on VWM.

MylesMadness

2008-04-30 10:49:05

Okay Special Ed, I got it working. I had to reset my password.

P1nky

2008-04-30 12:52:41

From: Wizzup?
A suggestion: Do not concentrate on Rock Finding too much, Sumilion has a nice surprise for you guys in the next SRL. ;)


could i put that in my sig :)?

i love suprises!

btw ED why not do a Fally Pwner?

it has alot more varities? j/w.

Naum

2008-04-30 13:03:10

Ok I've tried my hand a FireMaking,

First Of All :
sorry I couldn't upload it to the SvN as i don't know how to:

The Bitmaps are kinda big, so if you want to edit them feel free, but if something aint broke don't fix it ;)

This is the frame work

Enjoy

MylesMadness

2008-04-30 15:49:22

From: NaumanAkhlaQ
Ok I've tried my hand a FireMaking,

First Of All :
sorry I couldn't upload it to the SvN as i don't know how to:

The Bitmaps are kinda big, so if you want to edit them feel free, but if something aint broke don't fix it ;)

This is the frame work

Enjoy
I uploaded to the svn for you

Naum

2008-04-30 16:06:57

Thanks man, I Hope I Got Credits ;)

E: Do I become a contributing member now?

Special Ed

2008-04-30 21:13:26

From: NaumanAkhlaQ
Thanks man, I Hope I Got Credits ;)

E: Do I become a contributing member now?


Ya you're a contributing member now! Why did you vote no for having [MVP] being member only, though?

bullzeye95

2008-04-30 22:27:40

Nauman, I looked through your thingy real fast. I uploaded it with some comments that you could possibly learn from.

MylesMadness

2008-04-30 23:00:22

From: Special Ed
Ya you're a contributing member now! Why did you vote no for having [MVP] being member only, though?
Do I get contributing member now for doing 90%(more like 50% if I have to do walking)? Anyways do you want me to do the walking or only the mining at the place?

Naum

2008-05-01 02:51:01

From: bullzeye95
Nauman, I looked through your thingy real fast. I uploaded it with some comments that you could possibly learn from.


Ok the local variable thing I Get :)

The others I have put them in their own seperate procedures so it can be done faster and more quicker.
And I used a case but I dont know what you mean on that line.
Possibly maybe you could 'make it better' and post it on the SvN :)
Thanks.

E: @ Ed, the reason is that the public might want a BETA from us to show them what we are capable of :)

Sir R. M8gic1an

2008-05-01 03:20:21

hermpie i don't think you should do the banking like that,
HOpenBank(Players[currentplayer].Integers[0],False)

it'd reather be better to do

HOpenBank(VEB:boolean): boolean;
begin
if PinScreen then InPin(Players[CurrentPlayer].Integers[0]);
....
end;

i'm not sure if the right function is called PinScreen, but you can look into in bank.scar in the core folder.
And i think that in the player array there might already be a place for Pin's, you don't have to use Integer[0].

@ED, i did read, but i posted before you did :p

btw it would be great if the walking system could be called like Walk('veb', 'ge');

and has anyone thought of making a sewers fighter? that would be amazing! and also good for training magic!

i haven't installed svn and contributed yet because my computer is completly messed up, i'm not even able to turn it on and run it for half an hour properly, and the only times i get access is from public / scholl / girlfriend's computer so i can't really install my stuff onto there.

Members only! :d

~RM

MylesMadness

2008-05-01 10:16:07

Members only. But we should make a crazy sig for it and all put it in out sigs. That way people will want to learn to script so they can get this script.

Naum

2008-05-01 12:22:55

From: Mylesmadness
Members only. But we should make a crazy sig for it and all put it in out sigs. That way people will want to learn to script so they can get this script.


No thats a bad idea, We will get loads of appliances which are really not worth it. :/

Special Ed

2008-05-01 22:02:05

Ok, sorry for the slight inactivity! Myles you're a contributing member now, sorry for the delay. Rasta, that would be amazing but I think we need to finish what we've got on our plate first… or else we'll have a bunch of things started but nothing finished. Nauman, the BETA thing is a good idea… that was suggested in the last one, but we need to actually get to that stage first.

MylesMadness

2008-05-01 22:11:54

no beta. Nothing at all.

Special Ed

2008-05-02 13:30:38

Well I cleaned up the sourceforge.net members for this project. If you want to commit and it's not letting you PM me with your sourceforge name and I'll update the userlist.

All contributing members are still active on this project.

Naum

2008-05-02 14:17:41

Yes Ed I've started making a dummy smasher, which smashes the dummies outside varrock east bank. Ill have it done by Monday (at the least). ;)

Special Ed

2008-05-02 14:34:12

Alright sweet, I think I'm going to work on Woodcutting since noones else seems to be doing that right now. I may make a quick fire-starter thing as well so we can train firemaking as well.

EDIT: If anyone can upload some mainscreen pictures of trees at highest angle that would be awesome. If you can get some screenshots of whole normal trees and make like a compilation I can hopefully make a good tree finder.

Gu3st...

2008-05-03 03:25:46


Sir R. M8gic1an

2008-05-03 04:37:55

Ed, if it's not asking for too much wait one more week for woodcutting. it'll only take me a day or two to do it (seeing that i already have a wcer), but my computer is messed up and i can't install scar and svn on my sis' computer :(

edit: i have decided to advance some work on that, using notepad.



//stuff i need for SmartColors and other things for WCing
type
Monster = record
Name: string;
UpText: TStringArray;
Colors: TIntegerArray;
AutoColor: boolean;
RG, RB, GB: integer;
end;
var
Find: Array of Monster;
AllTIA: Array[0..3] of TIntegerArray;
LoadsDone, TotalLoads, SpotMark:integer;


//i think we should get a global proggy, but i'll leave this here for now
procedure Proggy;
var i:integer;
begin
ClearReport;
SrlRandomsReport;
AddToReport('[ Total Loads: '+IntToStr(TotalLoads));
AddToReport('[ Total Logs: '+IntToStr(TotalLoads*27));
AddToReport('[ Time Running: '+TimeRunning);
AddToReport('');
AddToReport('Nick, Tree, Logs, Active');
for i:=0 to High(Players) do
AddToReport(Players[i].Nick+', '+Players[i].Strings[0]+', '+
IntToStr(Players[i].Integers[0])+', '+
BoolToStr(Players[i].Active));

end;


// By Frozen Soul
Function PosArray(SubStr : Array of String; S : String) : Boolean;
var i:integer;
Begin
for i := 0 to GetArrayLength(SubStr) - 1 do
Begin
Result := Pos(SubStr[i], Lowercase(S)) > 0;
if Result then exit;
end;
end;


//to move the mouse if it hasn't moved for too long
procedure InactiveMove;
var x, y, i, h:integer;
begin
GetMousePos(x, y);
IncEx(MouseSpeed, 10);
i := GetCurrentTab;
repeat
h := 1+Random(12);
until(h <> i)
GameTab(h);
wait(1000+Random(500));
GameTab(i);
MMouse(x, y, 3, 3);
DecEx(MouseSpeed, 10);
end;

//checks if it's over the right tree and if it isn't an ent
Function CheckAndClick(var x, y:integer; text:TStringArray): boolean;
var
m:integer;
FoundIt:boolean;
begin
if not LoggedIn then exit;
wait(100);
MMouse(x, y, 3, 3);
wait(100);
for m:=0 to high(text) do
begin
if IsUpText(text[m]) then
begin
if MVPDebug then writeln('text is up, '+text[m]);
FoundIt:=True;
break;
end;
end;

if FoundIt then
begin
GetMousePos(x, y);
if FindEnt(x, y, False) then
begin
Result := False;
Inc(EntsAvoided);
wait(1000);
if MVPDebug then writeln('exiting');
exit;
if MVPDebug then writeln('exited');
end;
if MVPDebug then writeln('moving mouse to tree');
Mouse(x, y, 3, 3, True);
Result := True;
end else
Result := False;

end;

//Smart Colors By Tarajunky, Custom by Rasta Magician
Function SmartColorsCustom(name:string; UpText:TStringArray; colors:TIntegerArray):boolean;
var
j, k:integer;
b, Found:boolean;
var RMInt, RMx, RMy:integer;
var x,y,TestColor,a,l,m,i,red,green,blue, ClickColor:integer;
var p: array of Tpoint;

begin
if not LoggedIn then exit;
for i:=0 to High(Find) do
begin
if lowercase(name) = Find[i].Name then
begin
b := True;
k := i;
end;
end;

if not b then //we have to add it.
begin
k:=GetArrayLength(Find);
SetArrayLength(Find, k+1);
Find[k].Name:= lowercase(name);
Find[k].UpText := UpText;
Find[k].Colors := colors;
end;

{autocoloring}
if not Find[k].AutoColor then
begin
for i:=0 to High(Find[k].Colors) do
begin
ColorToRGB(Find[k].Colors[i], j, l, m)
IncEx(Find[k].RG, (j-l));
IncEx(Find[k].RB, (j-m));
IncEx(Find[k].GB, (l-m));
end;
Find[k].RG := (Find[k].RG/Length(Find[k].Colors))
Find[k].RB := (Find[k].RB/Length(Find[k].Colors))
Find[k].GB := (Find[k].GB/Length(Find[k].Colors))
Find[k].Autocolor := True;
end;

FFlag(0);
Wait(50);
if MVPDebug then writeln('Finding '+name);
l:=GetArrayLength(Find[k].Colors); //Checks known colors first
if l>0 then
begin
for i:= 0 to l-1 do
begin
if MVPDebug then writeln('finding color: '+IntToStr(Find[k].Colors[i]));
FindColorsSpiralTolerance(MSCX,MSCY,p,Find[k].Colors[i],MSX1,MSY1,MSX2,MSY2,0);
m:=GetArrayLength(p);
if m>0 then
begin
if m > 30 then exit;
for a:= 0 to m-1 do
begin
if CheckAndClick(p[a].x,p[a].y, Find[k].UpText) then //Moves mouse to position, checks uptext and clicks if correct.
begin
result:=true;
if i>0 then //if the color is not in the first position of the array...
Swap(Find[k].Colors[i], Find[k].Colors[i-1]);
// Swap found color with the one ahead of it in the array
exit; // We found our color, so we exit the function completely.
end;
end;
end;
end;
end;
//We didn't find any known colors, so continue on to the tolerance search
for j:=0 to High(Find[k].Colors) do
begin
if j >= 3 then break; //only wanna look for 3 colors with tol
if MVPDebug then writeln('finding color '+IntToStr(Find[k].Colors[j])+' with tol ');
FindColorsSpiralTolerance(MSCX, MSCY, p, Find[k].Colors[j],MSX1,MSY1,MSX2,MSY2,25);
l:=GetArrayLength(p);
if (l>0)and(not l>30) then
begin

for i:= 0 to l-1 do
begin
TestColor:=GetColor(p[i].x,p[i].y); //Additional autocoloring to reduce wrong points. (Optional)
{turning it to RGB}
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
{comparing colors}
if ((green-blue)<=(Find[k].GB+20)) then if ((green-blue)>=(Find[k].GB-20)) then
if ((red-green)>=(Find[k].RG-20)) then if ((red-green)<=(Find[k].RG+20)) then
if ((red-blue)>=(Find[k].RB-20)) then if ((red-blue)<=(Find[k].RB+20)) then
begin
Wait(20);
ClickColor:=GetColor(p[i].x,p[i].y);

for RMInt:=0 to High(Find[k].Colors) do
begin
if RMInt <> j then
if FindColorSpiralTolerance(RMx, RMy, Find[k].Colors[RMInt],x-5,y-5,x+5,y+5, 20) then
begin
Found:=True;
break;
end;
end;

If Found then
if CheckAndClick(p[a].x,p[a].y, Find[k].UpText) then //Move mouse, check uptext and click
begin
result:=true;
FindColorsSpiralTolerance(x,y,p,ClickColor,MSX1,MSY1,MSX2,MSY2,0);
if GetArrayLength(p)<20 then //Make sure that the color is somewhat rare, and doesn't take up half the screen
begin
a:=GetArrayLength(Find[k].Colors);
for i:= 0 to a-1 do
begin
if ClickColor=Find[k].Colors[i] then //If color is already in the array...
begin
if i>0 then
begin // Move it up one spot in the array search priority
Swap(Find[k].Colors[i], Find[k].Colors[i-1]);
end;
exit;
end;
end;
// if it's not in the array yet, then add it to the end of the array
SetArrayLength(Find[k].Colors,a+1);
Find[k].Colors[a]:=ClickColor;
if MVPDebug then Writeln(IntToStr(ClickColor)+' added to '+name+' array');
end;
exit;
end;
end;
end;
end;
end;
end;

//chooses the best unique colors around the mouse, used to autocolor for SmartColors
Function ScanColors: TIntegerArray;
var
x, y, i, h, j, k:integer;
RMColors, GoodColors:TIntegerArray;
p: TPointArray;
begin
if not LoggedIn then exit;
j := 0;
GetMousePos(x, y);
SetArrayLength(RMColors, 441);
for i:=x-10 to x+10 do //getting all the colors
begin
for h:=y-10 to y+10 do
begin
RMColors[j] := GetColor(i, h);
Inc(j);
end;
end;
ClearSameIntegers(RMColors);
h := High(RMColors)
k:=0;
SetArrayLength(GoodColors, h);
for i:= 0 to h do //checking out which colors are good;
begin
if k > 7 then break;
FindColorsSpiralTolerance(x, y, p, RMColors[i], MSX1, MSY1, MSX2, MSY2, 0);
j := Length(p);
if (j > 0)and(j < 30) then
begin
GoodColors[k]:= RMColors[i];
Inc(k);
end;
end;
//now we still need to sort them to see which ones are the best.
//or is that too much work, seeing that smart colors will end up doing it?
SetArrayLength(GoodColors, 7);
Result:=GoodColors;
end;

procedure CutTrees; forward;


//cheks if the axe is broken (if false its broken)
Function CheckAxe(StringArray: TStringArray):boolean;
begin
Result:=True;
if (PosArray(['do not have an axe'], StringArray[7])) or
(PosArray(['do not have an axe'], StringArray[8])) or
(PosArray(['need an axe to chop'], StringArray[7]))or
(PosArray(['need an axe to chop'], StringArray[8]))then
begin //Withdraw Axe
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].loc := 'No Axe';
if MVPDebug then writeln('axe broke');
LogOut;
// we should make it get the axe from the bank here
Result := False;
end;
end;

//gets away from ent, comes back close to tree and restarts chopping trees
procedure RunAwayEnt;
var
Rx, Ry, RBoolx, RBooly:integer;
begin
if not LoggedIn then exit;
if MVPDebug then writeln('running from ent');
RBoolx := Random(100)+1;
RBooly := Random(100)+1;

if RBoolx < 51 then
Rx := RandomRange(-15, -10)
else
Rx := RandomRange(10, 15);

if RBooly < 51 then
Ry := RandomRange(-15, -10)
else
Ry := RandomRange(10, 15);

Mouse(MMCX+Rx, MMCY+Ry, 0, 0, True);
wait(1000+Random(1000));
EntsAvoided := EntsAvoided + 1;
AntiBan;

//returning to place
if RBoolx < 51 then
Rx := RandomRange(10, 15)
else
Rx := RandomRange(-15, -10);

if RBooly < 51 then
Ry := RandomRange(10, 15)
else
Ry := RandomRange(-15, -10);

Mouse(MMCX+Rx, MMCY+Ry, 0, 0, True);
wait(1000+Random(1000));

CutTrees;
end;


procedure WaitUntilCut(name:string); forward;


//waits for player to move close to the tree and puts mouse over the tree
procedure GetToTree(name:string; WaitForTree:boolean);
var x, y, x1, x2, y1, y2, i:integer;
begin
if not LoggedIn then exit;
GetMousePos(x, y);
if FindEnt(x, y, False) then
begin
RunAwayEnt;
Exit;
end;
name := lowercase(name);
if MVPDebug then writeln('getting to tree '+name);
if (abs(MSCX - x)>30) then
if x > MSCX then //tree is to the right
begin
x1 := MSCX + 15;
if name='oak' then IncEx(x1, 15);
if name='willow' then IncEx(x1, 10);
if name='yew' then IncEx(x1, 30);
x2 := x1+30;
end else
begin
x1 := MSCX - 55;
if name='oak' then DecEx(x1, 15);
if name='willow' then DecEx(x1, 10);
if name='yew' then DecEx(x1, 30);
x2 := x1+30;
end
else
begin
x1 := MSCX-20;
x2 := x1 +40;
end;

//the bigger y the further down it is
if (abs(MSCX - y)>59) then
if y > MSCY then //it's under the player
begin
y1 := MSCY+20;
if name='oak' then IncEx(y1, 35);
if name='willow' then IncEx(y1, 25);
if name='yew' then IncEx(y1, 40);
y2 := y1+20;
end else
begin
y1 := MSCY - 50;
if name='oak' then DecEx(y1, 35);
if name='willow' then DecEx(y1, 25);
if name='yew' then DecEx(y1, 40);
y2 := y1 + 20;
end
else
begin
y1 := MSCY-25;
y2 := y1 +50;
end;

FFlag(0);
wait(500+Random(100));
if MVPDebug then writeln('decided where tree should be');
for i:= 0 to 5 do
begin
if MVPDebug then writeln('trying to find tree');
wait(100);
if (name = 'tree') then
if (GetBlackChatMessage = 'You get some logs.') then
exit;
if i = 0 then
MMouse((x1+x2)/2, (y1+y2)/2, 3, 3)
else
MouseBox(x1, y1, x2, y2, 3);
wait(100);
if IsUpText(Capitalize(name)) then
break;
end;
wait(100);
if InvFull then Exit; // Bank it?;
if WaitForTree then WaitUntilCut(name);
end;

//autocolors all trees
procedure AutoColorTree(name:string);
var
i, x, y:integer;
s: string;
Found:boolean;
begin
i := 10;
name := Capitalize(name);
case name of
'Tree', 'Normal': i:= 0;
'Oak': i:= 1;
'Willow': i:= 2;
'Yew': i:= 3;
end;

if i = 10 then
begin
writeln('tree name incorrect');
exit;
end;

if (Length(AllTIA[i]) > 0) then
begin
if MVPDebug then writeln('already AutoColored');
exit;
end;

if MVPDebug then writeln('autocoloring '+name);
repeat
if FindObjTPA(x, y, 2772296, 11, -1, 7, 7, 15, [ name ]) then
begin
if IsUpText(name) then
begin
AllTIA[i]:=ScanColors;
if AllTIA[i][0] <> 0 then Found:=True;
end;
end;
until(found)
if MVPDebug then writeln(name+' color: '+IntToStr(AllTIA[i][0]));
end;


//checks for next available spot
Function NextSpot: integer;
var
i, h:integer;
begin
Result := 1;
for i:=1 to 28 do
if not ExistsItem(i) then
begin
Result:= i;
exit;
end;
end;

//looks for a tree with SmartColors
//also autocolors if needed, if already autocolored the autocoloring function just exits
function FindTree(name:string): boolean;
begin
if not LoggedIn then exit;
AutoColorTree(name);
case lowercase(name) of
'normal', 'tree':
Result := SmartColorsCustom('normal', ['Tree'], AllTIA[0]);
'oak':
Result:=SmartColorsCustom('oak', ['Oak'], AllTIA[1]);
'willow':
Result:=SmartColorsCustom('willow', ['Willow'], AllTIA[2]);
'yew':
Result:=SmartColorsCustom('yew', ['Yew'], AllTIA[3]);
end;
end;


//waits until the tree is cut with various failsafes
procedure WaitUntilCut(name:string);
var
x, y, color, i, j, k, t, CheckSpot, CutMark:integer;
p:TPointArray;
Found : boolean;
TSA:TStringArray;
begin
if not LoggedIn then exit;
if MVPDebug then writeln('waiting until cut');
wait(10);
MarkTime(CutMark);
GetMousePos(x, y);
if FindEnt(x, y, False) then
begin
RunAwayEnt;
exit;
end;
wait(250);
NoRandoms;
wait(150);
MarkTime(t);
repeat
NoRandoms;
if not LoggedIn then break;
if InvFull then
begin
wait(10);
Exit; // Bank it?;
MarkTime(CutMark);
end;
TSA:=ChatsBlackText;
if not CheckAxe(TSA) then exit;
wait(300);
NoRandoms;
if (PosArray(['swing your axe'], TSA[7]))or
(PosArray(['swing your axe'], TSA[8]))or
(PosArray(['get some'], TSA[8]))then
begin
if MVPDebug then writeln('found TSA');
break;
end;

if (TimeFromMark(t) > 3000) then
begin
wait(100);
if MVPDebug then writeln('tree took too long');
Exit;
end;

until(false);
if MVPDebug then writeln('cutting tree');
GetMousePos(x, y); //let's keep our mouse over the tree now.
wait(100);
MarkTime(SpotMark);
CheckSpot := NextSpot;
repeat
if not LoggedIn then exit;
NoRandoms;
if InvFull then
begin
wait(50);
Exit; // Bank it?;
MarkTime(CutMark);
end;
if ExistsItem(CheckSpot) then
begin
CheckSpot := NextSpot;
wait(50);
MarkTime(SpotMark);
end;
if (TimeFromMark(SpotMark) > 30000) then
begin
wait(100);
if MVPDebug then
begin
writeln('i dont think were cutting, but we should be!')
writeln('lets try finding that tree again!');
end;
exit;
end;

if (name='tree') then
if (GetBlackChatMessage = 'You get some logs.') then
exit;
wait(50);
NoRandoms;
wait(50);
Found:=False;
if IsUpText('hop') then
begin
if FindEnt(x, y, False) then
begin
RunAwayEnt;
exit;
end;
Found := True;
wait(100);
end else
begin
if MVPDebug then writeln('tree seems to be gone..?');
NoRandoms;
GetMousePos(x, y);
//if looking for one trre then one color if looking for other tree then other color
i := Find[0].Colors[0];
FindColorsSpiralTolerance(x, y, p, i, x-5, y-5, x+5, y+5, 10);
j := High(p);
if j > 0 then
if j > 10 then j := 10;
for k:=0 to j do
begin
if (name='tree')and(GetBlackChatMessage = 'You get some logs.') then exit;
if ((abs(x-p[k].x))>2)or((abs(y-p[k].y))>2) then
MMouse(p[k].x, p[k].y, 0, 0);
wait(150);
Found := IsUpText('hop');
if Found then break;
wait(50);
end;
wait(100);
end;
if not LoggedIn then exit;
NoRandoms;
wait(150);
GetMousePos(x, y);
if FindEnt(x, y, False) then
begin
RunAwayEnt;
break;
end;
wait(150);
if InvFull then
begin
wait(100);
Exit; // Bank it?;
MarkTime(CutMark);
end;
if (TimeFromMark(CutMark) > 45000) then
begin
InactiveMove;
MarkTime(CutMark);
end;
until(not Found);
if MVPDebug then writeln('tree gone');
end;

//Grabs wc level and decides what is best to cut
Function WhatToCut: string;
begin
Players[CurrentPlayer].Level[20] := GetSkillLevel('woodcutting');

if Players[CurrentPlayer].Level[20]=0 then
begin
writeln('error detecting wc level');
Result:='tree';
exit;
end;

if InRange(Players[CurrentPlayer].Level[20], 1, 14) then
Result:= 'tree';
else if InRange(Players[CurrentPlayer].Level[20], 15, 59) then
Result:= 'oak';
else
Result:='yew';
//i don't think there are any willows in varrock, are there?
end;

//checks if we have everything needed for wcing. -> missing withdraw axe
procedure SetupWCing;
var AllGood:boolean;
begin
//check for axe, wc lvl etc
if not LoggedIn then exit;
repeat
FindNormalRandoms;
if not LoggedIn then
begin
Players[CurrentPlayer].Active := False;
exit;
end;
LoadsDone:=0;
Players[CurrentPlayer].Strings[0] := WhatToCut;
if FindAxe then
begin
if MVPDebug then writeln('Axe found');
wait(500+Random(1000));
SetAngle(True);
AllGood := True;
end else
//if not WithdrawAxe then NextPlayer(False);
NextPlayer(False);
until(AllGood);
GameTab(4);
end;

//everything needed to cut the trees.
procedure CutTrees;
var i:integer;
begin
NoRandoms;
if not (LoadsDone >= LoadsWanted) then
begin
repeat
if LoadsDone >= LoadsWanted then break;
if Not LoggedIn then Exit;
NoRandoms;
wait(Random(1000));
if InvFull then Exit; // Bank it?;
if LoadsDone >= LoadsWanted then break;
if FindTree(Players[CurrentPlayer].Strings[0]) then
begin
Players[CurrentPlayer].Integers[1] := 0;
i:=0;
NoRandoms;
GetToTree(Players[CurrentPlayer].Strings[0], True);
end else
begin
writeln('couldnt find tree');
wait(3000);
InactiveMove;
inc(i);
end;
if i >= 5 then
begin
NoRandoms;
writeln('pretty sure there are no damn trees around.');
LoadsDone := LoadsWanted + 1;
Inc(Players[CurrentPlayer].Integers[1]);
if Players[CurrentPlayer].Integers[1] >= 3 then
Players[CurrentPlayer].Active := False;
exit;
end;
NoRandoms;
until(False);
end;
end;



a few notes:


- autocolor
- many failsafes
- i call NoRandoms, which is a function that checked for FindNormalRandoms and FindFight, i'll leave it there until there's one in the MVP Folder.
- when the inv is full it exits CutTrees, left a "//bank it?" comment next to it.
- i use MVPDebug, not sure if it's gonna be in the whole MVP, but i think it would be useful to have a debug for such a huge script
- i have used SmartColorsCustom
- i have not yet a made a function that would get their level and decide what to cut - added
- i have made absolutely no walking
- if the axe is broken it logs out, but i left a comment there to withdraw new axe.
- there is my proggy function there but it is never called


SetupWCing;
for i:=0 to 3 do
begin
WalkToTrees;
CutTrees;
WalkToBank;
BankIt;
end;
That should be enough to do the whole wcing after i add in the withdrawing axe from bank and once the walking and the banking are done



i did not upload it to the svn or post it as a scar file cus i don't have access to either of them right now.

~RM

MylesMadness

2008-05-03 08:55:19

From: Mylesmadness
Do I get contributing member now for doing 90%(more like 50% if I have to do walking)? Anyways do you want me to do the walking or only the mining at the place?
Answer please so I can get working on that

ShowerThoughts

2008-05-03 09:10:33

Sorry, guys I have been on camp so did i missed anything? and what do I have to make?

bullzeye95

2008-05-03 13:27:30

From: Zytex!


Unfortunately, those are JPEGs, and they have color loss, which might mess him up a bit… But yeh, I'd be glad to help with the tree finder, if you want Special Ed. I've phailed in the past while trying to make a perfect one, but they have worked good.

ShowerThoughts

2008-05-03 13:43:22

I committed my HopenBank test it!
making a tree finder right now!

Edit: tree finder added if you vguys agree i only have to make a case for the colors and uptext for an all tree finder

bullzeye95

2008-05-03 14:23:55

Hermpie, I dug up one of my old attempts at a tree finder, and it works quite well. I'll commit mine later, and we can compare, ok? Also, I saw you did this:
If not CTS = 2 Then ColorToleranceSpeed(2);
That's actually saying if (not CTS) = 2 then. Say CTS is 1. It would be saying if -2 = 2 then ColorToleranceSpeed(2); To fix this, use parentheses, like this:
If not (CTS = 2) Then ColorToleranceSpeed(2);
:)

ShowerThoughts

2008-05-03 15:51:46

From: bullzeye95
Hermpie, I dug up one of my old attempts at a tree finder, and it works quite well. I'll commit mine later, and we can compare, ok? Also, I saw you did this:
If not CTS = 2 Then ColorToleranceSpeed(2);
That's actually saying if (not CTS) = 2 then. Say CTS is 1. It would be saying if -2 = 2 then ColorToleranceSpeed(2); To fix this, use parentheses, like this:
If not (CTS = 2) Then ColorToleranceSpeed(2);
:)


Your are just jealous :p I am using an template for all my find function and I always forget to take it out :S

EDIT: Which F*CKH**D did delete my stuff out there? it is not funny you f*cker i lost the file by myself to!!! Never delete a map or something because you f*cking delete my procedure you!!!!
Don't touch some1 else his stuff i am not just deleting the whole msi file to and then commit you sad *ss and even when you do tell it to me!

:(
Hermpie

bullzeye95

2008-05-03 16:23:06

That would be timer.

EDIT: And for future reference, you can revert it, save the file, update it, and commit it again.

Santa_Clause

2008-05-03 19:50:20

From: bullzeye95
That would be timer.

EDIT: And for future reference, you can revert it, save the file, update it, and commit it again.


Now why is Timer so immature?

Special Ed

2008-05-03 21:58:55

Myles, are asking me whether or not you should do the walking? If you're impatient to wait for an answer by all means go for it, I had just suggested talking to bullzeye about it since I knew he was working on walking as well.

Go ahead and work on the walking, if we end up finding a better way to do it then we'll update but if yours is good then why replace it, right?

Bobarkinator

2008-05-03 22:13:18

Hey, since I'm doing VWM, do I have to do the walking? (I hope not)

Special Ed

2008-05-03 22:19:29

From: Bobarkinator
Hey, since I'm doing VWM, do I have to do the walking? (I hope not)


Nope, just tell the people who are where you want them to walk to at VWM.

MylesMadness

2008-05-04 10:23:19

Yeah I suck at walking. So if someone wants to do vem walking please do it. Although, I could put my two new walking technics to use… But still walking people, work on it just put it on low priory.

ShowerThoughts

2008-05-04 11:23:05

0.o May I overreact one time to? What would you think about it could be a walking or something he always fucks me and i said to him on msn you did it and he said he didn't he is a liar.

But I will do it again

Gu3st...

2008-05-04 13:05:07

From: bullzeye95
Unfortunately, those are JPEGs, and they have color loss, which might mess him up a bit… But yeh, I'd be glad to help with the tree finder, if you want Special Ed. I've phailed in the past while trying to make a perfect one, but they have worked good.


Theyre JPEGs? i cant see any JPEG Compile…

Sir R. M8gic1an

2008-05-04 16:11:13

hey ed, i already pmed you a couple of days ago with my username, i finally have my computer back and have installed turtoise and am ready to get scripting again:)

at your service!

username: rasta_magician

~RM

Special Ed

2008-05-06 18:08:34

Ok, you've been added to the project! Sorry about the delay I've been having some computer issues so I didn't have time to add you to sourceforge.net

You can commit any / all work you've done now as well as any changes.

Macrosoft

2008-05-07 00:17:03

I really appreciate you taking over the leadership of this project. I may be able to return during summer if I get the time. Right now, my priority is school (okok, and a little bit of Xbox live)-oh yeah, and sleep, goodnight

I may be able to dig up the main loop I was working on. I could also MAYBE finish the auto-pather, then test and hope it will do something along the lines of its purpose (lol, pretty much a shot in the dark)

Thanks again Special Ed!

Sir R. M8gic1an

2008-05-07 01:50:09

thank you Ed :) added in many of my woodcutting functions, and a file called TreeTester, hopefully when you guys upload your tree finders we can compare them all on there.

~RM

Special Ed

2008-05-07 07:42:04

No problem Macro, I was worried for a while that you wouldn't be coming back! :p
This project is well underway, so at least we can thank you for the amazing idea. Goodluck with school and XBL, I hope to see you around some more!

@ Rasta- My TreeFinder is on halt right now since I've got tests the next two days at school and I'm helping bullzeye with this walking idea he's had. I may have some time to work on it today though.

Macrosoft

2008-05-07 23:54:22

kk, i found some main loop stuff. I made the mistake of not deleting prev versions of scar. Iv got so many versions to look through, its not even funny.

program VarrockPwner;
{.include SRL/SRL.scar}

var
x, y, a, b, i, c, p: integer; //only use x, y and p from this line, use of the other vars I have declared may cause an error
Action: array of string; //dont use
CurrentAction, s: string; //very important that you dont use!

procedure DeclarePayers; forward;

procedure SetUserNicks(Active: Boolean);
var
counter: integer;
n, a, x, NameLength: integer;
cName: array of char;
nName: array[0..2] of char;
begin
a:=GetArrayLength(Players);
for n:= 0 to a-1 do
begin
Counter:=2;
x:=0
NameLength:=Length(Players[n].Name);
SetArrayLength(cName, NameLength + 1);
repeat
begin
cName[Counter-1]:=StrGet(Players[n].Name, Counter);
if(cName[Counter-1] = ' ')then
begin
x:=0;
Counter:=Counter+1;
end else
begin
nName[x]:=cName[Counter-1];
x:=x+1;
end;
Counter:=Counter+1;
end;
until(Counter=NameLength + 2) or (x=3);
if(Counter=NameLength + 2)then
begin
writeln('Nickname can not be made from the username: ' + Players[n].Name);
if(Active=False) then
begin
writeln(Players[n].Name + ' is no longer active');
Players[n].Active:=False;
end;
end else
begin
Players[n].Nick:= nName[0] + nName[1] + nName[2];
writeln(Players[n].Name + ' s nickname has been set to: ' + Players[n].Nick);
end;
end;
end;

procedure DeclarePayers;
begin
HowManyPlayers := 4;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers); // set arraylength

Players[0].Name :='Username';
Players[0].Pass :='Password';
Players[0].Booleans[0] := True; //Mine Ess?
Players[0].Booleans[1] := True; //Chop Trees?
Players[0].Strings[0] := 'Best'; {Willows, Yews, Oaks, Normall,
or Best. Best will check your WC level everytime and chop the best
tree that you can}
Players[0].Booleans[2] := True; //Attack Dummy?
Players[0].Booleans[3] := True; //Mine Ores??
Players[0].Strings[1] := 'Best'; //Copper, Tin, Iron, or Best
Players[0].Booleans[4] := True; //Cook?
Players[0].Strings[2] := 'MineEss'; {What to start with. Mine,
MineEss, WC, Dummy, Cook}
Players[0].Active:=True;

Players[1].Name :='Username';
Players[1].Pass :='Password';
Players[1].Booleans[0] := True;
Players[1].Booleans[1] := True;
Players[1].Strings[0] := 'Best';
Players[1].Booleans[2] := True;
Players[1].Booleans[3] := True;
Players[1].Strings[1] := 'Best';
Players[1].Booleans[4] := True;
Players[1].Strings[2] := 'MineEss';
Players[1].Active:=True;

Players[2].Name :='Username';
Players[2].Pass :='Password';
Players[2].Booleans[0] := True;
Players[2].Booleans[1] := True;
Players[2].Strings[0] := 'Best';
Players[2].Booleans[2] := True;
Players[2].Booleans[3] := True;
Players[2].Strings[1] := 'Best';
Players[2].Booleans[4] := True;
Players[2].Strings[2] := 'MineEss';
Players[2].Active:=True;

Players[3].Name :='Username';
Players[3].Pass :='Password';
Players[3].Booleans[0] := True;
Players[3].Booleans[1] := True;
Players[3].Strings[0] := 'Best';
Players[3].Booleans[2] := True;
Players[3].Booleans[3] := True;
Players[3].Strings[1] := 'Best';
Players[3].Booleans[4] := True;
Players[3].Strings[2] := 'MineEss';
Players[3].Active:=True;

SetUserNicks(True);
end;

procedure ClearVars;
begin
CurrentPlayer:=0;
i:=0;
a:=0;
b:=0;
end;

procedure SetActions;
begin
repeat
begin
for c:=0 to 4 do
begin
if(Players[CurrentPlayer].Booleans[C])then b:=b+1;
end;
if(b=0)then
begin
WriteLn('You cant have your player do nothing!');
Players[CurrentPlayer].Active := False;
repeat
begin
CurrentPlayer := CurrentPlayer + 1;
end;
until(Players[CurrentPlayer].Active=True);
end;
end;
until(not(b=0)) or (CurrentPlayer > HowManyPlayers);
if(CurrentPlayer > HowManyPlayers) then
begin
WriteLn('None of your players are set to do anything!');
WriteLn('Terminating Script');
TerminateScript;
end;
SetArrayLength(Action, 10);
b:=0;
if(Players[CurrentPlayer].Booleans[0])then
begin
Action[b]:='MineEss';
b:=b+1;
end;
if(Players[CurrentPlayer].Booleans[1])then
begin
Action[b]:='WC';
b:=b+1;
end;
if(Players[CurrentPlayer].Booleans[2])then
begin
Action[b]:='Dummy';
b:=b+1;
end;
if(Players[CurrentPlayer].Booleans[3])then
begin
Action[b]:='Mine';
b:=b+1;
end;
if(Players[CurrentPlayer].Booleans[4])then
begin
Action[b]:='Cook';
b:=b+1;
end;
repeat
begin
Action[b]:='Current';
b:=b+1;
end;
until(b = 10);
end;

function HandleActions: string; //returns next action in a way that will group actions
begin
if(i=0)then
begin
CurrentAction := Players[CurrentPlayer].Strings[2];
a:=a+1; //keep track of how many times it has repeated same thing
end else
begin
if(a > 4) then
begin
c:= Random(10);
if(not(Action[c]='Current'))then
begin
CurrentAction:=Action[c];
a:=1;
end;
end else a:=a+1;
end;
i:=i+1; //tells us how many times it has done any action (increases by 1)
Result:=CurrentAction; {DO NOT REPLACE ANYTHING WITH RESULT TO MINIMIZE
THE AMOUNT OF THE VARS, I USE PARRALLEL VARS TO CHECK WHAT THE SCRIPT
HAS DONE PREVIOUSLY}
end;

begin
SetupSRL;
ClearVars;
DeclarePayers;
SetActions;
for p:=0 to 50 do
begin
s:=HandleActions;
WriteLn(s);
end;
end.

not sure what I was doin with this but it returns this:

Username s nickname has been set to: ser
Username s nickname has been set to: ser
Username s nickname has been set to: ser
Username s nickname has been set to: ser
MineEss
MineEss
MineEss
MineEss
MineEss
WC
WC
WC
WC
WC
WC
Cook
Cook
Cook
Cook
Cook
Cook
Cook
Dummy
Dummy
Dummy
Dummy
Dummy
WC
WC
WC
WC
WC
Cook
Cook
Cook
Cook
Cook
Cook
Cook
Dummy
Dummy
Dummy
Dummy
Dummy
Dummy
Dummy
MineEss
MineEss
MineEss
MineEss
MineEss
MineEss
MineEss
Mine
Mine


I guess it sets the nicks and then humanly groups activities??

ShowerThoughts

2008-05-08 05:36:48

Macrosoft use +#39+'s has been set…..'
#39 is an ' ;)

ZephyrsFury

2008-05-08 06:28:41

From: Hermpie
Macrosoft use +#39+'s has been set…..'
#39 is an ' ;)


or just use a '' where you want a '.


Writeln('Username''s Nickname has been set to...');

ShowerThoughts

2008-05-08 07:02:31

then it will be username s that looks ugly ;)

Wizzup?

2008-05-08 07:16:13

Successfully compiled (111 ms)
Username's Nickname has been set to...
Successfully executed

MylesMadness

2008-05-08 18:59:52

Who wants me to make an auto updater for this?

Edit:I finished it, its under "Miscellaneous"

Macrosoft

2008-05-08 20:15:04

oh, cool thanks lol

sometimes I wonder how ppl learn this stuff (or maybe im just too lazy to look it up)

Special Ed

2008-05-08 20:23:37

So Macrosoft does this mean you're back for now? Or do you just have some free time at the moment?

@ Myles - Where should we host the script? Also how to we keep it private?

@ Wizzup - That was random… and kind of… un-needed. :p Are you planning on contributing to MSI Wizz? You had said you wanted to if you had time but I haven't heard anything else since then.

Macrosoft

2008-05-08 20:31:17

I back in forums, but scripting will have to wait until i have enough time. I the kind of person who once they start scripting, they continue on for another 5 hours (even if that means past midnight lol). The problem is starting when you know it means sacrificing 5 hours….

When summer comes, I will be fully back

MylesMadness

2008-05-08 20:39:37

You could keep it private by making it connect to a php page, having a auth their(Although signing up to use this would be retarded) and if they get it right will give them the code. I could do it if it was really needed

Special Ed

2008-05-08 21:18:17

It's just that if someone were to leak the update page the script would be exposed to the entire SRL Community pretty quickly. I think it should require an authentication… IMO, but since I'm not making the authenticating it's not really up to me.

MylesMadness

2008-05-08 21:37:19

So I should start making it. Should we make one pass or many, if we want many someone needs to help me.

Edit:I "finished"(depends if we want many usernames and passwords or not) it

Editedit:600th post

Sir R. M8gic1an

2008-05-09 02:34:52

actually a better idea would be to not auto update, but just check for the version of the script and if it's outdated tell the user to download the new version himself and terminate script. it's safer.

- i think i'll go add a lil more work to MSI. i'll probably add a file called core with a few basic needed procedures like antiban and anti randoms.

edit: decided to add a progress report instead, it has 3 functions: SetupProggy, AddToProggy and ProgressReport.

SetupProggy is just to setup some needed vars. AddToProggy('SkillHere', Amount) will add to the vars. ProgressReport will print everything out.

here's a lil test (just the mainloop, if you wanna see the functions open up the file)

begin
ClearDebug;
SetupProggy;
AddToProggy('woodcut', 73);
AddtoProggy('wc', 30);
AddToProggy('clay', 15);
ProgressReport;
end.

From: ProgressReport

skill does not exist. check spelling - wc
[============== M.V.P. ==============]
[ Total Loads: 2
[ TimeRunning
[============== M.V.P. ==============]
Nick, Active, wc - mine - fletch - ess - clay - fight - fire - cook - respond
Mynick, true, 73 - 0 - 0 - 0 - 15 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -
Mynick, true, 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 -


nick and active i gave them a default value, didn't feel like setting up the whole player stuff just for a lil test. AddToProggy will always add it to the CurrentPlayer.

It's in the miscellaneous folder if you wanna have a look

~RM

ShowerThoughts

2008-05-09 04:18:13

From: Wizzup?
Successfully compiled (111 ms)
Username's Nickname has been set to...
Successfully executed


Obvious you set it between scar tags in the debug it would be an ' and no purple

From: Rasta Magician
actually a better idea would be to not auto update, but just check for the version of the script and if it's outdated tell the user to download the new version himself and terminate script. it's safer.

- i think i'll go add a lil more work to MSI. i'll probably add a file called core with a few basic needed procedures like antiban and anti randoms.

edit: decided to add a progress report instead, it has 3 functions: SetupProggy, AddToProggy and ProgressReport.

SetupProggy is just to setup some needed vars. AddToProggy('SkillHere', Amount) will add to the vars. ProgressReport will print everything out.

here's a lil test (just the mainloop, if you wanna see the functions open up the file)


i don't see clay = 30 somewhere

Sir R. M8gic1an

2008-05-09 04:29:03


AddToProggy('clay', 15);

/////////////////////////////////
Nick, Active, wc - mine - fletch - ess - clay - fight - fire - cook - respond
Mynick, true, 73 - 0 - 0 - 0 - 15 - 0 - 0 - 0 - 0 -


i'm glad you don't, but i hope you see clay = 15.

~RM

MylesMadness

2008-05-09 07:20:36

I think I will keep doing it in case I want to do this is the future. But when I get home I will make the version checker thingy.

Edit: I just tested this, And when you do this its all in one line. Unless someone can make something that wraps each line is Echo('line crap here')

Gu3st...

2008-05-12 03:17:05

Is there anything I can do?

ShowerThoughts

2008-05-12 05:26:25

From: Rasta Magician
i'm glad you don't, but i hope you see clay = 15.

~RM


LOL typo i meant AddtoProggy('wc', 30); i pretty sure this is the same as woodcutting but you set it to 73 then you set it to 30 with this but i see 73 or something.

Can i do anything im bored.

Dudes do you want to use my
Hwithdraw(theDtm:integer; howmany:integer);
HDeposit(theDtm:integer; howmany:integer;);

just typed this but the parameters are the dtm and the amount

Hwitdraw(CookedTrout,14);
it wqill auto caculate what it has to do.

Special Ed

2008-05-12 07:45:37

@ Zytex! - If you'd like to work on the main control you're more than welcome to start piecing things together and what-not. I was planning on doing this but I've been really busy so I haven't had the time to, and I'm sure people want to keep this project moving so go right ahead.

Just work at creating the main control part of the script as well as moving the separate functions and procedures to a central .scar file. Note anything we need to make or fix.

@ Hermpie - Have you done bankfinding / opening as well? If that hasn't been done I'd work on that. Also if you'd want to work on a general store finder and a function that will sell "x" of "dtm" to the general store.

Sir R. M8gic1an

2008-05-12 11:13:13

hermpie, the proggy only accepts ('woodcutting'), it doesnt accept ('wc'), which is why it came out the way it did :) (it was predicted, i was making sure it wouldn't give some error because of wrong string; it writelns that the string is not a valid one)

i guess we basically do whatever we feel like doing, right Ed?

~RM

Special Ed

2008-05-12 22:54:56

@ Hermpie - I don't like the fact that you assume that when I say I'm busy I'm really just being lazy. I've got a wide net of contacts along with a business to co-manage, I can't devote all my SRL right now until I finish some projects with that. Not to mention I'm done with school in 2 weeks so I've got finals.

If you're going to assume something at least have it based on fact.

@ Rasta - Yes you can do whatever you feel like. If you'd like me to assign tasks to keep it organized I will but IMO if people work on what they enjoy they will tend to do a better job.

If you can't find anything to work on specifically, review the code that people have made and see if you can improve / change it to make it better.

the scar noob

2008-05-13 13:49:50

This can sound very stupid etec, but can someone plz tell me what's going on here and what we've already got?:p

I just can't take any information from the previous pages, it's just a chaos=D

Thanks in advance,

-Tsn.

ShowerThoughts

2008-05-13 14:42:05

From: Special Ed
@ Hermpie - I don't like the fact that you assume that when I say I'm busy I'm really just being lazy. I've got a wide net of contacts along with a business to co-manage, I can't devote all my SRL right now until I finish some projects with that. Not to mention I'm done with school in 2 weeks so I've got finals.


You are way to serious i forgot sarcasm tags :p

and dude do you like it or not?

Special Ed

2008-05-13 17:55:04

@ Hermpie - Ehhh… I am pretty serious at most times, but I really didn't see the sarcasm in that. Ya, like I said before I don't have a lot of free time right now, but from what I've seen it looks good. I haven't done any testing yet though.

@ TSN - Ummm… Lemme make you a list.

  • Auto-Responding is set up but needs to be developed more (Adding Phrases and What-not).
  • Clay Softener needs work and testing.
  • Banking, Withdrawing / Depositing / Opening / Finding.
  • Cooking needs to be expanded and tested.
  • Fishing needs to be expanded and tested.
  • Guard Finding / Fighting. Needs more fighting options and checks. There are a couple of guard finders / fighters, we need to find / make the best one and test it.
  • Firemaking needs updating and testing.
  • VWM and VEM both need work.
  • Tree Finding and Woodcutting.

We need someone to go and organize all this. I think I've got some time tonight I'll work on that for now.

NiCbaZ

2008-05-13 18:14:53

i would like to join what can i do?

EDIT: sorry il do the thing you said to do on first post tonight

MylesMadness

2008-05-13 19:27:21

Do you mean like rock finding or walking, because imho I think finding is done

NiCbaZ

2008-05-13 19:48:34

Damn im at school and carnt sign up site blocked >,<

Macrosoft

2008-05-13 21:31:15

From: Special Ed
@ Hermpie - Ehhh… I am pretty serious at most times, but I really didn't see the sarcasm in that. Ya, like I said before I don't have a lot of free time right now, but from what I've seen it looks good. I haven't done any testing yet though.

@ TSN - Ummm… Lemme make you a list.

  • Auto-Responding is set up but needs to be developed more (Adding Phrases and What-not).
  • Clay Softener needs work and testing.
  • Banking, Withdrawing / Depositing / Opening / Finding.
  • Cooking needs to be expanded and tested.
  • Fishing needs to be expanded and tested.
  • Guard Finding / Fighting. Needs more fighting options and checks. There are a couple of guard finders / fighters, we need to find / make the best one and test it.
  • Firemaking needs updating and testing.
  • VWM and VEM both need work.
  • Tree Finding and Woodcutting.

We need someone to go and organize all this. I think I've got some time tonight I'll work on that for now.


Ill help with organizing, but this may need to wait until summer

Anyone working on the organizing can use the procedures i posted already.

Sir R. M8gic1an

2008-05-14 02:03:47

and as far as i remember there's no walking yet…

~RM

NiCbaZ

2008-05-14 02:17:14

i can do walking if you want??

ZephyrsFury

2008-05-14 04:20:41

Bullzeye and I are supposed to do walking. But I'm a bit busy atm. Not sure how far Bullz has gotten with it.

NiCbaZ

2008-05-14 04:42:56

ok il talk to bullz on msn and you also to see wht you guys have done and what you want me to do :)

the scar noob

2008-05-14 15:08:15

From: Special Ed
@ Hermpie - Ehhh… I am pretty serious at most times, but I really didn't see the sarcasm in that. Ya, like I said before I don't have a lot of free time right now, but from what I've seen it looks good. I haven't done any testing yet though.

@ TSN - Ummm… Lemme make you a list.

  • Auto-Responding is set up but needs to be developed more (Adding Phrases and What-not).
  • Clay Softener needs work and testing.
  • Banking, Withdrawing / Depositing / Opening / Finding.
  • Cooking needs to be expanded and tested.
  • Fishing needs to be expanded and tested.
  • Guard Finding / Fighting. Needs more fighting options and checks. There are a couple of guard finders / fighters, we need to find / make the best one and test it.
  • Firemaking needs updating and testing.
  • VWM and VEM both need work.
  • Tree Finding and Woodcutting.

We need someone to go and organize all this. I think I've got some time tonight I'll work on that for now.


Thank you for the information Ed.
To bad I have to prepare for exams pretty soon:(

-Tsn.

Gu3st...

2008-05-14 15:21:48

@ Special Ed - I didn't understand what you meant, if I could do something else that would be fine :)

bullzeye95

2008-05-15 17:22:18

@zephyr and nicbaz, it was me and Special Ed doing it, unless you wanted to try to develop your idea, zephyr. We had special ideas.

Special Ed

2008-05-15 17:39:54

Ummm… if you'd want to work on VEM and VWM that would be good. We need a solid mining routine for each of those places. Don't worry a lot about rock finding but everything else involved in mining I'd like you to do if you're up to it.

@Bullzeye- We need to finish that…

MylesMadness

2008-05-15 18:13:04

The mining routine is done for VEM…

FakeEdit:Okay, Who the fuck got rid of our entire work…
RealEdit:Special… yeah why did you do that…

Special Ed

2008-05-15 19:27:44

From: Mylesmadness
The mining routine is done for VEM…

FakeEdit:Okay, Who the fuck got rid of our entire work…
RealEdit:Special… yeah why did you do that…


First of all it's not finished being organized… Second of all it needs organization there are just random procedures and functions randomly put in random places throughout the SvN. If you want it put back to the way it was I'll do that but some one needs to go through and organize it… there so much useless stuff and duplicated functions and procedures.

NiCbaZ

2008-05-15 22:19:59

Ok ive been working on some stuff, why not make a folder called "dump" or something then people can through and sort it all out beaause i dont know wats been down ect….

Sir R. M8gic1an

2008-05-16 02:35:43


/////
8:30 AM GMT+ 1
Rasta Magician:

– Uploaded Core.scar, which includes srl and all the current files available, also calls
SetupSRL;

– Made Misc.scar look pretty (SRL Style)

– Added Proggy.scar ( which i also made pretty )

– In AntiBan.scar changed Zephyrs Procedure from
procedure AntiBanProc; to procedure AntiBanProc(AntiBanPercent:Integer); so that each
part of the script can use a different rate if they want.
///


and made a text file called Log, thought it might be useful to record changes.

~RM

ZephyrsFury

2008-05-16 04:24:30

From: bullzeye95
@zephyr and nicbaz, it was me and Special Ed doing it, unless you wanted to try to develop your idea, zephyr. We had special ideas.


Hmm ok, well me idea was too unreliable. I'll leave it to you :). Contact me if you need any help.

MylesMadness

2008-05-16 15:55:34

From: Special Ed
First of all it's not finished being organized… Second of all it needs organization there are just random procedures and functions randomly put in random places throughout the SvN. If you want it put back to the way it was I'll do that but some one needs to go through and organize it… there so much useless stuff and duplicated functions and procedures.
Vem more or less was done so could you put that back?

bullzeye95

2008-05-16 15:59:38

Myles, you can just revert to a different revision, copy all the stuff you want, update to the latest, put it back in, and commit.

MylesMadness

2008-05-16 17:35:05

I think I screwed up… crap I knew I shouldn't have messed with that

Special Ed

2008-05-16 22:13:25

I never saw anything for VEM in there… are you sure you committed it? Logs are always useful! I was hoping people would post what changes they made here as well, we can do both now if it becomes a problem.

Ashur2Good

2008-05-16 22:37:10

Can i still join in this project? or do you have enough members?

Just asking, since it seems fun :D

-Ashur

Bobarkinator

2008-05-16 23:00:16

Woah now, I'm working on VWM, haven't committed yet though

Sir R. M8gic1an

2008-05-17 02:32:02

what the hell?! MVP folder is empty?!

~RM

the scar noob

2008-05-17 08:00:34

From: Ashur2Good
Can i still join in this project? or do you have enough members?

Just asking, since it seems fun :D

-Ashur


All help is appreciated:)

-Tsn.

ShowerThoughts

2008-05-17 08:14:56

Hey, guys sorry i was less active, but i made this:
Function XDTM(DTM, HowMany:Integer; Text, Where:string):Boolean;
Var
Option, Items :string;
Begin
Case LowerCase(Where) of
'ms','bank': Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
'mi','inv' : Result:= FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2);
'mc','chat': Result:= FindDTM(DTM, X, Y, MCX1, MCY1, MCX2, MCY2);
else
Writeln(Where + ' is not allowed to use, mi, ms, mc, bank, inv, chat. Thank You.');
End;
If Result And (HowMany = 0) Then Result:=True;
If Result And (HowMany = 0) Then Exit;
If Result Then
Begin
MMouse(X, Y, 5, 5);
Wait(10+random(30));
If IsUptext(text) Then
Begin
GetMousePos(X,Y);
Mouse(X, Y, 0, 0, False);
Wait(10+random(30));
end else
Result:= False;
If Not Result Then Exit;
Case HowMany Of
2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27:Option:= 'X';
1:Option:= '1';
5:Option:= '5';
10:Option:= '10';
28:Option:= 'll';
End;
If HowMany > 28 Then Option:='ll';
Result:=ChooseOption(Option)
If Option='X' Then Wait(750+random(500));//Add A Detection For The How Many X Screen.
If Option='X' Then TypeSend(IntToStr(HowMany));
End;
FreeDTM(DTM);
End;

Begin
SetUpSRL;
XDTM(DTM,12,'izza','bank');
End.


XDTM(DTM,12,'izza','bank');
You fill in the dtm then how many you want to 'X'
Note: if you fill in 0 it will result if the dtm is found :)
then you fill in the uptext and you fill in where:
'ms','bank' <– Mainscreen, bank
XDTM(DTM,12,'izza','bank');
'mi','inv' <– inventory
'mc','chat' <– Chatscreen

MylesMadness

2008-05-17 09:29:19

From: Rasta Magician
what the hell?! MVP folder is empty?!

~RM


From: Special Ed
First of all it's not finished being organized… Second of all it needs organization there are just random procedures and functions randomly put in random places throughout the SvN. If you want it put back to the way it was I'll do that but some one needs to go through and organize it… there so much useless stuff and duplicated functions and procedures.
.

Special Ed

2008-05-17 12:10:47

The MVP folder shouldn't be empty, I still have all the files in mine. Are all your folders empty? Because if they are I should probably fix that…

ShowerThoughts

2008-05-17 12:14:09

From: Hermpie
Hey, guys sorry i was less active, but i made this:
Function XDTM(DTM, HowMany:Integer; Text, Where:string):Boolean;
Var
Option, Items :string;
Begin
Case LowerCase(Where) of
'ms','bank': Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
'mi','inv' : Result:= FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2);
'mc','chat': Result:= FindDTM(DTM, X, Y, MCX1, MCY1, MCX2, MCY2);
else
Writeln(Where + ' is not allowed to use, mi, ms, mc, bank, inv, chat. Thank You.');
End;
If Result And (HowMany = 0) Then Result:=True;
If Result And (HowMany = 0) Then Exit;
If Result Then
Begin
MMouse(X, Y, 5, 5);
Wait(10+random(30));
If IsUptext(text) Then
Begin
GetMousePos(X,Y);
Mouse(X, Y, 0, 0, False);
Wait(10+random(30));
end else
Result:= False;
If Not Result Then Exit;
Case HowMany Of
2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27:Option:= 'X';
1:Option:= '1';
5:Option:= '5';
10:Option:= '10';
28:Option:= 'll';
End;
If HowMany > 28 Then Option:='ll';
Result:=ChooseOption(Option)
If Option='X' Then Wait(750+random(500));//Add A Detection For The How Many X Screen.
If Option='X' Then TypeSend(IntToStr(HowMany));
End;
FreeDTM(DTM);
End;

Begin
SetUpSRL;
XDTM(DTM,12,'izza','bank');
End.


XDTM(DTM,12,'izza','bank');
You fill in the dtm then how many you want to 'X'
Note: if you fill in 0 it will result if the dtm is found :)
then you fill in the uptext and you fill in where:
'ms','bank' <– Mainscreen, bank
XDTM(DTM,12,'izza','bank');
'mi','inv' <– inventory
'mc','chat' <– Chatscreen


Still no one tested it or EVEN said good job :(
I will add it to MVP file

Special Ed

2008-05-17 13:15:12

Good Job Hermpie although why would you find an item in your chat window, and I doubt anyone would use DTM's for object finding on the MS.


function XDTM(DTM, HowMany: Integer; Text: string):Boolean;
var
Option, Items: string;
begin
Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
if Result then
begin
if(HowMany = 0)then
begin
Result:= True;
Exit;
end;
MMouse(X, Y, 5, 5);
Wait(10 + Random(30));
if IsUptext(Text) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(10 + Random(30));
end else
begin
Result:= False;
Exit;
end;
case HowMany of
2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27:Option:= 'X';
1:Option:= '1';
5:Option:= '5';
10:Option:= '10';
28:Option:= 'll';
end;
Result:= ChooseOption(Option)
if(Option = 'X')then
begin
Wait(750 + Random(500));//Add A Detection For The How Many X Screen.
TypeSend(IntToStr(HowMany));
end;
end;
FreeDTM(DTM);
end;

I made couple of changes… but I haven't tested it yet.

ShowerThoughts

2008-05-17 14:22:57

From: Special Ed
Good Job Hermpie although why would you find an item in your chat window, and I doubt anyone would use DTM's for object finding on the MS.


function XDTM(DTM, HowMany: Integer; Text: string):Boolean;
var
Option, Items: string;
begin
Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
if Result then
begin
if(HowMany = 0)then
begin
Result:= True;
Exit;
end;
MMouse(X, Y, 5, 5);
Wait(10 + Random(30));
if IsUptext(Text) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(10 + Random(30));
end else
begin
Result:= False;
Exit;
end;
case HowMany of
2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27:Option:= 'X';
1:Option:= '1';
5:Option:= '5';
10:Option:= '10';
28:Option:= 'll';
end;
Result:= ChooseOption(Option)
if(Option = 'X')then
begin
Wait(750 + Random(500));//Add A Detection For The How Many X Screen.
TypeSend(IntToStr(HowMany));
end;
end;
FreeDTM(DTM);
end;

I made couple of changes… but I haven't tested it yet.


never made soft clay? or cooked something i could use an dtm to detect if that screen is there or if you want to right click and do all and I always use dtms in banking i never use withdraw the function in srl..

I don't agreed with that, but that failsafe u added is okay.

Nava2

2008-05-17 14:25:52

I'm working on a varrock west smither, want me to use it for this project? :)

Assuming you want/allow me to help :P

Nava2

bullzeye95

2008-05-17 14:27:35

Special Ed, never free a passed DTM. That could screw a script up.
function XDTM(DTM, HowMany: Integer; Text: string):Boolean;
var
Option, Items: string;
begin
Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
if Result then
begin
if(HowMany = 0)then
exit;
MMouse(X, Y, 5, 5);
Wait(10 + Random(30));
if IsUptext(Text) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(10 + Random(30));
end else
begin
Result:= False;
Exit;
end;
case HowMany of
1, 5, 10:Option:= IntToStr(HowMany);
28:Option:= 'll';
else Option:= 'X';
end;
Result:= ChooseOption(Option)
if(Option = 'X')then
begin
Wait(750 + Random(500));//Add A Detection For The How Many X Screen.
TypeSend(IntToStr(HowMany));
end;
end;
end;
Fixt and shortened.

EDIT: Also, I have some smithing/smelting/random stuff that we could use from the MSI competition. Remind me to show you later.

EDIT2: Didn't realize that was yours Hermpie. The reason you shouldn't release a passed DTM is because if you do, that DTM that was passed will never be able to be used again in the script unless it is redeclared.

Nava2

2008-05-17 14:31:32

From: bullzeye95
Special Ed, never free a passed DTM. That could screw a script up.
function XDTM(DTM, HowMany: Integer; Text: string):Boolean;
var
Option, Items: string;
begin
Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
if Result then
begin
if(HowMany = 0)then
exit;
MMouse(X, Y, 5, 5);
Wait(10 + Random(30));
if IsUptext(Text) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(10 + Random(30));
end else
begin
Result:= False;
Exit;
end;
case HowMany of
1, 5, 10:Option:= IntToStr(HowMany);
28:Option:= 'll';
else Option:= 'X';
end;
Result:= ChooseOption(Option)
if(Option = 'X')then
begin
Wait(750 + Random(500));//Add A Detection For The How Many X Screen.
TypeSend(IntToStr(HowMany));
end;
end;
end;
Fixt and shortened.

EDIT: Also, I have some smithing/smelting/random stuff that we could use from the MSI competition. Remind me to show you later.


Me? :D

I have to redo my procedures but yeah..

Nava2

bullzeye95

2008-05-17 14:32:34

Oh, actually that was to Special Ed, sorry You posted while I was writing.

ShowerThoughts

2008-05-17 14:34:00

Dudes add that if not uptext failsafe to my old one and then put it in MVP and take FreeDTM out if you like to..

MylesMadness

2008-05-17 19:13:42

psst special. I fucked up and removed everything from the mvp file trying to add VEM back. Fix pl0x

Nava2

2008-05-17 23:40:48

From: Mylesmadness
psst special. I fucked up and removed everything from the mvp file trying to add VEM back. Fix pl0x


Noob:D someone must have it backed up, no worries.

Nava2

Santa_Clause

2008-05-18 07:18:05

function XDTM(DTM, HowMany: Integer; Text: string):Boolean;
var
Option, Items: string;
begin
Result:= FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
if not(Result) or not(HowMany <= 0) then
Exit;
MMouse(X, Y, 5, 5);
Wait(10 + Random(30));
if IsUptext(Text) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(10 + Random(30));
end else
begin
Result:= False;
Exit;
end;
case HowMany of
1, 5, 10:Option:= IntToStr(HowMany);
28:Option:= 'll';
else
Option:= 'X';
end;
Result:= ChooseOption(Option)
if(Option = 'X')then
begin
Wait(750 + Random(500));//Add A Detection For The How Many X Screen.
TypeSend(IntToStr(HowMany));
end;
end;

Special Ed

2008-05-18 11:25:04

Ok, I reverted the SvN back to before I organized it. So anything you submitted after then please re-submit.

Make sure you update before you commit or else you will overwrite the revert.

Sorry for all the problems this has caused.

Gu3st...

2008-05-18 16:31:02

What can i do?

ShowerThoughts

2008-05-18 16:32:23

From: Zytex!
What can i do?


Same.

Special Ed

2008-05-19 15:41:59

You can put anything you added after the screw-up back in. If you'd like to work on making a procedure that will fight guards and pick up items until it has a full inventory we need that.

You can work on a woodcutting procedure that will cut logs depending on your WC level. I think there are some tree-finders in the SvN or at least there were.

The main control script, or the core script needs to be developed or at least mapped out. Someone was working on that but it got lost in the reversion so if someone could re-add that back that would be quite helpful.

Really you can work on anything that you can do in varrock, you can even do tweaking and editing of procedures if you want to make them better.

Sir R. M8gic1an

2008-05-19 17:18:22

re-added wc.scar (has many functions in it already, just needs slight update) and core.scar

~RM

ShowerThoughts

2008-05-21 16:19:24

Bump, I think i could add all my banking functions, but my banking function use a diff way of loading the dtm in that procedure set the name you give it, bla bla bla
so i can add like 8 banking stuffs like
WalkBank;
HOpenBank;
IsOpenBank;
HWitdraw;
HDeposit;
XDTM;

and more…

Timer

2008-06-04 23:11:28

I backed up about 1 rev before it crashed… uploading.

(uploading whats missing)

Special Ed

2008-06-06 11:53:15

Hey it's summer now for me guys so I'll be back on the forum and working again! So hopefully everyone else is on summer vacation or will be soon so we can finally finish this thing up!

There's not really a lot to be done until be can start organizing the pieces into a script so if anyone wants to work on that, please do so any save it as a separate file (leaving the originals) so that we can get a couple of people working on this.

ShowerThoughts

2008-06-06 11:54:40

From: Special Ed
Hey it's summer now for me guys so I'll be back on the forum and working again! So hopefully everyone else is on summer vacation or will be soon so we can finally finish this thing up!

There's not really a lot to be done until be can start organizing the pieces into a script so if anyone wants to work on that, please do so any save it as a separate file (leaving the originals) so that we can get a couple of people working on this.

like 4 weeks left for me :(

MylesMadness

2008-06-06 15:20:39

3 weeks…

Macrosoft

2008-06-07 15:41:33

2 weeks left baby. But in between is many finals and projects…

So close, yet so far away :(

the scar noob

2008-07-22 16:59:11

Close this thread? It became prett inactive, I prefer opening another thread about this project (if the others are willing to work on it;)) and start from scratch (all the code in this thread are outdated anyway:)):p

-Tsn.

MylesMadness

2008-07-23 15:23:37

I think everyone will say no as EVERY TIME somebody we'll finish it it never does

Macrosoft

2008-07-24 21:57:00

Special Ed has left. I am here to reclaim the throne muahaha.

yes new thread is prob needed

P1nky

2008-07-29 21:01:59

ye hes been busy with rl thats cool tho :)