SRL Archive - RS3 Script Requests

crafting


bolshak25

2011-05-30 22:29:06

we have no crafting scripts for regular pottery.
i suggest east varrock bank go to wheel with soft clay and make things such as pie dishes(20gp profit right now and in high demand) then fire em and bank. good xp and cash for minimal distance and work

King of the Nites

2011-05-31 11:25:14

This seems like something that would be a good addition to my clay softener! How close is the wheel to the bank? Maybe show me a pic of the map, I'm on my phone right now so I can't look :/

bolshak25

2011-05-31 15:55:41

i dont have a pic, but the wheel is south east of bank, just east of aubury and basically 1 click from bank. short time and distance for crafting xp and money making

e: if you make it, water the clay at the southeast location from bank through the gate, then go to wheel and oven, then finally back to bank and repeat. or just do crafting part. depends time wise which one get more done

Coh3n

2011-05-31 19:49:33

Used this to get 40 crafting on my army and 70 crafting on my main. Some urns work better than others so you'll have to experiment. Don't ask me to make bug fixes/updates, because I don't have time, but until someone writes one and maintains it, it should work half decently. :) Start in VE bank.

program pottery;
{$DEFINE SMART}
{$i srl/srl.scar}
{$i srl/srl/misc/stats.simba}
{$i reflection/reflection.simba}

const
ID_CLAY_SOFT = 1761;
ID_DOOR_OPEN = 24379;
ID_DOOR_CLOSED = 24381;

const
P_TOTAL = 0;
P_BREAK = 1;
P_LEVEL = 2;
P_WHICH = 0;
P_AMOUNT = 10;

type
TPotware = record
name, statsName: string;
idFired, idUnfired: integer;
clickText: TStringArray;
end;

type
TLoc = (pottersHouse, bank);

var
stats: array[0..1] of string;

procedure declarePlayers;
var
i: integer;
begin
howManyPlayers := 1;
numberOfPlayers(howManyPlayers);
currentPlayer := 0;

stats[0] := '';
stats[1] := '';

with players[0] do
begin
name := '';
pass := '';
active := true;
integers[P_TOTAL] := 6000; // total to craft
integers[P_BREAK] := 50; // break after loads
integers[P_LEVEL] := 70; // max crafting level
strings[P_WHICH] := 'fishing urns'; // what to craft (pot, bowl, mining/cooking/woodcutting/fishing urns)
end;

for i := 0 to high(players) do
if (not players[i].active) then
players[i].status := 'user set to false';
end;

function click(uptext, option: string; p: TPoint): boolean;
begin
if (waitUptext(uptext, 500)) then
begin
mouse(p.x, p.y, 0, 0, true);
result := true;
end else begin
mouse(p.x, p.y, 0, 0, false);
result := waitOption(option, 200);
end;
end;

procedure antiban();
begin
if (random(100) > 10) or (not loggedIn) then
exit;

case (random(50)) of
0: randomMovement();
1: pickupMouse();
2: randomRClick();
3: examineInv();
4: hoverSkill('crafting', False);
end;
end;

function scroll(): boolean;
var
b: array[0..1] of TBox;
clickBox: TBox;
t, x, y: integer;
found: boolean;
begin
b[0] := intToBox(15, 417, 27, 434) // right side
b[1] := intToBox(491, 418, 502, 435); // left side

if (findColorTolerance(x, y, 4016465, b[0].x1, b[0].y1, b[0].x2, b[0].y2, 2)) then
begin
found := true;
clickBox := b[0];
end else
if (findColorTolerance(x, y, 4016465, b[1].x1, b[1].y1, b[1].x2, b[1].y2, 2)) then
begin
found := true;
clickBox := b[1];
end;

if (found) then
begin
mouseBox(clickBox.x1, clickBox.y1-10, clickBox.x2, clickBox.y2+10, 3);

t := (getSystemTime + 3000);
while (getSystemTime < t) and (not result) do
begin
result := (not findColorTolerance(x, y, 4016465, clickBox.x1, clickBox.y1, clickBox.x2, clickBox.y2, 2));
wait(10+random(30));
end;
end;
end;

function potteryScreen(): boolean;
var
x, y: integer;
begin
result := findColorTolerance(x, y, 2070783, 370, 350, 400, 375, 5);
end;

