Ir para conteúdo

Featured Replies

Postado
Const

MonstersNames = ['Dragon', 'Dragon Lord']; //Nome dos monstros
NumberOfMonsters = 4; //quantidade de monstros
MinHealth = 800; //quanto de vida voce tem que estar, acima disso
MinMana = 150; //mana que precisa pra usar

function CountMonstersBesideYou:Integer;
begin
Result := 0;
UpdateWorld;
for i := 0 to creatures.Count -1 do
begin
if i >= Creatures.Count then break
for x := -1 to 1 do
begin
if x >= 2 then break
for y := -1 to 1 do
begin
if y > 1 then break;
if Creatures.Creature.NPC then
if (Creatures.Creature.x = Self.X +x) and (Creatures.Creature.y = Self.y + y) then
begin
for G := low(MonstersNames) to high(MonstersNames) do
begin
if Creatures.Creature.Name = MonstersNames[G] then
Result := Result + 1;
end;
end;
end;
end;
end;
end;
while not terminated do
begin
UpdateWorld;
if CountMonstersBesideYou >= NumberOfMonsters then
if Self.Mana >= MinMana then
if Self.Health > MinHealth then
Self.Say('exori');
sleep(100);
end;
Créditos: ngmax
  • 4 months later...
Postado

[Error] Untitled(21): Invalid array indexing for property 'Creature'. Expected 1 dimensions

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo