SRL Archive - Other Scripts

Mech Quest Fighter.


Ultra

2008-04-12 15:05:07

Mech Quest Fighter.


THE LINK TO THE GAME IS HERE!

Well hello, i have made this script because i was bored, and i wanted to make a script for something besides runescape.

So what this script does is, it fights other robots in mech quest, and earns exp. and credits for you.

////////////////////////////////////////////////////////////////////////////////
{Instructions}
{1. Start Logged In (In MechQuest), At Soluna City. }
{2. Set Up Const. }
{3. Drag The Cross-Hair Into The MechQuest Window. }
{4. Hit Run. }
{5. Enjoy. }
{Instructions}
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
{ F E A T U R E S }
{1. Perfect Fighting, Uses Most Combat Weapons (Arms + Back Shoulder + Head) }
{2. Perect Repairing When Needed. }
{3. Clicks All Buttons (Level Up, Ok, And Done Buttons). }
{4. Does Not Get Stuck. }
{5. Earns Credits & Exp. }
{ F E A T U R E S }
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
{PROGGYS} {
FIRST VERSION.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mech Quest Fighter ~ By U L T R A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ran For: 10 Hours, 54 Minutes and 18 Seconds.
Fights: 1146.
Wins: 1008.
Loses: 138.
Level Ups: 2.
Repairs: 626.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I Got 90k Credits From That Proggy!
////////////////////////////////////////////////////////////////////////////////
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mech Quest Fighter ~ Version 1.5 ~ By U L T R A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ran For: 8 Hours, 39 Minutes and 52 Seconds.
Fights: 946.
Wins: 936.
Loses: 10.
Level Ups: 2.
Repairs: 846.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100k Credits!!! }
{PROGGYS}
////////////////////////////////////////////////////////////////////////////////

I have spend some time on this script, it took me a while to get all of the perfect colors and co-ordinates (X, Y).

I didint post the very first versions of the script because at that time i didnt want to release it yet :P.

Here is the script.
program Mech_Quest_Fighter;
{.Include SRL/SRL.Scar}
////////////////////////////////////////////////////////////////////////////////
{Instructions}
{1. Start Logged In (In MechQuest), At Soluna City. }
{2. Set Up Const. }
{3. Drag The Cross-Hair Into The MechQuest Window. }
{4. Hit Run. }
{5. Enjoy. }
{Instructions}
////////////////////////////////////////////////////////////////////////////////
{ F E A T U R E S }
{1. Perfect Fighting, Uses Most Combat Weapons (Arms + Back Shoulder + Head) }
{2. Perect Repairing When Needed. }
{3. Clicks All Buttons (Level Up, Ok, And Done Buttons). }
{4. Does Not Get Stuck. }
{5. Earns Credits & Exp. }
{ F E A T U R E S }
////////////////////////////////////////////////////////////////////////////////
{PROGGYS} {
FIRST VERSION.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mech Quest Fighter ~ By U L T R A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ran For: 10 Hours, 54 Minutes and 18 Seconds.
Fights: 1146.
Wins: 1008.
Loses: 138.
Level Ups: 2.
Repairs: 626.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I Got 90k Credits From That Proggy!
////////////////////////////////////////////////////////////////////////////////
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mech Quest Fighter ~ Version 1.5 ~ By U L T R A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ran For: 8 Hours, 39 Minutes and 52 Seconds.
Fights: 946.
Wins: 936.
Loses: 10.
Level Ups: 2.
Repairs: 846.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100k Credits!!! }
{PROGGYS}
////////////////////////////////////////////////////////////////////////////////

{ U L T R A Presents To You...

_____ .__ ________ __
/ \ ____ ____ | |__ \_____ \ __ __ ____ _______/ |_
/ \ / \_/ __ \_/ ___\| | \ / / \ \| | \_/ __ \ / ___/\ __\
/ Y \ ___/\ \___| Y \/ \_/. \ | /\ ___/ \___ \ | |
\____|__ /\___ >\___ >___| /\_____\ \_/____/ \___ >____ > |__|
\/ \/ \/ \/ \__> \/ \/
___________.__ .__ __
\_ _____/|__| ____ | |___/ |_ ___________
| __) | |/ ___\| | \ __\/ __ \_ __ \
| \ | / /_/ > Y \ | \ ___/| | \/
\___ / |__\___ /|___| /__| \___ >__|
\/ /_____/ \/ \/

}


const
DoFights = 2000;//How Many Times To Battle.

var
TotalFights, Repairs, TotalWins, TotalLoses, TotalLevelUps : Integer;
VN : String;

function FindMQColor(MQColor, MQX, MQY : Integer) : Boolean;
var
MQFoundColor : Integer;
begin
MQFoundColor := GetColor(MQX, MQY);
if(MQColor = MQFoundCOlor)then
begin
Result:=True;
end else
Result:=False;
end;