function getPotware(): TPotware;
begin
case players[currentPlayer].strings[P_WHICH] of
'pot':
with result do
begin
name := 'pot';
statsName := 'Pots (Crafted)';
idFired := 1931;
idUnfired := 1787;
clickText := ['Pot'];
end;

'bowl':
with result do
begin
name := 'bowl';
statsName := 'Bowls (Crafted)';
idFired := 1923;
idUnfired := 1791;
clickText := ['Bowl'];
end;

'mining urns':
with result do
begin
name := 'Mining urns';
statsName := 'Mining Urns (Crafted)';
idFired := 20392;
idUnfired := 20391;
clickText := ['Urns', 'Mining urns', 'Mining urn'];
end;

'cooking urns':
with result do
begin
name := 'Cooking urns';
statsName := 'Cooking Urns (Crafted)';
idFired := 20362;
idUnfired := 20361;
clickText := ['Urns', 'Cooking urns', 'Cooking urn'];
end;

'woodcutting urns':
with result do
begin
name := 'Woodcutting urns';
statsName := 'Woodcutting Urns (Crafted)';
idFired := 20308;
idUnfired := 20307;
clickText := ['Urns', 'oodcutting urns', 'Woodcutting urn'];
end;

'fishing urns':
with result do
begin
name := 'Fishing urns';
statsName := 'Fishing Urns (Crafted)';
idFired := 20332;
idUnfired := 20331;
clickText := ['Urns', 'Fishing urns', 'Fishing urn'];
end;

else
writeln('invalid potware!');
end;
end;

procedure setupPlayer();
begin
if (not loggedIn) then
loginPlayer();

setAngle(true);
setRun(true);
makeCompass('n');
r_FindRandoms();
wait(randomRange(3000, 7000)); // wait for everything to load
end;

function handleDoor(): boolean;
var
door: TRSObject;
p: TPoint;
begin
if (not loggedIn) then
exit;

door := getObjectAt(point(3259, 3400), OBJECT_TYPE_WALLOBJECT);

if (door.id > 0) then
begin
makeCompass('w');
p := tileToMS(door.tile, 5);

mmouse(p.x, p.y, 3, 3);
getMousePos(p.x, p.y);

result := click('pen', 'pen', point(p.x, p.y));
end else
result := true;

wait(randomRange(300, 500));
end;

function walkTo(loc: TLoc): boolean;
var
path: TPointArray;
begin
if (not loggedIn) then
exit;

runEnergy(20);
makeCompass('n');
path := [point(3254, 3421), point(3260, 3412), point(3262, 3399)];

if (loc = pottersHouse) then
begin
handleDoor();
result := walkPath(path);
end else begin
invertTPA(path);
result := walkPath(path);
handleDoor();
end;

r_FindRandoms();
end;

function getSoftClay(): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

result := (r_CountItem(ID_CLAY_SOFT) > 0);

if (not result) then
begin
t := (getSystemTime + 10000);

while (getSystemTime < t) and (not result) do
if (r_OpenBankBooth('veb')) then
begin
depositAll();
result := r_WithdrawItem(ID_CLAY_SOFT, 0);

if (not result) then
begin
players[currentPlayer].status := 'ran out of soft clay';
break;
end;
end;
end;

r_FindRandoms();
end;

function clickObject(where: TPoint; uptext, option: string; offsetX, offsetY: integer): boolean;
var
t: integer;
p: TPoint;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + 10000);

while (getSystemTime < t) and (not result) do
begin
handleDoor();
result := potteryScreen();

if (not result) then
begin
p := tileToMS(where, 5);
mmouse(p.x+offsetX, p.y+offsetY, 5, 5);
getMousePos(p.x, p.y);
result := click(uptext, option, point(p.x, p.y));
end;

wait(randomRange(200, 500));
end;

r_FindRandoms();
end;

function clickTexts(texts: TStringArray): boolean;
var
i, t: integer;
begin
for i := 0 to high(texts) do
begin
t := (getSystemTime + 5000);
while (getSystemTime < t) do
begin
wait(randomRange(800, 1000));

