Forums TibiaBR BOT: X Arma se for atacado por PK - Forums TibiaBR BOT

Jump to content

Bem Vindo

Bem vindo ao Fórum TibiaBrBot, como a maioria das comunidades on-line você deve registar-se para ver ou postar em nossa comunidade, mas não se preocupe este é um processo simples, que requer o mínimo de informação. Aproveite-a imediatamente, Cadastre-se agora ou Efetue o Login! CADASTRE-SE or ACESSE SUA CONTA.

  • Participação total no TibiaBrBot, como Criar Tópicos e Responde-los
  • Inscrever-se para temas e fóruns para obter atualizações automáticas
  • Downloads Ilimitados de Bots, Scripts, Waypoints e muito mais
  • Conheça novas pessoas
  • Compartilhe seu conhecimento com outras pessoas
Guest Message © 2010 DevFuse
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

X Arma se for atacado por PK

#1 User is offline   EdsonJunior ;* 

  • Vip Since: 17/08/2010 - First (y)
  • Group: [V] VIP
  • Posts: 362
  • Joined: 24-February 10
  • Sexo:
    Masculino
  • Localização:
    Goiânia - Go
Reputation: 39
Boa

Posted 30 July 2010 - 09:53 AM

 Const 
WeaponID = 3302 // Enter the strong weapon ID, In your case, dragon lance.... 

function GetCreatureByID(IID:integer):TCreature; 
begin 
Result := nil; 
updateworld; 
for G:= 0 to Creatures.count -1 do 
begin 
If Creatures.Creature[G].ID = IID 
then Result := Creatures.Creature[G]; 
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 event_attacked(ID:string); 
Var 
Creature:TCreature; 
R,L,DLance:TItem; 
Container:TContainer; 
begin 
Creature := GetCreatureByID(ID); 
if Creature <> nil then 
if Self.RightHand.ID <> WeaponID then 
begin 
UpdateWorld; 
Container := Self.Containers.Container[0]; 
DLance:= GetItemFromOpenBackpack(WeaponID); 
if DLance <> nil then 
DLance.MoveToBody(Self.RightHand, 0); 
Self.Offensive; 
Creature.Attacking := True; 
end; 
end; 

While not terminated do 
begin 
UpdateWorld; 
ProcessEvents; 
Sleep(100); 
end;  

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)