PDA

View Full Version : n00bish autofighter by me



gm112
10-03-2006, 10:58 PM
// I thank everyone at SRL Forums for making this script possible.
// I also thank Kaitnieks for making SCAR, one of the best color macros ever.
// Remember kids, follow the SRL rules.
program New;

{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/extended/xAntiRandoms.scar}

var MColor1,MColor2,MColor3: Integer;
const tolerance=5;
var MonsterName:string;
const fightmode=0;
procedure startup;
begin
SetupSRL;
end;

procedure AntBan;
begin
RotateEvery(5);
AntiBan;
FindMod;
BoredHuman;
RandomMovement;
end;

procedure MonsterColors;
begin
MonsterName:='Goblin';
MColor1:=000000;
MColor2:=000000;
MColor3:=000000;
end;

procedure Fighting;
begin

if InFight = False then;
begin
SetFightMode(FightMode);
FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName);
KAttackMonster(MColor1,MColor2,MColor3,tolerance,M onsterName);
end;
end;

begin
Startup;
AntBan;
MonsterColors;
Fighting;
// FindNormalRnadomsChoice(Talk,Misc,Lamp,Box,Demon,S capeRune,Trade,GameTab,Pinball,Frog,Certer,Sandwic h,Plant,Black,ClickContinue);
end.


Untested on the real game but tested all the way until it compiles successfully. I'm sure this will work as it should. If not then tell me.

WT-Fakawi
10-03-2006, 11:45 PM
Yes, you are right. It compiles. It will probably fight a monster...once. First script? Excellent!

All it now needs is a loop to make it go forever....

program New;

{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/extended/xAntiRandoms.scar}

var
MColor1, MColor2, MColor3: Integer;
const
tolerance=5;
var
MonsterName:string;
const
fightmode=0;

//----------------------------------------------------------------------------//

procedure startup;
begin
SetupSRL;
end;

procedure AntBan;
begin
RotateEvery(5);
AntiBan;
FindMod;
BoredHuman;
RandomMovement;
end;

procedure MonsterColors;
begin
MonsterName:='Goblin';
MColor1:=000000;
MColor2:=000000;
MColor3:=000000;
end;

procedure Fighting;
begin
if not InFight then
begin
FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName);
KAttackMonster(MColor1,MColor2,MColor3,tolerance,M onsterName);
end;
end;

begin
Startup;
SetFightMode(FightMode);
repeat
AntBan;
MonsterColors;
Fighting;
FindNormalRandoms;
until(false);
end.

I tweaked a little hear and there, nothing much...

Nice, carry on :wink:

gm112
10-04-2006, 12:59 AM
Thanks for the tweak Fakawi! Yes, this is my first script =P thats an obvious one.

GoT HaXeD?
10-06-2006, 11:47 AM
where do i get the includes........i get an error that those includes r not included

TeeBaggie
10-09-2006, 11:34 PM
Ive needed a good auto fighter, Thx

Mjordan
10-10-2006, 06:14 PM
well teebaggie i wouldnt suggest using this one if you really wanna train a character because this is just a simple first script.but its up to you. and good job gm112 its a very good first script just keep on keepin on ;)

dwas-woot
10-10-2006, 06:34 PM
Well I might just use this as a refrence since I am trying to learn how tp script. Hopefully i will release something useful. Great script!