if (clickText(texts[i], 'StatChars', MCX1, MCY1, MCX2, MCY2, true)) then
begin
result := (i = high(texts));
break;
end else
if (scroll()) then
continue;

Wait(20 + Random(20));
end;
end;
end;

function whileMaking(id: integer): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + (2*60000));

while (getSystemTime < t) and (not result) do
begin
result := (r_CountItem(id) <= 0);
r_FindRandoms();
antiban();
levelUp();
wait(randomRange(100, 200));
end;
end;

function makePotware(objTile: TPoint; uptext, option: string; texts: TStringArray; itemID, offsetX, offsetY: integer): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + (5*60000));

while (getSystemTime < t) and (not result) do
begin
if (clickObject(objTile, uptext, option, offsetX, offsetY)) then
if (waitFunc(@potteryScreen, 50, 5000)) then
begin
if (clickTexts(texts)) then
result := whileMaking(itemID);
end;

if (not result) then
walkToTile(tile(3264, 3398), 2, 0);
end;

r_FindRandoms();
end;

function pottery(): boolean;
var
p: TPotware;
begin
if (not loggedIn) then
exit;

p := getPotware();

if (makePotware(tile(3263, 3400), 'heel', 'orm', p.clickText, ID_CLAY_SOFT, 0, 0)) then
result := makePotware(tile(3262, 3396), 'oven', 'ire', p.clickText, p.idUnfired, 0, -10)
else
players[currentPlayer].status := 'failed to form '+p.name;

r_FindRandoms();
handleDoor();
end;

procedure incVars();
var
potware: TPotware;
begin
potware := getPotware();
incEx(players[currentPlayer].Integers[P_AMOUNT], r_CountItem(potware.idFired));
stats_IncVariable(potware.statsName, r_CountItem(potware.idFired));
end;

procedure takeBreak();
var
t: Integer;
begin
writeln('breaking/switching Players');

if (bankScreen) then
CloseBank();

if (howManyPlayers > 1) and (playersActive > 1) then
nextPlayer(True)
else begin
logout();

t := (getSystemTime + ((10*60000) + randomRange(-5*60000, 5*60000)));
writeln('breaking for ' + msToTime(t - getSystemTime, TIME_BARE));

while (getSystemTime < t) do
begin
if (random(100) < 30) then
writeln('time left: ' + msToTime(t - getSystemTime, TIME_BARE));

wait(randomRange(10000, 20000));
end;

loginPlayer();
end;

writeln('continuing/next player');
r_FindRandoms();
end;

procedure progressReport();
var
i: integer;
begin
SRLRandomsReport;

writeln('(**');
writeln(' * Varrock East Pottery');
writeln(' * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯');

for i := 0 to high(players) do
begin
if (players[i].status = 'user set to false') then
continue;

if (not players[i].active) then
writeln(' * '+intToStr(i)+': '+intToStr(players[i].integers[P_AMOUNT])+' false: '+players[i].status)
else
writeln(' * '+intToStr(i)+': '+intToStr(players[i].integers[P_AMOUNT]));
end;

writeln(' * --------------------');
writeln(' * '+timeRunning);
writeln(' * ____________________');
writeln(' *)');
end;

procedure unsetPlayer(why: string; force: boolean);
begin
if (r_FindRandoms()) then
exit;

players[currentPlayer].active := false;

if (force) then
players[currentPlayer].status := why
else
if (players[currentPlayer].status = '') then
players[currentPlayer].status := why;

if (r_OpenBankBooth('veb')) then
begin
depositAll;
closeBank;
end;

if ((howManyPlayers <= 1) or (playersActive <= 0)) then
begin
logout();
writeln(why);
terminateScript();
end else
nextPlayer(false);
end;

procedure scriptTerminate();
begin
progressReport();
end;

procedure setupScript();
begin
smart_Server := 152;
smart_Members := False;
smart_Signed := True;
smart_SuperDetail := False;

setScriptProp(SP_WriteTimeStamp, [True]);
addOnTerminate('scriptTerminate');
setupSRL;
setupReflection;
declarePlayers;
setupSRLStats(54, stats[0], stats[1]);
worldSwitcherEnabled := true;
clearDebug();
end;

var
tries, brkLoads: integer;
begin
setupScript();

