SRL Archive - RS3 Outdated / Broken Scripts

Rimmington Willow Chopper and Seller


Yakman

2006-09-13 12:16:59

Script information
Chops the willows south east of rimmington and sells them in rimmington general store

Features
Fully autocolor- gets 3 colors of the tree so it finds a tree in few mouse movements

Combines fast woodcutting experiance with a small profit

Baised on SRL preachings- no endless loops, multiple players, that sort of thing

Please note
This is the leecher version of this script, antibans and other things are not included in this version, if you are a SRL member, go to SRL members scripts in the woodcutting section to find the real version.

Please post progress reports- This is a leecher script, i dont really expect any, but if you please my enough and iv had a good day, i might send you the members version

I'v fixed some bugs and made this version 1.1, thanks to everyone who posted bugs!

Mjordan

2006-09-13 19:01:30

ill try it out here when i get time to =)

bobert5696

2006-09-13 19:19:15

looks good, im not member yet, so ill write my own antiban for now :) will test later, got a guidlminer running in a virtual pc, so cant do anther :)

Ruroken

2006-09-13 19:32:59

wow…sounds nice i'll test it soon.:spot:

WhiteShadow

2006-09-13 21:36:05

A job well done. You know how to use SRL very well! :bart:

rest i peace

2006-09-18 11:12:51

Yea, looks like a sweet script, gunna test soon thanks.

BURZUM

2006-09-18 12:06:16

