Ir para conteúdo
  • 0

Mob sangra Gold / Monster bleeds gold


ambrosiotibia

Pergunta

Olá, preciso de ajuda para criar um monstro.

Ele seria um monstro que dropa gold no chão toda vez que toma um hit ao invés de sangrar.
99% de dropar 0-10 gold coin
01% de dropar 0-5 platinum coin

 

Por exemplo um goblin, toda vez que ele apanhar, vai "sangrar" gold no chão e além disso ele droparia outros loots se morrer.

 

Muito obrigado

 

------------------------ English -------------------------------------

 

Hello, I need help creating a monster.

He would be a monster that drops gold on the ground every time he takes a hit instead of bleeding.

99% chance to drop 0-10 gold coin

01% chance to drop 0-5 platinum coin

 

For example a goblin, every time he gets hit, he will "bleed" gold on the ground and in addition he would drop other loots if he dies.

 

Thanks.

Editado por ambrosiotibia
colocando em inglês
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Melhor não fazer da forma que você pediu, porque alguém pode colocar uma knife e bater em full def pra dar apenas 1 de dano e dropar gold ou platinum.

A maneira mais segura, é fazer com que a quantidade de gold dropada, seja equivalente à quantidade de vida perdida:

local mType = Game.createMonsterType("Treasure Bandit")
local monster = {}

monster.description = "a treasure bandit"
monster.experience = 600
monster.outfit = {
    lookType = 129,
    lookHead = 58,
    lookBody = 40,
    lookLegs = 24,
    lookFeet = 95,
    lookAddons = 0,
    lookMount = 0
}

monster.raceId = 223
monster.Bestiary = {
    class = "Human",
    race = BESTY_RACE_HUMAN,
    toKill = 500,
    FirstUnlock = 25,
    SecondUnlock = 250,
    CharmsPoints = 5,
    Stars = 2,
    Occurrence = 0,
    Locations = "Pode ser encontrado nas redondezas de Mortland."
}

monster.health = 1200
monster.maxHealth = 1200
monster.race = "blood"
monster.corpse = 18050
monster.speed = 180
monster.manaCost = 450

monster.changeTarget = {
    interval = 5000,
    chance = 0
}

monster.strategiesTarget = {
    nearest = 30,
    health = 10,
    damage = 10,
    random = 50,
}

monster.flags = {
    summonable = false,
    attackable = true,
    hostile = true,
    convinceable = false,
    pushable = false,
    rewardBoss = false,
    illusionable = true,
    canPushItems = true,
    canPushCreatures = true,
    staticAttackChance = 90,
    targetDistance = 4,
    runHealth = 240,
    healthHidden = false,
    isBlockable = false,
    canWalkOnEnergy = true,
    canWalkOnFire = true,
    canWalkOnPoison = true
}

monster.light = {
    level = 0,
    color = 0
}

monster.voices = {
    interval = 6000,
    chance = 10,
    { text = "Não fui eu!", yell = false },
    { text = "Tente me pegar!", yell = false }
}

monster.loot = {
    { name = "gold coin", chance = 83940, maxCount = 40 }, --
    { name = "platinum coin", chance = 29900, maxCount = 2 }, --
    { name = "meat", chance = 12350 }, --
    { name = "rope belt", chance = 4110 }
}

monster.attacks = {
    { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -68 },
    { name = "combat", interval = 3000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -80,
        range = 7, shootEffect = CONST_ANI_SPEAR, target = false }
}

monster.defenses = {
    defense = 25,
    armor = 20
}

monster.elements = {
    { type = COMBAT_PHYSICALDAMAGE, percent = 5 },
    { type = COMBAT_ENERGYDAMAGE, percent = 10 },
    { type = COMBAT_EARTHDAMAGE, percent = 10 },
    { type = COMBAT_FIREDAMAGE, percent = 0 },
    { type = COMBAT_LIFEDRAIN, percent = 0 },
    { type = COMBAT_MANADRAIN, percent = 0 },
    { type = COMBAT_DROWNDAMAGE, percent = 0 },
    { type = COMBAT_ICEDAMAGE, percent = -10 },
    { type = COMBAT_HOLYDAMAGE, percent = 0 },
    { type = COMBAT_DEATHDAMAGE, percent = -5 }
}

monster.immunities = {
    { type = "paralyze", condition = false },
    { type = "outfit", condition = false },
    { type = "invisible", condition = false },
    { type = "bleed", condition = false }
}

local maxHealth = monster.maxHealth
local aux = maxHealth
mType.onThink = function(monster, interval)
    local health = monster:getHealth()
    if aux > health then
        Game.createItem(2448, (maxHealth - health), monster:getPosition())
        aux = health
    end
end

mType:register(monster)

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...