repeat
setupPlayer();
brkLoads := 0;

repeat
if (not loggedIn) then
begin
inc(tries);
writeln('may have lost connection..');

if (tries >= 5) then
begin
writeln('reconnect tries limit exceeded..');
wait(RandomRange(60000 * 3, 60000 * 5));
end else
loginPlayer();

if (tries >= 10) then
begin
unsetPlayer('failed to reconnect', true);
break;
end;

continue;
end else
tries := 0;

if (not getSoftClay()) then
begin
unsetPlayer('failed to get soft clay from bank', false);
break;
end;

progressReport();
stats_Commit();

if (not walkTo(pottersHouse)) then
begin
unsetPlayer('failed to walk to potter''s house', false);
break;
end;
handleDoor();
makeCompass('n');

if (not pottery()) then
begin
unsetPlayer('failed to fire potware', false);
break;
end;

if (not walkTo(bank)) then
begin
unsetPlayer('failed to walk to bank', false);
break;
end;
incVars();

inc(brkLoads);

if (brkLoads >= (players[currentPlayer].integers[P_BREAK] + randomRange(-2, 2))) then
begin
takeBreak();
break;
end;

if (players[currentPlayer].integers[P_AMOUNT] > players[currentPlayer].integers[P_TOTAL]) then
begin
unsetPlayer('finished', true);
break;
end;

if ((r_GetSkillLevel('crafting') >= players[currentPlayer].integers[P_LEVEL])) then
begin
unsetPlayer('target level reached', true);
break;
end;

r_FindRandoms();
until(not players[currentPlayer].active);
until(allPlayersInactive);
end.
Enjoy,
Coh3n

bolshak25

2011-05-31 19:57:32

no pie dish?

Coh3n

2011-05-31 20:08:20

No, but if you look at getPotware you can add it easily. :)

Tlachtli

2011-05-31 20:22:11

From: Coh3n
Used this to get 40 crafting on my army and 70 crafting on my main. Some urns work better than others so you'll have to experiment. Don't ask me to make bug fixes/updates, because I don't have time, but until someone writes one and maintains it, it should work half decently. :) Start in VE bank.

program pottery;
{$DEFINE SMART}
{$i srl/srl.scar}
{$i srl/srl/misc/stats.simba}
{$i reflection/reflection.simba}

const
ID_CLAY_SOFT = 1761;
ID_DOOR_OPEN = 24379;
ID_DOOR_CLOSED = 24381;

const
P_TOTAL = 0;
P_BREAK = 1;
P_LEVEL = 2;
P_WHICH = 0;
P_AMOUNT = 10;

type
TPotware = record
name, statsName: string;
idFired, idUnfired: integer;
clickText: TStringArray;
end;

type
TLoc = (pottersHouse, bank);

var
stats: array[0..1] of string;

procedure declarePlayers;
var
i: integer;
begin
howManyPlayers := 1;
numberOfPlayers(howManyPlayers);
currentPlayer := 0;

stats[0] := '';
stats[1] := '';

with players[0] do
begin
name := '';
pass := '';
active := true;
integers[P_TOTAL] := 6000; // total to craft
integers[P_BREAK] := 50; // break after loads
integers[P_LEVEL] := 70; // max crafting level
strings[P_WHICH] := 'fishing urns'; // what to craft (pot, bowl, mining/cooking/woodcutting/fishing urns)
end;

for i := 0 to high(players) do
if (not players[i].active) then
players[i].status := 'user set to false';
end;

function click(uptext, option: string; p: TPoint): boolean;
begin
if (waitUptext(uptext, 500)) then
begin
mouse(p.x, p.y, 0, 0, true);
result := true;
end else begin
mouse(p.x, p.y, 0, 0, false);
result := waitOption(option, 200);
end;
end;

procedure antiban();
begin
if (random(100) > 10) or (not loggedIn) then
exit;

case (random(50)) of
0: randomMovement();
1: pickupMouse();
2: randomRClick();
3: examineInv();
4: hoverSkill('crafting', False);
end;
end;

function scroll(): boolean;
var
b: array[0..1] of TBox;
clickBox: TBox;
t, x, y: integer;
found: boolean;
begin
b[0] := intToBox(15, 417, 27, 434) // right side
b[1] := intToBox(491, 418, 502, 435); // left side

