SRL Archive - First Scripts

PortSarim WillowCrusher - Dev Blog -


okokokok

2011-12-21 18:54:43

REMOVED - PortSarim WillowCrusher


Hello guys,

Eventhough this was my first script, i will remove the script from SRL. This script got a tester account banned and since i am really busy with school, getting turmoil (the quests…) and i want to work on my yew cutter (which i haven't been able to in weeks). This script won't be updated by me anymore. If someone wants to improve the script, you can send me a message and i'd be happy to send it to you. For now, i'll be working on my yew cutter.

Greetz okokokok

blinkblink

2011-12-22 14:17:36

The ending of the script I believe is wrong since it pretty much stops the scripts right after dropping the logs

Looking at other scripts ending on that area… I added to yours a repeat & until(false):
begin
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
AntiCrush;
CrushWillow;
DropWillows;
until(false)
end.
Not sure if its correct I have no knowledge in this… but I did test it with this change and it did kept chopping willows after dropping them.

Wyn

2011-12-22 14:22:22

begin
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetUpSRL;
ActivateClient;
DeclarePlayers;
While not RSReady do
Wait(200+random(500));
LoginPlayer;
repeat
AntiCrush;
CrushWillow;
DropWillows;
Until (Not (Loggedin))
end.

Green Bay Packers

2011-12-22 14:29:26

Can you make it bank? :D

okokokok

2011-12-22 14:40:14

Hi guys!

Thank you very much for editing a bit! Im still learning a lot about Pascal and i really appreciate the help! Thanks guys! <3

@Green Bay Packers
I will probably make a banking option as soon as i have enough knowledge of how to do that :)

okokokok

2011-12-23 03:01:22

Hello guys,
I am trying to figure out how to make the script detect trees faster and the hatchet support doesnt work.

For the matter of the better tree detection: I was thinking about adding something like (MSX1,MSY1,MSX2,MSY2) somewhere, so it will only search the main screen. I dont really have an idea how to implement that. Some advice would be helpfull :)

The hatchetsupport: I have picked this hatchetsupport out of srl/srl/skill/woodcutting.scar. But it doesnt work properly, because even though i have wielded a hatchet the script will say "No axe found". I have looked all over the hatchetsupport and i think it has something to do with the bitmaps. Im not really sure, but if u could help me with it, id really appreciate it :)

Greetz okokokok

Harry

2011-12-23 04:01:24

Check globals.scar. MSX1,MSY1,MSX2,MXY2 would be the box for MainScreen.

Also banking shouldn't be that hard to add - it's one click to the deposit box on the dock. Probably faster than dropping every log.

okokokok

2011-12-23 04:12:53

From: Harry
Check globals.scar. MSX1,MSY1,MSX2,MXY2 would be the box for MainScreen.

Also banking shouldn't be that hard to add - it's one click to the deposit box on the dock. Probably faster than dropping every log.


Ok thanks, i didnt think about the deposit box over there at the docks. I am now trying to get the color with a bitmap. I am coming across an strange error though: Unknown identifier 'AutoColorThis' at line 165.

