NCDS
2010-09-21 02:56:38
[0:39:20]: {----------------------------------------------------------------}
[0:39:20]: { MSI Phoenix Player Report }
[0:39:20]: {------------------------- Revision 299 -------------------------}
[0:39:20]: { Time Running: 39 Minutes and 20 Seconds }
[0:39:20]: {----------------------------------------------------------------}
[0:39:20]: { }
[0:39:20]: { Player 0: ******** }
[0:39:20]: { Location: }
[0:39:20]: { Time: 38m 36s }
[0:39:20]: { Total Loads: 2 }
[0:39:20]: { Active: True }
[0:39:21]: { }
[0:39:21]: { Script: Seers Village Magics }
[0:39:21]: { Time: 38m 36s }
[0:39:21]: { Skill: Woodcutting }
[0:39:21]: { Loads: 2 }
[0:39:21]: { Exp: 14,000 }
[0:39:21]: { Level: 99 }
[0:39:21]: { Item: Magic logs }
[0:39:21]: { Amount: 56 }
[0:39:21]: { }
[0:39:21]: {----------------------------------------------------------------}
[0:39:21]: {----------------------------------------------------------------}
[0:39:21]: Thank-you for using MSI Phoenix scripts!
[0:39:21]: Successfully executed.
Beautiful is the only word that comes to mind :)Dragon Hatchet support has now been added as well.
TScript record:
SCRIPT_SV_MAGICS:
with MSI_Scripts[whichScript] do
begin
Name := 'Seers Village Magics';
Constant := SCRIPT_SV_MAGICS;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_MAGIC];
Items := [[LOGS_MAGIC]];
BankType := Bank;
WhichBank := MSI_BANK_SV;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
with PathInfo do
begin
StartLoc := LOC_SV_BANK;
EndLoc := LOC_SV_MAGICS;
Reflection := [
Point(2726, 3492), Point(2725, 3489),
Point(2722, 3474), Point(2722, 3458),
Point(2720, 3443), Point(2720, 3431),
Point(2720, 3415), Point(2715, 3402),
Point(2702, 3398)
];
// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;
I also edited WaitWhileChopping to wait longer if the user is cutting magic trees for obvious reasons.
New WaitWhileChopping:
Procedure MSI_WaitWhileChopping(TreeID: integer);
Var
CTS, HalfWidth, HalfHeight, L, I, T, OldInvCount, NewInvCount: Integer;
TotalChopTime, R, CT: Integer;
ATPA: T2DPointArray;
TPA: TPointArray;
Objs: TIntegerArray;
B: TBox;
TreeExists, Magic: Boolean;
Begin
MSI_AddHeader('MSI_WaitWhileChopping');
try
Objs := MSI_VarToIntArray(MSI_Players[CurrentPlayer].Objects);
except
end;
Magic := InIntArray(Objs, TREE_MAGIC);
CTS := GetColorToleranceSpeed;
SetColorSpeed2Modifiers(MSI_Objects[TreeID].Hue, MSI_Objects[TreeID].Sat);
HalfWidth := (MSI_Objects[TreeID].W / 2);
HalfHeight := (MSI_Objects[TreeID].H / 2);
B := IntToBox(MSI_Objects[TreeID].X - HalfWidth, MSI_Objects[TreeID].Y - HalfHeight,
MSI_Objects[TreeID].X + HalfWidth, MSI_Objects[TreeID].Y + HalfHeight);
L := Length(MSI_Objects[TreeID].Colors);
SetLength(ATPA, L);
Dec(L);
OldInvCount := InvCount;
T := (GetSystemTime + ((Integer(Magic) + 2) * 20000) + Random(5000));
TotalChopTime := (GetSystemTime - ((GetSystemTime + ((Integer(Magic) + 2) * 20000) + Random(5000)) div 2));
MSI_AddHeader('Entering loop');
Repeat
If InvFull Then
Break;
MSI_AntiBan(RandomRange(0, 5000), ANTI_BAN_CHANCE);
{ Check if the tree Exists }
MSI_Debug('Looking for tree');
For I := 0 To L Do
FindColorsTolerance(ATPA[I], MSI_Objects[TreeID].Colors[I],
B.X1, B.Y1, B.X2, B.Y2, MSI_Objects[TreeID].Tol);
TPA := MergeATPA(ATPA);
//WriteLn(Length(TPA));
TreeExists := Length(TPA) >= MSI_Objects[TreeID].Accuracy;
If (TreeExists) Then
If (Random(4) <> 0) Then
Wait(200 + Random(50))
Else
SleepAndMoveMouse(200 + Random(50));
MSI_FindRandoms;
MSI_FindBirdNest;
{ InvCount check }
MSI_Debug('Checking inventory count');
NewInvCount := InvCount;
If (NewInvCount > OldInvCount) Then
Begin
MSI_SubDebug('New count > old count');
OldInvCount := NewInvCount;
T := (GetSystemTime + ((Integer(Magic) + 2) * 20000) + Random(5000));
End;
{ Prevent logout }
If ((GetSystemTime - TotalChopTime) > 60000) Then
Begin
MSI_Debug('Preventing logout');
CT := GetCurrentTab;
Repeat
R := RandomRange(Tab_Combat, Tab_Notes);
Until(R <> CT);
GameTab(R);
MSI_SubDebug('Clicking game tab: ' + IntToStr(R));
Wait(RandomRange(500, 1000));
End;
if (GetCurrentTab <> tab_Inv) then
MouseBox(646, 177, 662, 195, 1);
Until(Not TreeExists) Or (GetSystemTime > T) Or (Not LoggedIn);
MSI_CloseHeader('Out of loop');
MSI_CloseHeader('MSI_WaitWhileChopping: Exit');
End;
Have fun making massive amount of RSGPs :p
Also, big thanks to wondersuek for loaning me the account to do this :)