if (findColorTolerance(x, y, 4016465, b[0].x1, b[0].y1, b[0].x2, b[0].y2, 2)) then
begin
found := true;
clickBox := b[0];
end else
if (findColorTolerance(x, y, 4016465, b[1].x1, b[1].y1, b[1].x2, b[1].y2, 2)) then
begin
found := true;
clickBox := b[1];
end;

if (found) then
begin
mouseBox(clickBox.x1, clickBox.y1-10, clickBox.x2, clickBox.y2+10, 3);

t := (getSystemTime + 3000);
while (getSystemTime < t) and (not result) do
begin
result := (not findColorTolerance(x, y, 4016465, clickBox.x1, clickBox.y1, clickBox.x2, clickBox.y2, 2));
wait(10+random(30));
end;
end;
end;

function potteryScreen(): boolean;
var
x, y: integer;
begin
result := findColorTolerance(x, y, 2070783, 370, 350, 400, 375, 5);
end;

function getPotware(): TPotware;
begin
case players[currentPlayer].strings[P_WHICH] of
'pot':
with result do
begin
name := 'pot';
statsName := 'Pots (Crafted)';
idFired := 1931;
idUnfired := 1787;
clickText := ['Pot'];
end;

'bowl':
with result do
begin
name := 'bowl';
statsName := 'Bowls (Crafted)';
idFired := 1923;
idUnfired := 1791;
clickText := ['Bowl'];
end;

'mining urns':
with result do
begin
name := 'Mining urns';
statsName := 'Mining Urns (Crafted)';
idFired := 20392;
idUnfired := 20391;
clickText := ['Urns', 'Mining urns', 'Mining urn'];
end;

'cooking urns':
with result do
begin
name := 'Cooking urns';
statsName := 'Cooking Urns (Crafted)';
idFired := 20362;
idUnfired := 20361;
clickText := ['Urns', 'Cooking urns', 'Cooking urn'];
end;

'woodcutting urns':
with result do
begin
name := 'Woodcutting urns';
statsName := 'Woodcutting Urns (Crafted)';
idFired := 20308;
idUnfired := 20307;
clickText := ['Urns', 'oodcutting urns', 'Woodcutting urn'];
end;

'fishing urns':
with result do
begin
name := 'Fishing urns';
statsName := 'Fishing Urns (Crafted)';
idFired := 20332;
idUnfired := 20331;
clickText := ['Urns', 'Fishing urns', 'Fishing urn'];
end;

else
writeln('invalid potware!');
end;
end;

procedure setupPlayer();
begin
if (not loggedIn) then
loginPlayer();

setAngle(true);
setRun(true);
makeCompass('n');
r_FindRandoms();
wait(randomRange(3000, 7000)); // wait for everything to load
end;

function handleDoor(): boolean;
var
door: TRSObject;
p: TPoint;
begin
if (not loggedIn) then
exit;

door := getObjectAt(point(3259, 3400), OBJECT_TYPE_WALLOBJECT);

if (door.id > 0) then
begin
makeCompass('w');
p := tileToMS(door.tile, 5);

mmouse(p.x, p.y, 3, 3);
getMousePos(p.x, p.y);

result := click('pen', 'pen', point(p.x, p.y));
end else
result := true;

wait(randomRange(300, 500));
end;

function walkTo(loc: TLoc): boolean;
var
path: TPointArray;
begin
if (not loggedIn) then
exit;

runEnergy(20);
makeCompass('n');
path := [point(3254, 3421), point(3260, 3412), point(3262, 3399)];

if (loc = pottersHouse) then
begin
handleDoor();
result := walkPath(path);
end else begin
invertTPA(path);
result := walkPath(path);
handleDoor();
end;

r_FindRandoms();
end;

function getSoftClay(): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

result := (r_CountItem(ID_CLAY_SOFT) > 0);

if (not result) then
begin
t := (getSystemTime + 10000);

while (getSystemTime < t) and (not result) do
if (r_OpenBankBooth('veb')) then
begin
depositAll();
result := r_WithdrawItem(ID_CLAY_SOFT, 0);