The surrounding code:
var Tree, TreeColor: Integer;
procedure AutoColorTree;
begin
Tree := BitmapFromString(31, 24, 'meJxtlWlu4zgQha/QcWxt1Ertki' +
'V53x0nQJ+h/8z97zFfkZlBYDdQIGiJeu/Vqyp69XisPz+nj/vyeu4' +
'vJ7OeWYf7dbhd2Gy+voj158NunqI57KrtulhPxWaVr4Z06MK6iLs6' +
'bApivN/787E/n/rLsT0eZH85WXwhOp/ghZ3Y/f79hMyr+rBtjjs9D' +
'cV2SvpGwJtS1blqCk8n9X5b77bd6dAc9sjoDDirxOkI/ni//VWzjW' +
'IzITiblunYRW0Vd1XcV16euFnsFyng7WlfbTf1bmOJWoj2lkWIlpf' +
'z6vEwzny+gutpmY2daB7RLGqDMpvHCvz30C83U3PYYhrWAW5XiNg0' +
'xz0ZAY54kC3FU3TnQ7IU5KirsELVOqiyRRKC7GQR1PlqLLcrWKqdl' +
'AYbK8D3GzYkhbGALK8XcvmLLdsRzKDSYSurX6ZeHrt5DDirHvts7M' +
'vdStybBgwEFhYTgr8y7USJSeQVnIpTvqDWrk4QDPgiDhDvasHHMcC' +
'zqU+XXTb02dDl6xGiar8mHTbDjZ681iSy3/AKxid8njhp5BUpaItE' +
'OTqax75fJODTPCAnyzYdWojoUjFK8EeyYMV/GgkiMuInSp7AeTWPg' +
'lngggmyUa7fI590cIxaSBf1ddSURNw3TIEl1esBT4brBUw6WZ6PHV' +
'b8BOdDNw3ncfCuPOsGLYHzNLYgm1CVpu60E+s3XVeTEZ+vHh9stDR' +
'zq6rczNflu6DrKajSRRo6OnYLQbaDGbX1eLvRlhRailJpVr/IQpML' +
'IEGp8YSZRYMQ9UJqD7PK3B337XGPJ4DPlIfPmFNuVvQAfYjDThZTX' +
'NtLPPFzCp0wAt8ZtSWwsmnKsC6tAIIxcdIQr2CXImYR6yKWYB5VVb' +
'z57pvvQOrpmBYKGs0ZPpd2LYQO5LDJ4yXmNAJbCSz9xk+QsRfNeDt' +
'TLiACZVh4OI/8X/6CmnIMo/wq4xhv+QQuWgu70O+b1foAEY3KgVng' +
'MIk4wIceVgi4suBkZCl4+5aEeAIFymHxGIFE8dPVkWspKo1U9txC4' +
'APCMSeVMxKhfIhUt0iQyrdQYAj+v8VqlsW0kC+3gWJagwYzJVME2E' +
'FGA9p4yFualq6z2gjfKCELG++hR4dDB/KvSNV//iFQIuwGza8zQOS' +
'rNLTZKegkL2FHNjcYD11TPnC+odwFGwQDDsv/yETYilrAaWORKsMr' +
'uVuFEBlP5P5k5b9J1QXltpWSsmYRVmC7mVD1E5lAWNRXmMxNJdXME' +
'7RJpXLZ2yrbi4L9+uuLyw1wqU6qkC2wpqCsVPAnMrEwkzt+3Lmdwr' +
'aMuhIiqwpM3xguFNSRNqMshx3H7JhTU7Gd8nkOr56QCc4wIPw/ciE' +
'wg/yNcsze9rDY2llYGbGCtizIlOYU86WjRLObo0G9gtsLBz3cgeD0' +
'57N8Io3qESJPecai2NrOtHLdOUkoHSj6PXpAShD5r+AijA436fPvy' +
'bBL+xmr5QrN/iuc+X+heUiQVbooVoLPASUa2L+C/wuZSlbB');

TreeColor := AutoColorThis(Tree,100,MSX1,MSY1,MSX2,MSY2);
Writeln(IntToStr(TreeColor));
end;

I followed a tutorial, but im getting this error and cant seem to get it to work.

okokokok

2011-12-23 12:15:42

Guys i need testers! :D

Helper

2011-12-23 13:33:00

From: okokokok
Guys i need testers! :D


Can i test it ?

Helper

2011-12-23 13:37:24

what program do you use to make that script ?

Certified by :norris:

okokokok

2011-12-23 13:57:08

I wrote it in SRL/SIMBA, the same place as where you put in the scripts when you run one

Helper

2011-12-23 14:38:07

From: okokokok
I wrote it in SRL/SIMBA, the same place as where you put in the scripts when you run one


Thx


Certified By :norris:

okokokok

2011-12-23 15:37:38

From: Helper
Can i test it ?


Ofcourse u can test it :)

Green Bay Packers

2011-12-23 15:44:13

I'll test it! :D

putonajonny

2011-12-23 20:28:15

