const
delay = 0.1 // delay to wait between shooting HMMs on the Ghost.
MonsterName = 'Hydra'
MinHP = 0 // if YOU have under this HP you will not shoot HMM.
MonsterHP = 50 // if MONSTER has this % of HP or less it will not shoot on it.
RuneID = 3155 // enter the ID of the rune you want to shoot
function GetCreatureByName(Name: string): TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
begin
if x >= Creatures.Count then Break;
if Creatures.Creature[x].Name = Name then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
procedure Attack(Name:string);
var
Player:TCreature;
x:integer;
begin
updateworld;
Monster :=GetCreatureByName(Name);
if monster <> nil then
if Self.Health>MinHp then
begin
Self.Containers.UseItemWithCreature(RuneID, Monster);
updateworld;
end
end;
while not terminated do
begin
Yes := false;
UpdateWorld;
for i := 0 to creatures.Count - 1 do
begin
if creatures.Creature[i].Z = Self.Z then
If Creatures.Creature[i].Name = MonsterName then
begin
Yes := true;
repeat
Attack(MonsterName);
Sleep(Delay * 1000);
UpdateWorld;
for g := 0 to creatures.Count -1 do
begin
if creatures.Creature[i].Z = Self.Z then
If Creatures.Creature[i].Name = MonsterName then
Yes := True else Yes := false; else yes := false;
end;
until Yes = false;
end;
sleep(100);
end;
Sleep(100);
end;
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}