if (not result) then
begin
players[currentPlayer].status := 'ran out of soft clay';
break;
end;
end;
end;

r_FindRandoms();
end;

function clickObject(where: TPoint; uptext, option: string; offsetX, offsetY: integer): boolean;
var
t: integer;
p: TPoint;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + 10000);

while (getSystemTime < t) and (not result) do
begin
handleDoor();
result := potteryScreen();

if (not result) then
begin
p := tileToMS(where, 5);
mmouse(p.x+offsetX, p.y+offsetY, 5, 5);
getMousePos(p.x, p.y);
result := click(uptext, option, point(p.x, p.y));
end;

wait(randomRange(200, 500));
end;

r_FindRandoms();
end;

function clickTexts(texts: TStringArray): boolean;
var
i, t: integer;
begin
for i := 0 to high(texts) do
begin
t := (getSystemTime + 5000);
while (getSystemTime < t) do
begin
wait(randomRange(800, 1000));

if (clickText(texts[i], 'StatChars', MCX1, MCY1, MCX2, MCY2, true)) then
begin
result := (i = high(texts));
break;
end else
if (scroll()) then
continue;

Wait(20 + Random(20));
end;
end;
end;

function whileMaking(id: integer): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + (2*60000));

while (getSystemTime < t) and (not result) do
begin
result := (r_CountItem(id) <= 0);
r_FindRandoms();
antiban();
levelUp();
wait(randomRange(100, 200));
end;
end;

function makePotware(objTile: TPoint; uptext, option: string; texts: TStringArray; itemID, offsetX, offsetY: integer): boolean;
var
t: integer;
begin
if (not loggedIn) then
exit;

t := (getSystemTime + (5*60000));

while (getSystemTime < t) and (not result) do
begin
if (clickObject(objTile, uptext, option, offsetX, offsetY)) then
if (waitFunc(@potteryScreen, 50, 5000)) then
begin
if (clickTexts(texts)) then
result := whileMaking(itemID);
end;

if (not result) then
walkToTile(tile(3264, 3398), 2, 0);
end;

r_FindRandoms();
end;

function pottery(): boolean;
var
p: TPotware;
begin
if (not loggedIn) then
exit;

p := getPotware();

if (makePotware(tile(3263, 3400), 'heel', 'orm', p.clickText, ID_CLAY_SOFT, 0, 0)) then
result := makePotware(tile(3262, 3396), 'oven', 'ire', p.clickText, p.idUnfired, 0, -10)
else
players[currentPlayer].status := 'failed to form '+p.name;

r_FindRandoms();
handleDoor();
end;

procedure incVars();
var
potware: TPotware;
begin
potware := getPotware();
incEx(players[currentPlayer].Integers[P_AMOUNT], r_CountItem(potware.idFired));
stats_IncVariable(potware.statsName, r_CountItem(potware.idFired));
end;

procedure takeBreak();
var
t: Integer;
begin
writeln('breaking/switching Players');

if (bankScreen) then
CloseBank();

if (howManyPlayers > 1) and (playersActive > 1) then
nextPlayer(True)
else begin
logout();

t := (getSystemTime + ((10*60000) + randomRange(-5*60000, 5*60000)));
writeln('breaking for ' + msToTime(t - getSystemTime, TIME_BARE));

while (getSystemTime < t) do
begin
if (random(100) < 30) then
writeln('time left: ' + msToTime(t - getSystemTime, TIME_BARE));

wait(randomRange(10000, 20000));
end;

loginPlayer();
end;

writeln('continuing/next player');
r_FindRandoms();
end;

procedure progressReport();
var
i: integer;
begin
SRLRandomsReport;

writeln('(**');
writeln(' * Varrock East Pottery');
writeln(' * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯');

for i := 0 to high(players) do
begin
if (players[i].status = 'user set to false') then
continue;

if (not players[i].active) then
writeln(' * '+intToStr(i)+': '+intToStr(players[i].integers[P_AMOUNT])+' false: '+players[i].status)
else
writeln(' * '+intToStr(i)+': '+intToStr(players[i].integers[P_AMOUNT]));
end;

writeln(' * --------------------');
writeln(' * '+timeRunning);
writeln(' * ____________________');
writeln(' *)');
end;

