NG Phorum

Forum o bocie TibiaNG oraz ElfBotNG


#1 2009-05-02 12:00:39

Admin

Administrator

Zarejestrowany: 2009-04-02
Posty: 24
Punktów :   

Leczenie na huntach - Druid

Klikamy Follow na kolege i gdy ten będzie miał mniej niż 50 % Hp skrypt będzie siochał.
Wystarczy dać Follow.

[hide]

Kod:

Const MiniCreatureHP =50; // if your firned has 50% of his hp it will heal..change it as you like it.
const ITEM_RUNE_UH = 3160;
// Follow first the friend you want to sio and then start script //
var
  Creature: TCreature;
  CreatureName: string;
 
function IsCreatureVisible(Name: string): boolean;
var
  x: integer;
begin
  Result := False;
  for x := 0 to Creatures.Count - 1 do
  begin
    if x >= Creatures.Count then Break;
    if Creatures.Creature[x].Name = Name then
    begin
      if Creatures.Creature[x].Visible then
      begin
        Result := True;
        Exit;
      end;
    end;
  end;
end; 

function GetFollowedCreature: 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].Following then
    begin
      Result := Creatures.Creature[x];
      Exit;
    end;
  end;
end;

begin
  UpdateWorld;
  Creature := GetFollowedCreature;
  while not Terminated do
  begin
    UpdateWorld;
       If Creature<> nil then
       If IsCreatureVisible(Creature.Name) then
      begin
      if ((Creature.Health) <(MiniCreatureHP)) and ((Self.Mana)>(70)) then
      Self.Say('exura sio "'+ Creature.Name) //name of friend
       else
       if ((Creature.Health) <(MiniCreatureHP)) then Self.Containers.UseItemWithCreature(ITEM_RUNE_UH, Creature);
       end;
      Sleep(1000);
   end;
   
end; [/hide]

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.bulletsofpain.pun.pl www.gossip-girl.pun.pl www.cll.pun.pl www.zawada.pun.pl www.nutriolandia.pun.pl