function WLLUScreen : Boolean;
begin
if(FindMQColor(8311789, 363, 263))and(FindMQColor(16777215, 468, 226))or(FindMQColor(255, 370, 199))or(FindMQColor(13421772, 248, 98))then
begin
Result:=True;
end else
Result:=False;
end;

function Win : Boolean;
begin
if(FindMQColor(8311789, 363, 263))and(FindMQColor(16777215, 468, 226))then
begin
TotalWins := TotalWins + 1;
ReportVars[2] := ReportVars[2] + 1;
Result:=True;
end else
Result:=False;
end;

function Lose : Boolean;
begin
if(FindMQColor(255, 370, 199))then
begin
TotalLoses := TotalLoses + 1;
ReportVars[3] := ReportVars[3] + 1;
Result:=True;
end else
Result:=False;
end;

function LevelUp : Boolean;
begin
if(FindMQColor(13421772, 248, 98))then
begin
Result:=True;
end else
Result:=False;
end;

procedure WaitUntilFindMQColor(MQColor, MQX, MQY : Integer);
begin
repeat
Wait(100);
until(FindMQColor(MQColor, MQX, MQY))or(WLLUScreen);
end;

function InCity : Boolean;
begin
Result:=(FindMQColor(255, 115, 241));
end;

procedure Heal;
begin
if(not(FindMQColor(255, 220, 497)))then
begin
Mouse(352, 433, 0, 0, True);
Repairs := Repairs + 1;
ReportVars[1] := ReportVars[1] + 1;
end;
end;

procedure Battle;
begin
if(InCity)then
begin
Mouse(75, 432, 0, 0, True);
repeat
Wait(100);
until(FindMQColor(921207, 360, 429));
end;
end;

function AK1 : Boolean;
begin
if(FindMQColor(1184311, 316, 263))then
begin
Mouse(316, 263, 0, 0, True);
Wait(100);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1777065, 360, 421);
Result:=True;
end else
Result:=False;
end;

function AK2 : Boolean;
begin
if(FindMQColor(921225, 440, 290))then
begin
Mouse(440, 290, 0, 0, True);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1777065, 360, 421);
Result:=True;
end else
Result:=False;
end;

function AK3 : Boolean;
begin
if(FindMQColor(1711278, 434, 337))then
begin
Mouse(434, 337, 0, 0, True);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1777065, 360, 421);
Result:=True;
end else
Result:=False;
end;

function AK4 : Boolean;
begin
if(FindMQColor(1711283, 436, 392))then
begin
Mouse(436, 392, 0, 0, True);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1777065, 360, 421);
Result:=True;
end else
Result:=False;
end;

function AK5 : Boolean;
begin
if(FindMQColor(2106018, 411, 307))then
begin
Mouse(411, 307, 0, 0, True);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1777065, 360, 421);
Result:=True;
end else
Result:=False;
end;

procedure Attack;
begin
if(AK1)or(AK2)or(AK3)or(AK4)or(AK5)then
begin
Wait(1);
end else
if(not(AK1))and(not(AK2))and(not(AK3))and(not(AK4))and(not(AK5))then
begin
Mouse(360, 429, 0, 0, True);
Wait(100);
MMouse(578, 145, 0, 0);
WaitUntilFindMQColor(1842596, 359, 422);
end;
end;

procedure Fight;
begin
Battle;
begin
repeat
Attack;
until(Win)or(Lose)or(LevelUp);
Mouse(410, 340, 0, 0, True);
Wait(4000);
if(LevelUp)then
begin
TotalLevelUps := TotalLevelUps + 1;
ReportVars[4] := ReportVars[4]+ 1;
end;
Mouse(375, 419, 0, 0, True);
Wait(2000);
Mouse(416, 400, 0, 0, True);
repeat
Wait(100);
until(InCity);
Heal;
TotalFights := TotalFights + 1;
ReportVars[0] := ReportVars[0] + 1;
end;
end;

