mrlewcc
06-30-2012, 01:08 PM
I am quite new to Simba coding and I am trying to code my own fc bot however due to my limited knowledge I am finding it very difficult and I am wondering if someone could help me.
Here is my code so far:
program FcBot;
{$DEFINE SMART}
{$i SRL\SRL.simba}
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 0;
StartPlayer = 0;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
end;
procedure Typing;
Var
s : array of string;
begin
if (inchat('!Roll')) Then
begin
TypeSendEx('/You have rolled s');
end;
s := ['RandomRange(1,12)']
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 2;
ActivateClient;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
Wait(4000+random(400));
end.
All I am trying to do is for the bot to generate a random number between 1 and 12 and say it when the person says !Roll in the friends chat, and I can't get that to happen also when I left the random part out the bot wouldn't say it just once it would say it a numerous amount of times untill the !Roll is gone from the chat box.
If someone could help me I would be very greatful.
Here is my code so far:
program FcBot;
{$DEFINE SMART}
{$i SRL\SRL.simba}
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 0;
StartPlayer = 0;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
end;
procedure Typing;
Var
s : array of string;
begin
if (inchat('!Roll')) Then
begin
TypeSendEx('/You have rolled s');
end;
s := ['RandomRange(1,12)']
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 2;
ActivateClient;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
Wait(4000+random(400));
end.
All I am trying to do is for the bot to generate a random number between 1 and 12 and say it when the person says !Roll in the friends chat, and I can't get that to happen also when I left the random part out the bot wouldn't say it just once it would say it a numerous amount of times untill the !Roll is gone from the chat box.
If someone could help me I would be very greatful.