SRL Archive - MSI Suggestions

Seers Village Mage Cutter


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 :)

wondersueak

2010-09-21 19:31:56

Thank you for adding this! I appreciate it. =3 It's no problem.

*muahaha, now to go make lots o' gp's!*

Coh3n

2010-09-23 20:14:19

I may be wrong, but I think the extra wait time should be added in the loop (if it's actually a mage tree that was found and clicked) because the way it is now, it will wait longer as long as TREE_MAGIC is in the array. We wouldn't want it to wait longer if it found and clicked an Oak tree (assuming the user is cutting both).

Nice job though, out first P2P script. :)

NCDS

2010-09-23 21:08:00

From: Coh3n
I may be wrong, but I think the extra wait time should be added in the loop (if it's actually a mage tree that was found and clicked) because the way it is now, it will wait longer as long as TREE_MAGIC is in the array. We wouldn't want it to wait longer if it found and clicked an Oak tree (assuming the user is cutting both).

Nice job though, out first P2P script. :)


Yeah your right. That was one of those quick idea, then add it kind of things :p

Sir R. M8gic1an

2010-09-25 16:08:56

I'd suggesting making wait time by level needed. You can use the Consts' numbers for this.

~RM

NCDS

2010-09-26 18:23:20

From: Sir R. Magician
I'd suggesting making wait time by level needed. You can use the Consts' numbers for this.

~RM

Should we perhaps go in increments of 5 for levels to increase the wait time?


Also, can I get some suggestions on what wait time would go with good with the levels we decide to increase them at?

Coh3n

2010-09-28 14:13:14

From: Sir R. Magician
I'd suggesting making wait time by level needed. You can use the Consts' numbers for this.

~RM

Do you mean level needed to but the tree, or the player's level?

You could just wait longer, the higher level the tree is.

NCDS

2010-09-28 14:42:04

From: Coh3n
Do you mean level needed to but the tree, or the player's level?

You could just wait longer, the higher level the tree is.


I believe he means like players with lvl 80-85 would wait 30000ms, 86-90 wait 40000ms, etc.

Coh3n

2010-09-28 14:45:10

From: NCDS
I believe he means like players with lvl 80-85 would wait 30000ms, 86-90 wait 40000ms, etc.

Oh sorry, I was getting this thread and the tree respawn time thread mixed up. :o

pewebob123

2012-05-07 16:47:45

Hey does this script bank if yes it doesnt work for me :S