domingo, 5 de junho de 2011

Slime Trainer

Padrão Slime Trainer

init start
    local mother
    local dist 
-- é o mínio de distância que o slime deve estar longe de vocêit is the minimum distance the slime must be from youútil para treinar paladinos
    local killmother 
= {dmg 50hppc 40now false} -- vai matar a slime mãe se der mais de 50 de dano em você ou se você tiver menos de 40% do hp.
    
setsetting('Hud/DisplaysList/ActiveHotkeys/Enabled','yes')init end

auto
(100,500)
if 
not mother then
    
if $followed.name == 'Slime' then
        mother 
$followed
    
else
        
listas('Dê Follow a slime mae para começar a treinar')
    
endelse
    if 
mother.hppc == 0 then
        mother 
nil
        killmother
.now false
        
return
    
end
    local toattack
    
foreach creature m 'sm' do
        
local closest 7
        
if m.name == 'Slime' and ~= mother and m.dist <= dist and m.dist closest and m.isshootable then
            closest 
m.dist
            toattack 
m
        end
    end
    
if not killmother.now then
        
if toattack then
            listas
('Matando um summon de slime (clone)')
            if 
$attacked ~= toattack then attack(toattackwait(500,600end
        
else
            
listas('Esperando por um summon de slime (clone)')
        
end
    
else
        
listas('Matando a slime mãe')
        if 
$attacked ~= mother then attack(motherwait(500,600end
    end
end
if not killmother.now then
    
foreach newmessage m do
        if 
m.type == MSG_STATUSLOG then
            
if m.content:sub(1,8) == 'You lose' then
                local dmg 
tonumber(m.content:token(3))
                
local length m.content:len()
                
local name m.content:sub(length-6,length-1)
                if 
name == 'slime' and dmg killmother.dmg then
                    killmother
.now true
                end
            end
        end
    end
    
if $hppc killmother.hppc then
        killmother
.now true
    end
end 

Um comentário: