Kod PHP:
const
SpearID = 3277 ;//make sure its the right id of regular spear.
ManaNeed=350;
SpellName='Exeta Con';
procedure CastSpell(Spell: string);
begin
UpdateWorld;
for x := 0 to Self.Containers.Count - 1 do
begin
for y := 0 to Self.Containers.Container[x].Count-1 do
begin
if Self.Containers.Container[x].Item[y].ID = SpearID then
begin
repeat
Self.Containers.Container[x].Item[y].MoveToBody(Self.RightHand, 1);
Sleep(1000);
UpdateWorld;
until Self.RightHand.ID = SpearID;
Self.Say(Spell);
repeat
Sleep(1000);
UpdateWorld;
until Self.RightHand.ID <> SpearID;
Self.RightHand.MoveToContainer(Self.Containers.Container[x], y, 0);
Exit;
end;
end;
end;
end;
procedure StackItems;
var
T: array of integer;
x, y, z: integer;
Temp: integer;
begin
T := VarArrayCreate([0, 19] , 3);
Temp := -1;
for x := 0 to Self.Containers.Count - 1 do
begin
if x >= Self.Containers.Count then Break;
for z := 0 to Self.Containers.Container[x].Count - 1 do
begin
T[z] := Self.Containers.Container[x].Item[z].ID;
end;
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].Properties.Pilable then
begin
if Self.Containers.Container[x].Item[y].Amount < 100 then
begin
for z := y + 1 to Self.Containers.Container[x].Count - 1 do
begin
if T[z] = Self.Containers.Container[x].Item[y].ID then
begin
if Self.Containers.Container[x].Item[z].Amount < 100 then
begin
Self.Containers.Container[x].Item[y].movetocontainer(Self.Containers.Container[x], z, 0);
end;
end;
end;
end;
end;
end;
end;
end;
begin
while not terminated do
begin
updateworld;
StackItems;
If (self.Mana>=ManaNeed) then
begin
repeat
Self.RightHand.MoveToBody(Self.Arrow,0);
sleep(1000);
updateworld;
until(Self.RightHand.ID=0);
CastSpell(SpellName);
sleep(1000);
updateworld;
Self.Arrow.MoveToBody(Self.RightHand,0);
end;
sleep(1000);
end;
end;
Wystarczy poszukać na forum oficjalnej strony... Tak trudno?