SCAR Code:
{*******************************************************************************
Function NumberOfModes:Integer;
By: Yohojo
Description: Returns current number of fight modes
*******************************************************************************}
Function NumberOfModes:Integer;
begin
Gametab(1)
Wait(100+Random(100))
If (GetColor(600, 263)) and
(GetColor(679, 269)) and
(GetColor(610, 327))=65536 then
Result:=3 else
Result:=4
end;
{*******************************************************************************
Procedure YSetFightMode(YMode:Integer);
By: Yohojo
Description: Sets fightmode according to box number
*******************************************************************************}
Procedure YSetFightMode(YMode:Integer);
Begin
Gametab(1)
Wait(100+Random(100))
If (NumberOfModes=3) and (YMode=1) and (not (GetColor(604, 273) = 1777020)) then
Mouse(604, 273,10,10,true)
If (NumberOfModes=3) and (YMode=2) and (not (GetColor(690, 274) = 1908609)) then
Mouse(690, 274,10,10,true)
If (NumberOfModes=3) and (YMode=3) and (not (GetColor(609, 329) = 1777020)) then
Mouse(609, 329,10,10,true)
If (NumberOfModes=4) and (YMode=1) and (not (GetColor(608, 275) = 1974408)) then
Mouse(608, 275,10,10,true)
If (NumberOfModes=4) and (YMode=2) and (not (GetColor(693, 272) = 1777020)) then
Mouse(693, 272,10,10,true)
If (NumberOfModes=4) and (YMode=3) and (not (GetColor(604, 323) = 1777020)) then
Mouse(604, 323,10,10,true)
If (NumberOfModes=4) and (YMode=4) and (not (GetColor(691, 322) = 1579629)) then
Mouse(691, 322,10,10,true)
end;
{*******************************************************************************
Procedure FightStyle(Style:String);
By: Yohojo
Description: Sets fightmode according to name of fight style
*******************************************************************************}
Procedure FightStyle(Style:String);
var Kind:String;
Begin
Gametab(1)
Wait(100+Random(100))
Case Style Of
'Attack': Begin Kind:='attack' end;
'Strength': Begin Kind:='strength' end;
'Defense': Begin Kind:='defense' end;
'Controlled': Begin Kind:='controlled' end;
end;
Case Kind of
'attack':
Begin
YSetFightMode(1)
end;
'strength':
Begin
YSetFightMode(2)
end;
'defense':
Begin
if (NumberOfModes=3) then
if(not (GetColor(690, 274) = 1908609)) then
Mouse(690, 274,10,10,true)
if (NumberOfModes=4) then
if (not (GetColor(691, 322) = 1579629)) then
Mouse(691, 322,10,10,true)
end;
'controlled':
Begin
if (NumberOfModes=4) then
if (not (GetColor(604, 323) = 1777020)) then
Mouse(604, 323,10,10,true)
end;
end;
end;