Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
Kod PHP:
Const
MonsterToShoot = 'Giant Spider'
Rune_ID = 3198
KeyToRelease = 88
function GetCreatureByName(Name:String): TCreature;
begin
UpdateWorld;
for x := 0 to Creatures.Count - 1 do
begin
UpdateWorld;
if Creatures.Creature[x].Z = Self.Z then
if Creatures.Creature[x].Name = Name then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
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 Shoot;
begin
UpdateWorld;
Creature := GetCreatureByName(MonsterToShoot);
if Creature <> nil then
Self.Containers.UseItemWithCreature(Rune_ID,Creature);
else Self.DisplayText('A ' + MonsterToShoot + ' wasnt found on the screen.');
end;
procedure Event_KeyUp(Key:Integer);
begin
if Key = KeyToRelease then
begin
UpdateWorld;
case Self.Direction of
0:
begin
Z := Self.Z;
repeat
Self.MoveUp;
sleep(1000);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
Shoot;
Z := Self.Z;
repeat
Self.MoveDown;
sleep(200);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
end;
1:
begin
Z := Self.Z;
repeat
Self.MoveRight;
sleep(1000);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
Shoot;
Z := Self.Z;
repeat
Self.MoveLeft;
sleep(200);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
end;
2:
begin
Z := Self.Z;
repeat
Self.MoveDown;
sleep(1000);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
Shoot;
Z := Self.Z;
repeat
Self.MoveUp;
sleep(200);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
end;
3:
begin
Z := Self.Z;
repeat
Self.MoveLeft;
sleep(1000);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
Shoot;
Z := Self.Z;
repeat
Self.MoveRight;
sleep(200);
UpdateWorld;
until (Z <> Self.Z) or (Terminated = true);
end;
end; // end of the case.
sleep(500);
end;
end;
while not terminated do
begin
UpdateWorld;
ProcessEvents;
Sleep(300);
end;
Zakładki