Nig
07-16-2012, 08:37 PM
I am working on my first script as I would love to learn how to make my own custom bots and also contribute to the forums.
The first script should be fairly simple but I am having an awful time with it. What I want the script to do is simply stand there. When traded, I want the script to accept the trade offer, wait until something is placed in the trade screen, and then accept the trade on both trade windows.
The bot will then continue to stand there until it gets another trade offer.
I'll start off by saying I have read a few guides, and I have found that some are outdated which makes this a huge pain to find information. I have also found a script similar to what i am trying to make but it also is a few years outdated so I can't really learn anything form it.
Here is what I have so far...
program New;
{$DEFINE SMART}
{$i srl/srl.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure Trade;
var
x, y : Integer;
Begin
repeat
if(FindColorTolerance(x, y, 8388736, 0, 0, 790, 560, 4))then
begin
Mouse(x, y, 0, 0, true);
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end.
At the point all I am trying to do is get the script to click on the trade offer and bring up the trade window, and I can't even do that. I have two accounts for testing. I can't even get this to compile and I'v spent hours reading guides. If anyone could help me get past this first part of making the script I'd sure appreciate it as i am very frustrated at this point.
The first script should be fairly simple but I am having an awful time with it. What I want the script to do is simply stand there. When traded, I want the script to accept the trade offer, wait until something is placed in the trade screen, and then accept the trade on both trade windows.
The bot will then continue to stand there until it gets another trade offer.
I'll start off by saying I have read a few guides, and I have found that some are outdated which makes this a huge pain to find information. I have also found a script similar to what i am trying to make but it also is a few years outdated so I can't really learn anything form it.
Here is what I have so far...
program New;
{$DEFINE SMART}
{$i srl/srl.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure Trade;
var
x, y : Integer;
Begin
repeat
if(FindColorTolerance(x, y, 8388736, 0, 0, 790, 560, 4))then
begin
Mouse(x, y, 0, 0, true);
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end.
At the point all I am trying to do is get the script to click on the trade offer and bring up the trade window, and I can't even do that. I have two accounts for testing. I can't even get this to compile and I'v spent hours reading guides. If anyone could help me get past this first part of making the script I'd sure appreciate it as i am very frustrated at this point.