PHP Kod:
*
* The Annihilator Annihilator v0.0.2, by Toor
*
* This script is intended to be used at the Annihilator quest. Succes is
* not guaranteed. Use it at your own risk. All you have to do is to change
* the settings below. It will automatically change SSA's and might rings
* if you want it to. It will automatically attack the first demon, and
* after it's dead the second demon with the weapon of your choice.
*
* Note that you need to open ALL bps you have items in you wish to use.
* To open a lot of backpacks first open your main backpack. Minimize your
* equipment window. Open all needed backpacks in a new window and minimize
* them. Finally, minimize your main backpack.
*
* This script has been tested. It will change weapons/rings/amulets AND heal.
* Let me know if you encounter any problems.
*
*)
const
MightRing_ID = 3048;
Elven_ID = 3082;
StoneSkin_ID = 3081;
IceRapier_ID = 3284;
UH_ID = 3160;
(* BEGIN CONFIGURATION SECTION *)
use_might = 1; // Use might rings. Change to 1 if you use them.
use_ssa = 0; // Use stone skin amulets. Change to 1 if you use them.
use_elven = 0; // Use elven amulets. Change to 1 if you use them.
use_ice = 1; // Use ice rapiers. Change to 1 if you use them.
use_left = 0; // Use left hand for weapons
use_right = 1; // Use right hand for weapons
(* END OF CONFIGURATION SECTION - DO NOT CHANGE ANYTHING BELOW! *)
Function GetItemFromOpenBackpack(ID: integer): TItem;
var
x: integer;
y: integer;
begin
Result := nil;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if y >= Self.Containers.Container[x].Count then Break;
if Self.Containers.Container[x].Item[y].ID = ID then
begin
Result := Self.Containers.Container[x].Item[y];
Exit;
end;
end;
end;
end;
Procedure CheckDemons;
var
int demons;
begin
demons := 0;
for x := 0 to Creatures.Count - 1 do
begin
if x >= Creatures.Count then Break;
if (Creatures.Creature[x].Name = 'Demon') then
begin
demons := demons + 1;
// If there's 5 demons left, one demon is down. Locate the blocking demon and keal him.
// If there's 6, attack the first demon.
if demons = 5 then begin
if (Creatures.Creature[x].X = 33223 or Creatures.Creature[x].X = 33224) and (Creatures.Creature[x].Attacking = False) then Creatures.Creature[x].Attacking := True;
end
else if demons = 6 then begin
if (Creatures.Creature[x].X = 33223) and (Creatures.Creature[x].Attacking = False) then Creatures.Creature[x].Attacking := True;
end;
end;
end;
end;
Procedure CheckSelf;
begin
CheckDemons;
// Moves a might ring to the ring spot if it's empty.
if use_might then
begin
if Self.Ring.ID <> MightRing_ID then
begin
Ring := GetItemFromOpenBackpack(MightRing_ID);
if Ring <> nil then Ring.MoveToBody(Self.Ring,0);
sleep(100);
end;
end;
if use_ssa then
begin
if Self.Amulet.ID <> StoneSkin_ID then
begin
Amulet := GetItemFromOpenBackpack(StoneSkin_ID);
if Amulet <> nil then Amulet.MoveToBody(Self.Amulet,0);
sleep(100);
end;
end
else
begin
if use_elven then
begin
if Self.Amulet.ID <> Elven_ID then
begin
Amulet := GetItemFromOpenBackpack(Elven_ID);
if Amulet <> nil then Amulet.MoveToBody(Self.Amulet,0);
sleep(100);
end;
end;
end;
if use_ice then
begin
if Self.RightHand.ID <> IceRapier_ID then
begin
Rapier := GetItemFromOpenBackpack(IceRapier_ID);
if use_right then
begin
if Rapier <> nil then Rapier.MoveToBody(Self.RightHand, 0);
sleep(100);
end
else
begin
if Rapier <> nil then Rapier.MoveToBody(Self.LeftHand, 0);
sleep(100);
end;
end;
end;
Rune := GetItemFromOpenBackpack(UH_ID);
if Rune <> nil then
begin
Rune.UseWithGround(Self.X, Self.Y, Self.Z);
Sleep(100);
end;
end;
While not Terminated do
begin
UpdateWorld;
CheckSelf;
Sleep(1000);
end;