Yeah thanks, i should try it later ( my noob's wc lvl is too low at the moment ) :D

shitsoft

2006-09-18 14:12:45

what is diffent to the "members" version?

BURZUM

2006-09-18 14:21:01

shitsoft, i guess there is a much better script without bugs and ur Army can work more effectively with that one…

ladykiller

2006-09-18 14:45:29

my noob "army" everytime die when i run a script for some hours :mad:

bullzeye95

2006-09-18 14:52:24

I cleaned up the "Leecher Version".

program rimmingtonwillowchopperseller;                                         {
"He only knew that fire was good, fire was beautiful, the fire
was something he needed and would always need. Wonderful fire!"
Trashcan Man, Stephen King - The Stand

I always put a quote at the beginning of my scripts

{.Script Info:
# ScriptName = Rimmington Willow Chopper Seller
# Author = Yakman
# Description = Chops Willows in Rimmington and sells in the general store
# Version = 1.0
# Date =
# Comments = Made with SRL 3.2
/Script Info

[==================================================================]
[ Name : Rimmington Willow Chopper Seller ]
[ Writer : Yakman ]
[ Catagory : Woodcutter ]
[ Description : Chops willows and sells in general store ]
[ Usage : Standard SCAR (Very bright, 32-bit color, ]
[ that sort of thing ]
[ Autocolor : Yes ]
[ SRL Ver. : SRL 3.2 ]
[ Notes : Leecher Version ]
[==================================================================]

This script is the leecher version of Rimmington Willow Chopper Seller.
The Full version is in SRL Member Scripts.

This isnt rapidshare - shit unless you pay, this is simply a anti-leecher
precaution, you dont have to pay anything, just learn SCAR and become an SRL
member.

The general coding style of this is baised on WT-Fakawi's teaching, in
particular, his Goblin Scheduler, so Thanks for that, and Thanks to Dankness
for rewriting it for SRL 3.0

The script log chops the willows south-east of the range shop in Rimmington.
It chops a full load then sells the willows in Rimmington general store.The
script combines fast Woodcutting training with a small profit

The script numbers its reports and displays the time with them so you know
when this report was displayed.

Axe weilded or in First Inventory Spot
A coin pile in first or second space depending on axe location

Players start in the general store or at the Willows
(Note: On the first time you try it, start in the general store, so you end
up at the right group of willows)

I'd ask you to post reports and bugs on the thread, but you're not going to,
with this being a leecher version and all.

{.include srl\srl.scar}
{.include srl\srl\extended\xmapwalk.scar}
{.include srl\srl\skill\woodcutting.scar}

var
treecol1,treecol2,treecol3,trips,trips2do,reportno,checklvl,
chped,money,tol,treetime:integer;findnests,yakmandebug:boolean;

procedure setup;
begin
yakmandebug:=true//true=show in debug log, false=show in status
tol:=6 //tolerance for tree color (6 is fine)
treetime:=30000 //time that characters waits after clicking tree
screenshots:=false; //take screenshots of stuff
lampskill:='woodcutting';//skill to use genie lamp on
findnests:=false; //only members get birds nests - anyway it slowly fills your inventory
end;

const
StartPlayer = 0; // Determines who will play first

procedure DeclarePlayers;
var i:integer;
begin
HowManyPlayers :=2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=StartPlayer;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :=''; //All locations are in rimmington
//At the willows south of range shop
Players[1].Name :=''; //Or at the general store
Players[1].Pass :='';
Players[1].Nick :='';

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';

for i:=0 to howmanyplayers-1 do
players[i].active:=true
end;

procedure yakdebug(s:string); //idea from WT-Fakawi/Dankness
begin
if(yakmandebug)then
writeln(s)
else
status(s)
end;

procedure wherearewe;
var xk,yk:integer;
begin
if(not findsymbol(xk,yk,'quest'))and(not findsymbol(xk,yk,'shop'))then
begin
players[currentplayer].loc:='lost'
logout
writeln('Player '+players[currentplayer].name+' is lost somewhere')
end;
if(findsymbol(xk,yk,'quest'))and(findsymbol(xk,yk,'shop'))then
begin
players[currentplayer].loc:='middle'
yakdebug('Player is between the Willows and Shop')
end;
if(FindSymbol(xk,yk,'shop'))and(not(findsymbol(xk,yk,'quest')))then
begin
players[currentplayer].loc:='general store'
yakdebug('We are in the general store')
end;
if(findsymbol(xk,yk,'quest'))and(not findsymbol(xk,yk,'shop'))then
begin
players[currentplayer].loc:='willows'
yakdebug('We are at the willows')
end;
end;

procedure nxtplayer(state:boolean);
begin
NextPlayer(state)
if(state)then writeln('Active set to true')
else writeln('Active set to false')
if(state)then
while(not(findaxeheadcolor))do
begin //makes sure the player has an axe
players[currentplayer].loc:='no axe'
nextplayer(false)
end;
highestangle
makecompass('n')
wherearewe
setchat('friends',2)
trips2do:=2+random(2)
trips:=0
nicknamebmp:=createbitmapmaskfromtext(players[currentplayer].nick,upchars)
writeln(players[currentplayer].name+' will do '+inttostr(trips2do)+' trips before switching')
end;

{*******************************************************************************
procedure SellCoords(x, y, amount: Integer);
By: RSN
Description: Sells Item at x, y
*******************************************************************************}
procedure SellCoords(x, y, amount: Integer);
var
ix, iy : Integer;//i copyed this because if i include skills\buysell.scar
ToSell : array[1..3] of Integer;//i get some duplicate identifier
Done : array[1..3] of Integer;
begin
ix := x;
iy := y;
ToSell[1] := amount div 10;
ToSell[2] := (amount mod 10) div 5;
ToSell[3] := (amount mod 10) mod 5;
while (done[1] < toSell[1]) do
begin
Mouse(ix, iy, 3, 3, False);
Wait(450);
if (ClickOption('Sell 10', 2)) then
Done[1] := done[1] + 1
else
Exit;
Wait(300);
end;
while (done[2] < toSell[2]) do
begin
Mouse(ix, iy, 3, 3, False);
Wait(450);
if (ClickOption('Sell 5', 2)) then
Done[2] := done[2] + 1
else
Exit;
Wait(300);
end;
while (done[3] < toSell[3]) do
begin
Mouse(ix, iy, 3, 3, False);
Wait(450);
if (ClickOption('Sell 1', 2)) then
Done[3] := done[3] + 1
else
Exit;
end;
end;

procedure playerstats;
var i:integer;active:string;
begin
writeln('<=====================================================>')
writeln(' Name : '+players[currentplayer].name)
writeln(' Number : '+inttostr(currentplayer))
writeln(' Worked : '+inttostr(players[currentplayer].worked))
writeln(' Cut & Sold : '+inttostr(players[currentplayer].integer1))
writeln(' Money Made : '+inttostr(players[currentplayer].integer2))
writeln(' Loc : '+players[currentplayer].loc)
writeln(' Trips left : '+inttostr(trips2do-trips))
writeln('<=====================================================>')
writeln(' =Players Summary=')
for i:=0 to howmanyplayers-1 do
begin
if(players[i].active)then active:='True' else active:='Flse'
writeln(' '+inttostr(i)+':'+players[i].name+'='+active
+' WCLvl:'+inttostr(players[i].level[20])+' '+
+' Cut:'+inttostr(players[i].integer1)+' '+
+' Gp:'+inttostr(players[i].integer2)+' '+
+' Wrked:'+inttostr(players[i].worked)+' '+
+' Loc:'+players[i].loc)
end;
writeln('<=====================================================>')
end;

procedure report;
var pa,i:integer;
begin
for i:=0 to howmanyplayers-1 do
if(players[i].active)then pa:=pa+1
writeln('')
writeln('<=====================================================>')
writeln('<==== Rimmington Willow Chopper Seller by Yakman ====>')
writeln('<=== Leecher Version - Become a SRL member for full ==>')
writeln('<===Report Number '+inttostr(reportno)+'=================================>')
writeln(' Reporting at '+thetime)
writeln(' Worked for '+timerunning)
writeln(' Chopped & Sold '+inttostr(chped)+' Logs')
writeln(' Made '+inttostr(money)+' gp by selling Logs')
writeln(' Remaining '+inttostr(pa)+' Active players')
reportno:=reportno+1
playerstats
end;

procedure antirandom;
begin
yakdebug('Checking for randoms')
findnormalrandoms
if(findfight)then //this bit runs if attacked
begin
if(screenshots)then savescreenshot('Whos attacking? - '+timerunning+'.bmp')
writeln('Running Away')
wait(100+random(200))
runawaydirection('W')
wait(5000+random(5000))
writeln('Running Back')
runback
end;
findhead
if(findnests)then //finds birds nest
findbirdsnest
if(FindEnt(treecol1))then //anti ent
begin
writeln('Found An Ent')
if(screenshots)then
savescreenshot('Ent Found '+timerunning+'.bmp')
end;
if(timefrommark(checklvl)>120000)then
begin
players[currentplayer].level[20]:=GetSkillLevel('woodcutting')
yakdebug(players[currentplayer].name+'''s woodcutting level is '+inttostr(players[currentplayer].level[20]))
marktime(checklvl)
checklvl:=checklvl-random(5000)+random(5000)
end;
end;

procedure findtreecol;//leecher version of this
var t:integer;k:boolean;
begin
t:=1
while(not k)do
begin
if(not loggedin)then exit
if(t>=50)then break
case random(10) of
0:mmouse(201,79,20,20)
1:mmouse(301,80,20,20)
2:mmouse(382,80,20,20)
3:mmouse(154,130,20,20)
4:mmouse(260,130,20,20)
5:mmouse(340,130,20,20)
6:mmouse(175,230,20,20)
7:mmouse(247,230,20,20)
8:mmouse(345,230,20,20)
9:mmouse(200,80,150,150)
end;
yakdebug('Finding tree colors attempt '+inttostr(t))
wait(500+random(1000))
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
getmousepos(x,y)
treecol1:=getcolor(x,y)
mmouse(x+5,y+5,4,4)
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
getmousepos(x,y)
treecol2:=getcolor(x,y)
end else
begin
mmouse(x-10,y-10,4,4)
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
getmousepos(x,y)
treecol2:=getcolor(x,y)
end;
end;
mmouse(x+5,y-5,4,4)
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
getmousepos(x,y)
treecol3:=getcolor(x,y)
end else
begin
mmouse(x-10,y+10,4,4)
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
getmousepos(x,y)
treecol3:=getcolor(x,y)
end;
end;
writeln('Tree colors is '+inttostr(treecol1)+','+inttostr(treecol2)+','+inttostr(treecol3))
k:=true
end;
t:=t+1
end;
if(not k)then
begin
players[currentplayer].loc:='cant find tree color'
logout
end;
end;

procedure choponce;
var ar:integer;
begin
yakdebug('Finding Tree...')
if(findcolorspiraltolerance(x,y,treecol1,106,72,469,282,tol))
and(findcolorspiraltolerance(x,y,treecol2,106,72,469,282,tol))
and(findcolorspiraltolerance(x,y,treecol3,106,72,469,282,tol))then
begin
mmouse(x-random(5),y-random(5),5,5)
if(isuptextmulti('Willow','wn Wil','own W'))then
begin
yakdebug('Found Tree')
wait(500+random(500))
getmousepos(x,y)
mouse(x,y,0,0,true)
marktime(ar)
repeat
if(invfull)then break
antirandom
wait(500+random(500))
until(timefrommark(ar)>=treetime)
wait(1000+random(2000))
end;
end;
antirandom
wait(500+random(500))
end;

procedure shop2willow;
var mmwillow:integer;
begin
yakdebug('Walking to Willows')
mmwillow := BitmapFromString(8, 8, 'z78DA8D8F310E80500C42AF' +
'84FCAAE9AAF1FE5732B11D4850F33BB0F0480178BF81485CF875B' +
'9933846AEE712AD962AA6C9C76DFD484DF196D53E4126B652E78B' +
'D186CA774A3EFA76257DE93C5F7703606F4D4B');
while(not FindSymbol(x,y,'water'))do
begin
wait(100)
yakdebug('Searching for Water symbol')
if(not loggedin)then exit
end;
setrun(true)
setrun(true)
gametab(4)
mouse(x+10,y+10,10,10,true)
antirandom
Flag
findsymbol(x,y,'quest')
yakdebug('Walking a left of quest symbol')
mouse(x-20,y,3,3,true)
flag
wait(2000+random(1000))
yakdebug('Finding deformed willow in minimap')
if(finddeformed(x,y,mmwillow,622,84,683,158))then
begin
mouse(x-8,y+10,2,2,true)
flag
yakdebug('At willows')
freebitmap(mmwillow)
end;
players[currentplayer].loc:='willows'
if(not findaxeheadcolor)then nxtplayer(false)
trips:=trips+1
report
end;

procedure willow2shop;
begin
chped:=chped+26
if(equipaxe)then chped:=chped+1
if(equipaxe)then players[currentplayer].integer1:=players[currentplayer].integer1+1
players[currentplayer].integer1:=players[currentplayer].integer1+26
report
yakdebug('Walking to shop')
if(not loggedin)then exit
setrun(false)
setrun(false)
antirandom
gametab(4)
if(not findsymbol(x,y,'water'))then
begin
yakdebug('Not found water- walking north to see it')
mouse(644,45,5,5,true)
antirandom
flag
findsymbol(x,y,'water')
antirandom
mouse(x,y,10,10,true)
antirandom
flag
end
else
begin
yakdebug('Found water symbol')
mouse(x,y,10,10,true)
antirandom
flag
end;
findsymbol(x,y,'shop')
mouse(x,y-15,5,5,true)
yakdebug('Walking to Shop symbol')
antirandom
flag
antirandom
wait(2000+random(1000))
players[currentplayer].loc:='general store'
end;

procedure sell;
var beforesell,aftersell,keeper,keeper2,tout:integer;found:boolean;
begin
if(not invfull)then exit
tout:=1
keeper2:= BitmapFromString(5, 5, 'z78DA4D8C510A80500804AF64' +
'96689FEE46F73F523E147A3B301F032AF28F4A45B4EF2238FDAC9' +
'2345EE06E64714C713ADE361C9EA050E0D3B3D0FD7F5D191E4621' +
'E3356B7F14A3231A');
keeper := BitmapFromString(5, 5, 'z78DA65CC5B0A80400C43D12D' +
'8D751ECD6793D9FF9A2C54503117CE675A7B16CA3EC2E12E2EAEE' +
'0AD322B31313D6432FADF7AE0CE7AA9A1C15DA2E374948CEC787B' +
'014399233E');
if(equipaxe)then
CountInvSlot(beforesell,1,1)
else
CountInvSlot(beforesell,1,2)
yakdebug('Amount of money in inventory is '+inttostr(beforesell))
repeat
gametab(4)
yakdebug('Finding Deformed Shopkeepers head- attempt '+inttostr(tout))
if(FindDeformed(x,y,keeper,msx1,msy1,msx2,msy2))then
found:=true
else
begin
gametab(1+random(2))
gametab(4)
if(FindDeformed(x,y,keeper2,msx1,msy1,msx2,msy2))then
found:=true
end;
if(found)then
begin
gametab(1+random(2))
gametab(4)
mmouse(x+2,y+5,3,10)
wait(1500+random(500))
if(isuptextmulti('Talk','Shop','eeper'))then
begin
yakdebug('Found shopkeeper')
getmousepos(x,y)
mouse(x,y,0,0,false)
wait(400+random(300))
if(not PopUp('Trade'))then
popup('Canc')
freebitmap(keeper)
freebitmap(keeper2)
flag
break //slight variation to break from loop
end;
end;
wait(300+random(200))
if(tout=6)then begin mouse(642,80,10,10,true) yakdebug('Moving around to see the keeper') end
if(tout>=12)then logout
tout:=tout+1
until(not loggedin)//slight variation to the normal loop failsafe
yakdebug('Selling logs')
SellCoords(702+random(14),441+random(8),30)
while(not findsymbol(x,y,'shop'))do
begin
if(not loggedin)then break
wait(100+random(200))
end;
mouse(x,y,5,5,true)
flag
if(equipaxe)then
CountInvSlot(aftersell,1,1)
else
CountInvSlot(aftersell,1,2)
yakdebug('Just made '+inttostr(aftersell-beforesell)+' Gp')
players[currentplayer].integer2:=players[currentplayer].integer2+(aftersell-beforesell)
money:=money+(aftersell-beforesell)
report
end;

procedure setupscript;
begin
setupsrl;
activateclient;
declareplayers;
mousespeed:=4;
symbolaccuracy:=0.7;
setup;
nicknamebmp:=createbitmapmaskfromtext(players[currentplayer].nick,upchars);
loginplayer;
highestangle;
makecompass('n');
wherearewe;
setchat('friends',2);
if(not(findaxeheadcolor))then
nxtplayer(false);
trips2do:=2+random(2);
trips:=0;
nicknamebmp:=createbitmapmaskfromtext(players[currentplayer].nick,upchars);
writeln(players[currentplayer].name+' will do '+inttostr(trips2do)+' trips before switching');
end;

begin
setupscript;
repeat
if(players[currentplayer].loc='willows')then
begin
findtreecol;
repeat
if(not loggedin)then break
choponce;
until(invfull)
willow2shop;
end;
if(players[currentplayer].loc='middle')then
shop2willow;
if(players[currentplayer].loc='general store')then
begin
sell;
shop2willow;
end;
if(trips>=trips2do)then nxtplayer(true)
if(not loggedin)then nxtplayer(false)
until(false)//i know srl has no endless loops, but the break for this
end. //is in nextplayer

:D Didn't try it yet, but I will and I'll post a progress report. Thanks alot.

srl3333333

2006-09-18 15:00:22

what is the optimal amount of players which i can add to cutting willows and stuff?

Yakman

2006-09-18 15:46:33

what is peoples obsetion with that horrid way of writing, too many spaces and returns in my opinion

however, if you want to keep that "cleaned up" version then your welcome to

stuff the leecher version doesnt have…

the members version finds tree color using FindDeformed, the leecher moves the mouse around and hopes for IsUpText('Chop')
the members version can display debug stuff in the scar title, the leecher can only do writeln and status
the members version has antibans and reponds to "hi" and "wc lvl", it also doesnt log out when a mod comes but asks "whats that crown" "wow a mod" it also does things like randomchat, ghostspeak and remainitems('logs')
the members version uses FFlag and sells its logs from a few inventory locations
in the member version you set a time limit, the script continues cutting until the time limit is over, if you get another log, the time limit is reset
theres also a couple of other stuff like a random next player option

i think i might put this list in the main post

srl3333333, you can have as many players as you want, the more the merrier :D

also people be careful because this version is a little buggy, im working on it and a few other tweaks :spot:

bullzeye95

2006-09-18 16:41:48

What would I have to do to get the members version of the script? I'm working on a script right now for membership.

Yakman

2006-09-21 12:24:40

iv fixed some bugs and made this version 1.1
i also added an option for yakdebug which was already in the members version, i decided leechers could have it too

Thanks to everyone who poste bug!! :D :spot:

Kronos

2006-10-14 17:51:48

Thanks Yakman. I'm downloading now, I'll try it when I get the chance.

I don't suppose that pleased you enough to send the members version of the scipt…. :wink:

Anyway, thanks for releasing any version at all for the non-members section; I haven't really crafted any scripts yet (and I am trying to work on it when I get the time), and I appreciate working ones that I can use. Thanks again.

hardeep_21

2006-11-12 13:24:21

When i try the script i always get this error:
Line 802: [Error] (6183:11): Unknown identifier 'FindColorCircleD' in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Color.scar
any suggestiosn?