SRL Archive - First Scripts

ChaosBone


psyonity

2012-04-16 04:56:29

ChaosBone
It's simple, I've seen it before, but… I needed something simple to start with…

It collects the bones at the chaos altar in the wilderness and after inventory full, it buries them. Because it is in the wilderness it also checks for nearby players and if found it switches world (works, but can be better…)

Features
  • Simple Antiban (some idea's?)
  • When stuck, move to first red dot on minimap (sometimes walks too far away from the altar, trying to fix now…)
  • Simple PK protection (tested, works great!)
  • SRL Stats Support

The proggy is simple, and inaccurate but it some sort of works…
And for the existing one, Sorry, I didn't know and haven't looked at your source.

There is still a problem with my bone finder (or maybe srl, can't figure out where, I never use a value below zero and none is calculated…) , sometimes it spams your debug box, sorry
the error is:
Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.

I've tried to Improve the code, removed ALL try except finally and sorted the code out, and did some other tweaks…

And here you have my one proggy:


~~ChaosBone by Psyonity~~
Time running: 8443
Loads done: 24
Bones Collected: 911
Bones Burried: 678
EXP Gained: 3051
EXP Hour: 1300
~~ChaosBone by Psyonity~~

At the end it walked wrong and got stuck, working on that now…

begginer

2012-04-16 08:01:09

Congratz on your first script.

psyonity

2012-04-16 08:31:11

From: begginer
Congratz on your first script.


Thanks!

JuKKa

2012-04-16 08:31:26

theres alot of improvements to be made.

first:

procedure GotoAltarIcon;
var
Xe ,Ye: Integer;
begin
if FindSymbol(Xe,Ye,'altar') then
begin
getmousepos(xe, ye); //REMOVE THIS?? you will never click the symbol.
Mouse(Xe,Ye,4 ,4 ,true);
//add some Flag or FFlag(X) to wait for the "runescape flag" to dissapear.
end;
end;


procedure BuryBones;
var
invItems: TInvenItemArr;
i :Integer;
begin
try
invItems := GetInventoryArray();
for i := 0 to 28 do
begin
Mouse(invItems[i].centerPoint.x, invItems[i].centerPoint.y, 2, 2, true);


end;

except
finally
begin
BonesBurried:=BonesBurried + 28-InvCount;
EXPGained:=BonesBurried/2*9;
LoadsDone:=BonesBurried/28;
Proggy;
end;
end;
end;
here you should only do 0 to 27; because you only have 28 inventory spots. 0..28 = 29 thus you will get the runtime error, after that u can remove the try except finally. Also add a "Wait" after the Mouse click to make it more humanlike.


secondd: you have alot of try except & finally… why? Why not work out the bugs so u dont need them?

thirdly: i HIGHLY recommend that you read a tutorial on scripting standards. Your code is all over the place.

Anways good job on your first script, although there are alot of improvement that could be done.

psyonity

2012-04-16 08:36:39

From: JuKKa
theres alot of improvements to be made.

first:

procedure GotoAltarIcon;
var
Xe ,Ye: Integer;
begin
if FindSymbol(Xe,Ye,'altar') then
begin
getmousepos(xe, ye); //REMOVE THIS?? you will never click the symbol.
Mouse(Xe,Ye,4 ,4 ,true);
//add some Flag or FFlag(X) to wait for the "runescape flag" to dissapear.
end;
end;


secondd: you have alot of try except & finally… why? Why not work out the bugs so u dont need them?

thirdly: i HIGHLY recommend that you read a tutorial on scripting standards. Your code is all over the place.

Anways good job on your first script, although there are alot of improvement that could be done.


Thank you for you response, I don't use that function anymore so I will remove it

and third, I have read the tut but I miss my visual studio auto formatting… I will try to improve that!

EDIT: After reading your edit, when I bury bones myself I have really a lot of speed clicking the bones, but yea thank you

psyonity

2012-04-17 02:00:02

BUMP

There was a update yesterday… will someone try it?