procedure Report;
begin
ClearDebug;
begin
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Mech Quest Fighter ~ Version ' + VN + ' ~ By U L T R A.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Ran For: ' + TimeRunning + '.');
WriteLn('Fights: ' + IntToStr(TotalFights) + '.');
WriteLn('Wins: ' + IntToStr(TotalWins) + '.');
WriteLn('Loses: ' + IntToStr(TotalLoses) + '.');
WriteLn('Level Ups: ' + IntToStr(TotalLevelUps) + '.');
WriteLn('Repairs: ' + IntToStr(Repairs) + '.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Disguise('Total Fights: ' + IntToStr(TotalFights) + ' | Loses: ' + IntToStr(TotalLoses) + ' | Wins: ' + IntToStr(TotalWins) + ' | Level Ups: ' + IntToStr(TotalLevelUps) + ' | Repairs: ' + IntToStr(Repairs));
end;
end;

begin
SetUpSRL;
TotalFights := 0;
Repairs := 0;
TotalWins := 0;
TotalLoses := 0;
TotalLevelUps := 0;
VN := '1.7';
MouseSpeed := 50 + random(50);
Heal;
repeat
MouseSpeed := 20 + random(30);
Fight;
Report;
until(TotalFights >= DoFights);
end.

{Version Log}

{Version 1.0}
{First version of the script, alot of bugs are still not found.}

{Version 1.1}
{Some bugs found and fixed, added more features, now clicks most of the buttons
to prevent getting stuck. Some bugs are still not found.}

{Version 1.2}
{Clicks all of the buttons, now barely gets stuck at all. Very few bugs left,
some co-ordinates are wrong yet that is not fixed.}

{Version 1.3}
{All co-ordinates are perfect, now it repairs your mecha when your HP is low.}

{Version 1.4}
{Now, if all of the weapons are still recharging it will skip the turn.}

{Version 1.5}
{It will now tell you how many level-ups you got, how many times you lost/won
and how many fights in total, also some bugs fixed. Very-very important
release.}

{Version 1.6}
{Some colors were changed due to the new update at mechquest, some co-ordinates
were off, fixed everything.}

{Version 1.7}
{Found a tiny bug, fixed it. Added a signature thing at the top of the script. }

Here is the version log.
{Version Log}

{Version 1.0}
{First version of the script, alot of bugs are still not found.}

{Version 1.1}
{Some bugs found and fixed, added more features, now clicks most of the buttons
to prevent getting stuck. Some bugs are still not found.}

{Version 1.2}
{Clicks all of the buttons, now barely gets stuck at all. Very few bugs left,
some co-ordinates are wrong yet that is not fixed.}

{Version 1.3}
{All co-ordinates are perfect, now it repairs your mecha when your HP is low.}

{Version 1.4}
{Now, if all of the weapons are still recharging it will skip the turn.}

{Version 1.5}
{It will now tell you how many level-ups you got, how many times you lost/won
and how many fights in total, also some bugs fixed. Very-very important
release.}

{Version 1.6}
{Some colors were changed due to the new update at mechquest, some co-ordinates
were off, fixed everything.}

{Version 1.7}
{Found a tiny bug, fixed it. Added a signature thing at the top of the script. }

Thanks please post some proggys or at least post some comments :P.

HayHay89

2008-04-13 06:23:36

looks nice ill use maybe add something to make it a allover place

Ultra

2008-04-13 16:33:45

All over place?

Harry

2008-04-13 16:34:57

Link to the game? :)

GoF

2008-04-14 07:18:06

From: Hy71194
Link to the game? :)


:google:

http://www.mechquest.com/

Lazy boy.

Ultra

2008-04-14 18:50:11


Quote:
Originally Posted by Hy71194 View Post
Link to the game?


http://www.mechquest.com/

Lazy boy.


Lol, lazy boy :P.

Ultra

2008-04-26 11:24:00

I updated the script lol.

Ultra

2008-05-19 20:31:13

Triplepost omgzors :D.

d0pe b0i

2008-05-19 22:22:56

do you think i could get this thing to run like 24 hours plus?

Lee Lok Hin

2008-05-20 08:19:43

*Whips out VMWare*

Lol. Dang, a new account needs level 3 before going into that town or something.

Wait a bit.

It does not work? I am in soluna city, and it just works for once when I go manually into battle mode. after killing ???, it just pauses there.

d0pe b0i

2008-05-20 16:25:38

From: leelokhin
*Whips out VMWare*

Lol. Dang, a new account needs level 3 before going into that town or something.

Wait a bit.

It does not work? I am in soluna city, and it just works for once when I go manually into battle mode. after killing ???, it just pauses there.


im about to test

EDit:Successfully compiled (1754 ms)
File access error
SRL Compiled in 16 msec
Successfully executed

any help?

EDIT EDIT: got it.
hoping for a 24 hour plus to post up here lawl.
ive never even played this game im just bored O.o

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mech Quest Fighter ~ Version 1.7 ~ By U L T R A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ran For: 18 Minutes and 7 Seconds.
Fights: 11.
Wins: 10.
Loses: 1.
Level Ups: 0.
Repairs: 9.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

longest run of 3 -.-

Ultra

2008-05-21 16:18:10

I found the bug, its this random event when you have to click another button before fighting another robot, it will be fixed.

d0pe b0i

2008-05-21 19:21:13

alright thanks, looking forward to it.

Ultra

2008-05-22 13:00:00

For some reason i cant get the event anymore and i need the co-ordinates of the button, if someone encounters this event then please use your scar to pick the co-ordinates.

As i said i for some reason ain't getting the event anymore so maybe you just have to do it once…


Anyways, can someone tell me what happens before their auto messes up, because i'am actually not that sure whats going on, so someone gimme the details on how and what happens. I need to know the problem so i can fix it.