procedure unsetPlayer(why: string; force: boolean);
begin
if (r_FindRandoms()) then
exit;

players[currentPlayer].active := false;

if (force) then
players[currentPlayer].status := why
else
if (players[currentPlayer].status = '') then
players[currentPlayer].status := why;

if (r_OpenBankBooth('veb')) then
begin
depositAll;
closeBank;
end;

if ((howManyPlayers <= 1) or (playersActive <= 0)) then
begin
logout();
writeln(why);
terminateScript();
end else
nextPlayer(false);
end;

procedure scriptTerminate();
begin
progressReport();
end;

procedure setupScript();
begin
smart_Server := 152;
smart_Members := False;
smart_Signed := True;
smart_SuperDetail := False;

setScriptProp(SP_WriteTimeStamp, [True]);
addOnTerminate('scriptTerminate');
setupSRL;
setupReflection;
declarePlayers;
setupSRLStats(54, stats[0], stats[1]);
worldSwitcherEnabled := true;
clearDebug();
end;

var
tries, brkLoads: integer;
begin
setupScript();

repeat
setupPlayer();
brkLoads := 0;

repeat
if (not loggedIn) then
begin
inc(tries);
writeln('may have lost connection..');

if (tries >= 5) then
begin
writeln('reconnect tries limit exceeded..');
wait(RandomRange(60000 * 3, 60000 * 5));
end else
loginPlayer();

if (tries >= 10) then
begin
unsetPlayer('failed to reconnect', true);
break;
end;

continue;
end else
tries := 0;

if (not getSoftClay()) then
begin
unsetPlayer('failed to get soft clay from bank', false);
break;
end;

progressReport();
stats_Commit();

if (not walkTo(pottersHouse)) then
begin
unsetPlayer('failed to walk to potter''s house', false);
break;
end;
handleDoor();
makeCompass('n');

if (not pottery()) then
begin
unsetPlayer('failed to fire potware', false);
break;
end;

if (not walkTo(bank)) then
begin
unsetPlayer('failed to walk to bank', false);
break;
end;
incVars();

inc(brkLoads);

if (brkLoads >= (players[currentPlayer].integers[P_BREAK] + randomRange(-2, 2))) then
begin
takeBreak();
break;
end;

if (players[currentPlayer].integers[P_AMOUNT] > players[currentPlayer].integers[P_TOTAL]) then
begin
unsetPlayer('finished', true);
break;
end;

if ((r_GetSkillLevel('crafting') >= players[currentPlayer].integers[P_LEVEL])) then
begin
unsetPlayer('target level reached', true);
break;
end;

r_FindRandoms();
until(not players[currentPlayer].active);
until(allPlayersInactive);
end.
Enjoy,
Coh3n


Haven't tried that one yet, but the code looks really good. I plan (at some point in the distant future, when I pick scripting back up) to write a superheater that supports smithing urns, so this will come in handy; also, gotta get 75 crafting for slayer rings.

King of the Nites

2011-05-31 20:27:16

I'll try to get this added as soon as I can! It shouldn't be too difficult other than the door and the gate, but reflection can handle that easily.

~King of the Nites

Coh3n

2011-05-31 23:32:03

From: Tlachtli
Haven't tried that one yet, but the code looks really good. I plan (at some point in the distant future, when I pick scripting back up) to write a superheater that supports smithing urns, so this will come in handy; also, gotta get 75 crafting for slayer rings.
I found it worked the best with fishing urns just so you know. Made almost 9k of them to get 70 Crafting. Took two-three runs of the script.

bolshak25

2011-06-02 23:35:00

coh3n,
i added pie dishes to your script. can you add
Pie dishes (Crafted)
to stats variables?

(i would post in that thread, but its almost a month old and seems kind of gravediggish)

Flight

2011-06-03 00:03:54

It's not grave dig, that thread is constantly having variables added to it. Post there and I promise it'll be added very shortly.

Coh3n

2011-06-03 07:33:03

From: bolshak25
coh3n,
i added pie dishes to your script. can you add
Pie dishes (Crafted)
to stats variables?

(i would post in that thread, but its almost a month old and seems kind of gravediggish)
Done, and yeah like Flight said, it's not a gravedig for that thread. :)