From: okokokok
Hello guys,
I am trying to figure out how to make the script detect trees faster and the hatchet support doesnt work.

For the matter of the better tree detection: I was thinking about adding something like (MSX1,MSY1,MSX2,MSY2) somewhere, so it will only search the main screen. I dont really have an idea how to implement that. Some advice would be helpfull :)

The hatchetsupport: I have picked this hatchetsupport out of srl/srl/skill/woodcutting.scar. But it doesnt work properly, because even though i have wielded a hatchet the script will say "No axe found". I have looked all over the hatchetsupport and i think it has something to do with the bitmaps. Im not really sure, but if u could help me with it, id really appreciate it :)

Greetz okokokok


The problem with the hatchet detection is that you use
 case GetCurrentTab of
wrongly


Change this part:
  repeat
case GetCurrentTab of
tab_Equip: begin
for WieldAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54-WieldAxe + Integer(WieldAxe = 8) * 64),Ix, Iy, clBlack, 566, 285, 606, 327, 10) then
Break;
if I = 0 then
if not GameTab(tab_Inv) then exit;
Inc(I);
end;
tab_Inv: begin
for InvAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54 - InvAxe + Integer(InvAxe = 8) * 64), Ix, Iy, clBlack, MIX1, MIY1, MIX2, MIY2, 10) then
Break;
if I = 0 then
if not GameTab(tab_Equip) then exit;
Inc(I);
end;
else
if not GameTab(tab_Equip) then exit;
end;
until I = 2;
to this:
  GameTab(tab_Equip);
for WieldAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54-WieldAxe + Integer(WieldAxe = 8) * 64),Ix, Iy, clBlack, 566, 285, 606, 327, 10) then
Break;
GameTab(tab_Inv);
for InvAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54 - InvAxe + Integer(InvAxe = 8) * 64), Ix, Iy, clBlack, MIX1, MIY1, MIX2, MIY2, 10) then
Break;

you can look at how to use case statements here

okokokok

2011-12-24 12:09:14

From: putonajonny
The problem with the hatchet detection is that you use
 case GetCurrentTab of
wrongly


Change this part:
  repeat
case GetCurrentTab of
tab_Equip: begin
for WieldAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54-WieldAxe + Integer(WieldAxe = 8) * 64),Ix, Iy, clBlack, 566, 285, 606, 327, 10) then
Break;
if I = 0 then
if not GameTab(tab_Inv) then exit;
Inc(I);
end;
tab_Inv: begin
for InvAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54 - InvAxe + Integer(InvAxe = 8) * 64), Ix, Iy, clBlack, MIX1, MIY1, MIX2, MIY2, 10) then
Break;
if I = 0 then
if not GameTab(tab_Equip) then exit;
Inc(I);
end;
else
if not GameTab(tab_Equip) then exit;
end;
until I = 2;
to this:
  GameTab(tab_Equip);
for WieldAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54-WieldAxe + Integer(WieldAxe = 8) * 64),Ix, Iy, clBlack, 566, 285, 606, 327, 10) then
Break;
GameTab(tab_Inv);
for InvAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54 - InvAxe + Integer(InvAxe = 8) * 64), Ix, Iy, clBlack, MIX1, MIY1, MIX2, MIY2, 10) then
Break;

you can look at how to use case statements here


Thanks for the tip! :D
I'll add it tonight, and probably i'll try to add walking and banking to the script!

Guys if you test the script, please give me some feedback!

And remeber to test the script on a "throwaway" account and not on your main!

Greetz okokokok

lilpjer

2011-12-30 14:59:30

Hey can I suggest North of the Crafting guild. Less crowded and more trees :D

okokokok

2011-12-30 15:39:15

From: lilpjer
Hey can I suggest North of the Crafting guild. Less crowded and more trees :D


Ill take a look into it, but atm im working on a yewcutter and banker. The next 2 days i wont have time to script so please be patient :)

Kosova

2011-12-30 15:42:24

Ty for the hardwork bro, ill test tommorrow

Sin

2011-12-30 21:47:19

Nice job :)
Glad to see one less leecher and one more new scripter :)