This is the script i use Autoseller v1.0program AutoSeller;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
{$I SRL-OSR/SRL/misc/trade.Simba}
Const
nickname = 'bob_dole'; // Your nickname or in-game handle.
item = 'holy symbols'; // The name of the item for sale.
price = 5000; // The price of EACH item.
// ****************************
// * Message to type. *
// * [amount] [price] *
// * [item] [name] *
// ****************************
text = 'Selling [amount] [item], [price] ea. - [name] '; // Message to send
chat_speed = 5; // Speed of chat. Fastest (1) to Slowest (10)
minimum = 0; // Amount to stop at.
paint = true; // Paint?
var
message: string;
left, sold, total, last: integer;
BList, Events: TStringArray;
BListTime, CoinDTMs: TIntegerArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
End;
Function qty (amount: integer): string;
var
i, remainder: integer;
begin
if (amount < 1000) then
begin
Result := inttostr (amount);
Exit;
end;
if (amount < 1000000) then
begin
Remainder := amount - (floor (amount / 100) * 100);
if (Remainder > 0) then
begin
Result := GroupDigits(amount, ',');
Exit;
end;
Result := tostr (0.1 * (amount / 100)) + 'k';
Exit;
end;
Remainder := amount - (floor (amount / 10000) * 10000);
if (Remainder > 0) then
begin
Result := GroupDigits(amount, ',');
Exit;
end;
Result := tostr((0.01 * (amount / 10000))) + 'm';
Exit;
end;
function MSG(): string;
var
message: string;
begin
message := Replace (text, '[amount]', qty(left));
message := Replace (message, '[price]', qty(price));
message := Replace (message, '[item]', item);
Result := Replace (message, '[name]', nickname);
end;
Procedure Report;
var
i: integer;
begin
if (Last = Length(Events)) then
exit;
if (not (paint)) then
exit;
SMART_DrawBoxEx(true, true, inttobox (7, 345, 498, 458), 65536);
SMART_DrawBoxEx(false, true, inttobox (17, 355, 488, 448), clRed);
SMART_DrawTextEx (false, 22, 315, 'BigChars07', 'Bob Dole' + chr(39) + 's AutoSeller', clred);
for i := 0 to Length (events) - 1 do
begin
SMART_DrawTextEx (false, 22, 360 + (i * 15), 'SmallChars07', events
, 65536);
end;
last := Length(events);
end;
Procedure Log (event: string);
var
i: integer;
begin
if (Length (events) > 4) then
begin
for i := 0 to 3 do
begin
events := events;
end;
events[4] := event;
end else
setLength (events, Length (events) + 1);
events[Length(events) - 1] := event;
Report;
end;
Procedure AddItem (q: integer);
begin
MMouseItem(1);
ClickMouse2(mouse_right);
WaitOption('Offer-X', 500);
wait(500);
SendKeys(inttostr(q), 15, 15);
TypeByte(VK_RETURN);
TypeByte(VK_RETURN);
end;
Procedure CheckStuff;
begin
SetLength (CoinDTMs, 4);
CoinDTMs[0] := DTMFromString('mwQAAAHic42RgYOAGYjYGCGAGYk4gFodiMSDmA2IOIOYHYi4ktYxQNi8QCwLxy30yDGt7RRiub5BiMNViALPzo3gZ5jUIgtkbJogwsALVEcKMRGA4AADhvAwB');
CoinDTMs[1] := DTMFromString('mbQAAAHicY2VgYHgOxB+B+A4QfwDiR0BsxcTAYM8Eoc2B2AGIH+2QYji1RJzhyHxxhuOLxBm2TRFhYAWqRceMWDAYAADIHw1v');
CoinDTMs[2] := DTMFromString('mggAAAHicY2NgYKhnZGBoBeIOIG4G4lIoFmZiYOAGYhEgFgdiQSDmAOJvJ2QYNvSLMDzaIcXQVSDI8O4ghM8KNAsbZsSBIQAA8voMog==');
CoinDTMs[3] := DTMFromString('mbQAAAHicY2VgYJjGyMAwC4hnAvFkIJ4ExD+A+CcQfwXiX0D8DYg39Isw9BYLgunfl3zANCtQPzpmxILBAAApcw8V');
last := -1;
GameTab(tab_Inv);
if (GetAmountBox(InvBox(1)) = 0) then
begin
writeln('You need the item you want to sell in inventory slot #1 .');
terminatescript;
end;
if (price = 0) then
begin
writeLn('You did not price the item you want to sell.');
terminatescript;
end;
end;
Procedure TradeOn;
begin
Mmouse(0,0,0,0);
repeat
if (GetColor(346, 489) <> 1715514) then
begin
MMouse(364, 490, 15, 10);
ClickMouse2(mouse_left);
Mmouse(0,0,0,0);
end;
wait(500);
until (GetColor(346, 489) = 1715514);
end;
Procedure AddName (player: string; level: integer);
var
i, index: integer;
begin
for i := 1 to level do
begin
index := Length(BList);
setLength(BList, Length(BList) + 1);
setLength(BListTime, Length(BListTime) + 1);
BList[index] := player;
BListTime[index] := GetTimeRunning + 90000;
end;
end;
function CheckName(player: string): boolean;
var
i, score: integer;
begin
score := 0;
if (Length(BList) = 0) then
begin
Result := True;
Exit;
end;
for i := 0 to Length(Blist) - 1 do
begin
if (player = Blist) then
begin
if (BListTime > GetTimeRunning) then
score := score + 1;
end;
end;
if (score > 2) then
begin
Result := false;
Exit;
end;
Result := True;
end;
function Cash: Integer;
var
i, cur: integer;
begin
Result := 0;
for i := 0 to (length(CoinDTMs) - 1) do
begin
cur := CoinDTMs;
Result := ItemAmount('trade', 'dtm', CoinDTMs, []);
if ((i = 0) AND (Result < 10000)) then
begin
Result := Result * 10;
end;
if (Result > 0) then
break;
end;
end;
Procedure Trade;
var
Trader: String;
amount, gold, timeout, pre: integer;
begin
if (SomeoneTrades) then
begin
writeLn('Someone has traded…');
if (CheckName(GetTradersName)) then
begin
writeln('Accepting trade…');
Trader := GetTradersName;
AcceptTrade;
MarkTime(timeout);
repeat
wait(500);
writeLn('Trade open, waiting for cash…');
if ((TradeScreen = 0) OR (TimeFromMark(timeout) > 30000)) then
begin
writeln('Timed out, declining…');
AddName(Trader, 1);
if (TradeScreen > 0) then
Decline;
Exit;
end;
until ((Cash > 0));
gold := Cash;
amount := Floor (Cash / Price);
pre := GetAmountBox(InvBox(1));
writeLn('Adding items to trade…');
AddItem (amount);
MarkTime (timeout);
repeat
wait(100);
if ((TradeScreen = 0) OR (TimeFromMark(timeout) > 30000)) then
begin
writeln('Timed out, declining…');
AddName(Trader, 1);
if (TradeScreen > 0) then
Decline;
Exit;
end;
if (Cash < Gold) then
begin
AddName(Trader, 1);
writeln('Player changed offer, declining…');
Decline;
Exit;
end;
until (PlayerAccepted);
if ((TradeScreen > 0) AND PlayerAccepted) then
begin
writeln ('Other player accepted, checking deal…');
writeLn (inttostr(Cash));
writeLn (inttostr(Pre - GetAmountBox(InvBox(1))));
if (Cash >= ((Pre - GetAmountBox(InvBox(1))) * price)) then
begin
writeln ('All checks out, accepting trade…');
Accept;
wait (500);
Accept;
MarkTime(timeout);
repeat
wait(500);
writeLn('Waiting for player to accept…');
if (TimeFromMark(timeout) > 30000) then
begin
writeLn ('Trade has timed out, declining…');
AddName(Trader, 1);
Decline;
Exit;
end;
until (TradeScreen = 0);
if (FindBlackChatMessage('ccept')) then
begin
writeLn ('Trade accepted!');
AddName(Trader, 3);
Sold := Sold + (Pre - GetAmountBox(InvBox(1)));
Total := Sold * Price;
Log ('Sold ' + GroupDigits(Pre - GetAmountBox(InvBox(1)), ',') + ' for ' + GroupDigits((price * (Pre - GetAmountBox(InvBox(1)))), ',') + ' to ' + Trader + '.');
end;
end else
begin
writeLn ('Trade does not add up, declining…');
Decline;
Exit;
end;
end;
end;
end;
end;
Procedure Wait2(time: integer);
var
i:integer;
begin
for i := 0 to (time / 500) do
begin
wait(500);
Trade;
end;
end;
var
x, y, coinDTM: integer;
begin
Smart_World := 1;
SetupSRL;
DeclarePlayers;
CheckStuff;
TradeOn;
repeat
if not (LoggedIn) then
begin
LoginPlayer;
CheckStuff;
TradeOn;
end;
Report;
Left := GetAmountBox(InvBox(1));
sendkeys(MSG, 15, 15);
TypeByte(VK_RETURN);
Trade;
wait2(1500 + (chat_speed * 500));
//FindNormalRandoms;
until (GetAmountBox(InvBox(1)) < minimum);
end.
This is how i put my info in.
program AutoSeller;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
{$I SRL-OSR/SRL/misc/trade.Simba}
Const
nickname = 'Beast mode'; // Your nickname or in-game handle.
item = 'chocolate dusts'; // The name of the item for sale.
price = 270; // The price of EACH item.
// ****************************
// * Message to type. *
// * [amount] [price] *
// * [item] [name] *
// ****************************
text = 'Selling [9500] [chocolate dusts], [270] ea. - [Beast mode] '; // Message to send
chat_speed = 5; // Speed of chat. Fastest (1) to Slowest (10)
minimum = 0; // Amount to stop at.
paint = true; // Paint?
var
message: string;
left, sold, total, last: integer;
BList, Events: TStringArray;
BListTime, CoinDTMs: TIntegerArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'iamthebest@hotmail.com';
Players[0].Pass := 'nonecanstopme123';
Players[0].Nick := 'Beast mode';
Players[0].Active := True;
End;
Function qty (amount: integer): string;
var
i, remainder: integer;
begin
if (amount < 1000) then
begin
Result := inttostr (amount);
Exit;
end;
if (amount < 1000000) then
begin
Remainder := amount - (floor (amount / 100) * 100);
if (Remainder > 0) then
begin
Result := GroupDigits(amount, ',');
Exit;
end;
Result := tostr (0.1 * (amount / 100)) + 'k';
Exit;
end;
Remainder := amount - (floor (amount / 10000) * 10000);
if (Remainder > 0) then
begin
Result := GroupDigits(amount, ',');
Exit;
end;
Result := tostr((0.01 * (amount / 10000))) + 'm';
Exit;
end;
function MSG(): string;
var
message: string;
begin
message := Replace (text, '[amount]', qty(left));
message := Replace (message, '[price]', qty(price));
message := Replace (message, '[item]', item);
Result := Replace (message, '[name]', nickname);
end;
Procedure Report;
var
i: integer;
begin
if (Last = Length(Events)) then
exit;
if (not (paint)) then
exit;
SMART_DrawBoxEx(true, true, inttobox (7, 345, 498, 458), 65536);
SMART_DrawBoxEx(false, true, inttobox (17, 355, 488, 448), clRed);
SMART_DrawTextEx (false, 22, 315, 'BigChars07', 'Bob Dole' + chr(39) + 's AutoSeller', clred);
for i := 0 to Length (events) - 1 do
begin
SMART_DrawTextEx (false, 22, 360 + (i * 15), 'SmallChars07', events, 65536);
end;
last := Length(events);
end;
Procedure Log (event: string);
var
i: integer;
begin
if (Length (events) > 4) then
begin
for i := 0 to 3 do
begin
events := events;
end;
events[4] := event;
end else
setLength (events, Length (events) + 1);
events[Length(events) - 1] := event;
Report;
end;
Procedure AddItem (q: integer);
begin
MMouseItem(1);
ClickMouse2(mouse_right);
WaitOption('Offer-X', 500);
wait(500);
SendKeys(inttostr(q), 15, 15);
TypeByte(VK_RETURN);
TypeByte(VK_RETURN);
end;
Procedure CheckStuff;
begin
SetLength (CoinDTMs, 4);
CoinDTMs[0] := DTMFromString('mwQAAAHic42RgYOAGYjYGCGAGYk4gFodiMSDmA2IOIOYHYi4ktYxQNi8QCwLxy30yDGt7RRiub5BiMNViALPzo3gZ5jUIgtkbJogwsALVEcKMRGA4AADhvAwB');
CoinDTMs[1] := DTMFromString('mbQAAAHicY2VgYHgOxB+B+A4QfwDiR0BsxcTAYM8Eoc2B2AGIH+2QYji1RJzhyHxxhuOLxBm2TRFhYAWqRceMWDAYAADIHw1v');
CoinDTMs[2] := DTMFromString('mggAAAHicY2NgYKhnZGBoBeIOIG4G4lIoFmZiYOAGYhEgFgdiQSDmAOJvJ2QYNvSLMDzaIcXQVSDI8O4ghM8KNAsbZsSBIQAA8voMog==');
CoinDTMs[3] := DTMFromString('mbQAAAHicY2VgYJjGyMAwC4hnAvFkIJ4ExD+A+CcQfwXiX0D8DYg39Isw9BYLgunfl3zANCtQPzpmxILBAAApcw8V');
last := -1;
GameTab(tab_Inv);
if (GetAmountBox(InvBox(1)) = 0) then
begin
writeln('You need the item you want to sell in inventory slot #1 .');
terminatescript;
end;
if (price = 0) then
begin
writeLn('You did not price the item you want to sell.');
terminatescript;
end;
end;
Procedure TradeOn;
begin
Mmouse(0,0,0,0);
repeat
if (GetColor(346, 489) <> 1715514) then
begin
MMouse(364, 490, 15, 10);
ClickMouse2(mouse_left);
Mmouse(0,0,0,0);
end;
wait(500);
until (GetColor(346, 489) = 1715514);
end;
Procedure AddName (player: string; level: integer);
var
i, index: integer;
begin
for i := 1 to level do
begin
index := Length(BList);
setLength(BList, Length(BList) + 1);
setLength(BListTime, Length(BListTime) + 1);
BList[index] := player;
BListTime[index] := GetTimeRunning + 90000;
end;
end;
function CheckName(player: string): boolean;
var
i, score: integer;
begin
score := 0;
if (Length(BList) = 0) then
begin
Result := True;
Exit;
end;
for i := 0 to Length(Blist) - 1 do
begin
if (player = Blist) then
begin
if (BListTime > GetTimeRunning) then
score := score + 1;
end;
end;
if (score > 2) then
begin
Result := false;
Exit;
end;
Result := True;
end;
function Cash: Integer;
var
i, cur: integer;
begin
Result := 0;
for i := 0 to (length(CoinDTMs) - 1) do
begin
cur := CoinDTMs;
Result := ItemAmount('trade', 'dtm', CoinDTMs, []);
if ((i = 0) AND (Result < 10000)) then
begin
Result := Result * 10;
end;
if (Result > 0) then
break;
end;
end;
Procedure Trade;
var
Trader: String;
amount, gold, timeout, pre: integer;
begin
if (SomeoneTrades) then
begin
writeLn('Someone has traded…');
if (CheckName(GetTradersName)) then
begin
writeln('Accepting trade…');
Trader := GetTradersName;
AcceptTrade;
MarkTime(timeout);
repeat
wait(500);
writeLn('Trade open, waiting for cash…');
if ((TradeScreen = 0) OR (TimeFromMark(timeout) > 30000)) then
begin
writeln('Timed out, declining…');
AddName(Trader, 1);
if (TradeScreen > 0) then
Decline;
Exit;
end;
until ((Cash > 0));
gold := Cash;
amount := Floor (Cash / Price);
pre := GetAmountBox(InvBox(1));
writeLn('Adding items to trade…');
AddItem (amount);
MarkTime (timeout);
repeat
wait(100);
if ((TradeScreen = 0) OR (TimeFromMark(timeout) > 30000)) then
begin
writeln('Timed out, declining…');
AddName(Trader, 1);
if (TradeScreen > 0) then
Decline;
Exit;
end;
if (Cash < Gold) then
begin
AddName(Trader, 1);
writeln('Player changed offer, declining…');
Decline;
Exit;
end;
until (PlayerAccepted);
if ((TradeScreen > 0) AND PlayerAccepted) then
begin
writeln ('Other player accepted, checking deal…');
writeLn (inttostr(Cash));
writeLn (inttostr(Pre - GetAmountBox(InvBox(1))));
if (Cash >= ((Pre - GetAmountBox(InvBox(1))) * price)) then
begin
writeln ('All checks out, accepting trade…');
Accept;
wait (500);
Accept;
MarkTime(timeout);
repeat
wait(500);
writeLn('Waiting for player to accept…');
if (TimeFromMark(timeout) > 30000) then
begin
writeLn ('Trade has timed out, declining…');
AddName(Trader, 1);
Decline;
Exit;
end;
until (TradeScreen = 0);
if (FindBlackChatMessage('ccept')) then
begin
writeLn ('Trade accepted!');
AddName(Trader, 3);
Sold := Sold + (Pre - GetAmountBox(InvBox(1)));
Total := Sold * Price;
Log ('Sold ' + GroupDigits(Pre - GetAmountBox(InvBox(1)), ',') + ' for ' + GroupDigits((price * (Pre - GetAmountBox(InvBox(1)))), ',') + ' to ' + Trader + '.');
end;
end else
begin
writeLn ('Trade does not add up, declining…');
Decline;
Exit;
end;
end;
end;
end;
end;
Procedure Wait2(time: integer);
var
i:integer;
begin
for i := 0 to (time / 500) do
begin
wait(500);
Trade;
end;
end;
var
x, y, coinDTM: integer;
begin
Smart_World := 1;
SetupSRL;
DeclarePlayers;
CheckStuff;
TradeOn;
repeat
if not (LoggedIn) then
begin
LoginPlayer;
CheckStuff;
TradeOn;
end;
Report;
Left := GetAmountBox(InvBox(1));
sendkeys(MSG, 15, 15);
TypeByte(VK_RETURN);
Trade;
wait2(1500 + (chat_speed * 500));
//FindNormalRandoms;
until (GetAmountBox(InvBox(1)) < minimum);
end.