Bionicle
2010-01-29 19:27:49
Ok. I have a TIntegerArray, is there any way I can have it in a For..To..Do loop from the first integer to the last in order? I did a quick look through the WizzyPlugin, nothing caught my eye…help?
2010-01-29 19:27:49
2010-01-29 19:31:54
From: bionicle1800
Ok. I have a TIntegerArray, is there any way I can have it in a For..To..Do loop from the first integer to the last in order? I did a quick look through the WizzyPlugin, nothing caught my eye…help?
for I := to High(IntArr) do
//stuff2010-01-29 19:35:25
WayDrop1 := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
WayDrop2 := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
WayDrop3 := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
WayDrop4 := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
WayDrop5 := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];Each integer representing an InvBox. I tryed this: Case Random(5) Of
0: Begin
L := Low(WayDrop1);
H := High(WayDrop1);
End;
1: Begin
L := Low(WayDrop2);
H := High(WayDrop2);
End;
2: Begin
L := Low(WayDrop3);
H := High(WayDrop3);
End;
3: Begin
L := Low(WayDrop4);
H := High(WayDrop4);
End;
4: Begin
L := Low(WayDrop5);
H := High(WayDrop5);
End;
End; For I := L To H Dobut it does it in order from the first to the last (eg, if the array starts with 4 and ends with 8, it does 4, 5, 6, 7, 8 instead of 4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22, 27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8)2010-01-29 19:44:40
case Random(5) of
0: WayDrop := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
1: WayDrop := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
2: WayDrop := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
3: WayDrop := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
4: WayDrop := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
end;2010-01-29 19:56:46
From: IceFire908
case Random(5) of
0: WayDrop := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
1: WayDrop := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
2: WayDrop := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
3: WayDrop := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
4: WayDrop := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
end;
Much easier IMO, even better ways to do it than that even… this one is pretty suited for your use though. I think SRL has drop patterns though you could use… not entirely sure about that one…
2010-01-29 20:05:37
From: bionicle1800
Yes it does, but i ask you this. if everyone uses these drop patterns in their script, it would seem kind of suspicious, don't you think? :)
Anyway, thanks, I got it working(well compiled, testing it now) :p
I'd rep you, but it says i need to spread some around first :/
var
WayDrop: array [0..4] of TIntegerArray;
Index, I: Byte;
begin
WayDrop[0] := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
WayDrop[1] := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
WayDrop[2] := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
WayDrop[3] := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
WayDrop[4] := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
Index := Random(5);
for I := 0 to High(WayDrop[Index]) do
WriteLn(WayDrop[Index][I]);
end.function IArr(IA: TIntegerArray): TIntegerArray;
begin
Result := IA;
end;
var
WayDrop: T2DIntegerArray;
Index, I: Byte;
begin
WayDrop := [IArr([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28]), IArr([1, 5, 9, 13, 17, 21, 25, 2,
6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27, 4, 8, 12, 16, 20, 24,
28]), IArr([1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11,
15, 19, 23, 27, 28, 24, 20, 16, 12, 8, 4]), IArr([4, 3, 8, 2, 7, 12, 1,
6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13, 18, 23, 28, 17, 22, 27, 21,
26, 25]), IArr([4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25,
17, 22, 27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8])];
Index := Random(Length(WayDrop));
for I := 0 to High(WayDrop[Index]) do
WriteLn(WayDrop[Index][I]);
end.2010-01-29 20:43:48
Begin
If Not LoggedIn Then
Exit;
If Not GameTab(Tab_Inv) Then
GameTab(Tab_Inv);
Case Random(5) Of
0: WayDrop := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
1: WayDrop := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
2: WayDrop := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
3: WayDrop := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
4: WayDrop := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
End;
For I := 0 To 27 Do
Begin
LogInv := InvBox(WayDrop[I]);
If FindDTM(Log, X, Y, LogInv.X1, LogInv.Y1, LogInV.X2, LogInv.Y2) Then
Begin
//all the dropping stuff2010-01-29 22:01:27
From: IceFire908You do not need the IArr function..you can just use:
True, in-case you feel like being OCD:
Code:
[LEFT]var
WayDrop: array [0..4] of TIntegerArray;
Index, I: Byte;
begin
WayDrop[0] := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
WayDrop[1] := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
WayDrop[2] := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
WayDrop[3] := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
WayDrop[4] := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
Index := Random(5);
for I := 0 to High(WayDrop[Index]) do
WriteLn(WayDrop[Index]);
end.
[/LEFT]
Or just plain stupid like me:
Code:
[LEFT]function IArr(IA: TIntegerArray): TIntegerArray;
begin
Result := IA;
end;
var
WayDrop: T2DIntegerArray;
Index, I: Byte;
begin
WayDrop := [IArr([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28]), IArr([1, 5, 9, 13, 17, 21, 25, 2,
6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27, 4, 8, 12, 16, 20, 24,
28]), IArr([1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11,
15, 19, 23, 27, 28, 24, 20, 16, 12, 8, 4]), IArr([4, 3, 8, 2, 7, 12, 1,
6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13, 18, 23, 28, 17, 22, 27, 21,
26, 25]), IArr([4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25,
17, 22, 27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8])];
Index := Random(Length(WayDrop));
for I := 0 to High(WayDrop[Index]) do
WriteLn(WayDrop[Index]);
end.
[/LEFT]
Maybe some math rhythm?… but I'm too lazy :-P
var
WayDrop: T2DIntegerArray;
Index, I: Byte;
begin
WayDrop := [TIntegerArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28]), TIntegerArray([1, 5, 9, 13, 17, 21, 25, 2,
6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27, 4, 8, 12, 16, 20, 24,
28]), TIntegerArray([1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11,
15, 19, 23, 27, 28, 24, 20, 16, 12, 8, 4]), TIntegerArray([4, 3, 8, 2, 7, 12, 1,
6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13, 18, 23, 28, 17, 22, 27, 21,
26, 25]), TIntegerArray([4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25,
17, 22, 27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8])];
Index := Random(Length(WayDrop));
for I := 0 to High(WayDrop[Index]) do
WriteLn(WayDrop[Index][I]);
end.
2010-01-30 06:51:54
From: bionicle1800
Actually i simply did:Begin
If Not LoggedIn Then
Exit;
If Not GameTab(Tab_Inv) Then
GameTab(Tab_Inv);
Case Random(5) Of
0: WayDrop := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28];
1: WayDrop := [1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15,
19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
2: WayDrop := [1, 5, 9, 13, 17, 21, 25, 26, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15,
19, 23, 27, 28, 24, 20, 16, 12, 8, 4];
3: WayDrop := [4, 3, 8, 2, 7, 12, 1, 6, 11, 16, 5, 10, 15, 20, 9, 14, 19, 24, 13,
18, 23, 28, 17, 22, 27, 21, 26, 25];
4: WayDrop := [4, 2, 7, 12, 5, 10, 15, 20, 13, 18, 23, 28, 21, 26, 25, 17, 22,
27, 9, 14, 19, 24, 1, 6, 11, 16, 3, 8];
End;
For I := 0 To 27 Do
Begin
LogInv := InvBox(WayDrop[I]);
If FindDTM(Log, X, Y, LogInv.X1, LogInv.Y1, LogInV.X2, LogInv.Y2) Then
Begin
//all the dropping stuff
2010-01-30 07:45:23
2010-01-30 11:36:47