Ir para conteúdo

leomacedin

Membro
  • Registro em

  • Última visita

Tudo que leomacedin postou

  1. .Qual servidor ou website você utiliza como base? OTserver-BR Qual o motivo deste tópico? Fala pessoal beleza? Gostaria de saber se é possivel colocar 2 monsters.events no mesmo monster.xml monster.events = { "LeidenHeal" } Como queria colocar monster.events = { "LeidenHeal", "LeidenDead" } eu criei uma função onde quando o boss leiden morrer nascer o boss principal, porem ja tem um evento setado ao leiden que é "LeidenHeal" e são duas funções diferentes. LeidenHeal = function leidenHeal.onHealthChange LeidenDead = function leidenDeath.onDeath vou postar os scripts abaixo com as duas funções e o monster.xml Scripts criados em REVSCRIPT Você tem o código disponível? Se tiver publique-o aqui: CREATURESCRIPT.XML local leidenHeal = CreatureEvent("LeidenHeal") function leidenHeal.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) if creature:getName():lower() == "leiden" then if attacker and attacker:isPlayer() then primaryType = COMBAT_HEALING secondaryType = primaryType if primaryDamage < 0 then primaryDamage = primaryDamage * -1 end secondaryDamage = primaryDamage creature:addHealth(primaryDamage < 0 and -primaryDamage or primaryDamage) return primaryDamage, primaryType, secondaryDamage, secondaryType end end end leidenHeal:register() local leidenDeath = CreatureEvent("LeidenDead") function leidenDeath.onDeath(creature, corpse, deathList) local pool = Tile(creature:getPosition()):getItemById(2016) if pool then pool:remove() end Game.createMonster("bug", creature:getPosition(), true, true) end leidenDeath:register() LEIDEN.XML local mType = Game.createMonsterType("Leiden") local monster = {} monster.description = "Leiden" monster.experience = 0 monster.outfit = { lookType = 988, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0, lookMount = 0 } monster.health = 30000 monster.maxHealth = 30000 monster.race = "blood" monster.corpse = 0 monster.speed = 240 monster.manaCost = 390 monster.maxSummons = 2 monster.changeTarget = { interval = 4000, chance = 20 } monster.strategiesTarget = { nearest = 70, health = 10, damage = 10, random = 10, } monster.flags = { summonable = true, attackable = true, hostile = true, convinceable = true, pushable = false, rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = true, staticAttackChance = 95, targetDistance = 1, runHealth = 0, healthHidden = false, isBlockable = false, canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, pet = false } monster.events = { "LeidenHeal" } monster.light = { level = 0, color = 0 } monster.summons = { {name = "Barkless Fanatic", chance = 20, interval = 2000}, {name = "Barkless Fanatic", chance = 30, interval = 2000} } monster.voices = { interval = 5000, chance = 10, {text = "Bring me the pain! Make me suffer!", yell = false} } monster.loot = { } monster.attacks = { {name ="melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400} } monster.defenses = { defense = 50, armor = 35 } monster.reflects = { {type = COMBAT_PHYSICALDAMAGE, percent = 100}, {type = COMBAT_ENERGYDAMAGE, percent = 100}, {type = COMBAT_EARTHDAMAGE, percent = 100}, {type = COMBAT_FIREDAMAGE, percent = 100}, {type = COMBAT_LIFEDRAIN, percent = 100}, {type = COMBAT_MANADRAIN, percent = 100}, {type = COMBAT_DROWNDAMAGE, percent = 100}, {type = COMBAT_ICEDAMAGE, percent = 100}, {type = COMBAT_HOLYDAMAGE , percent = 100}, {type = COMBAT_DEATHDAMAGE , percent = 100} } monster.elements = { {type = COMBAT_PHYSICALDAMAGE, percent = 100}, {type = COMBAT_ENERGYDAMAGE, percent = 0}, {type = COMBAT_EARTHDAMAGE, percent = 0}, {type = COMBAT_FIREDAMAGE, percent = 0}, {type = COMBAT_LIFEDRAIN, percent = 0}, {type = COMBAT_MANADRAIN, percent = 0}, {type = COMBAT_DROWNDAMAGE, percent = 0}, {type = COMBAT_ICEDAMAGE, percent = 0}, {type = COMBAT_HOLYDAMAGE , percent = 0}, {type = COMBAT_DEATHDAMAGE , percent = 0} } monster.immunities = { {type = "paralyze", condition = false}, {type = "outfit", condition = false}, {type = "invisible", condition = false}, {type = "bleed", condition = false} } mType:register(monster)
  2. Pode me dar um exemplo de como usar? Consegui resolver local leidenDeath = CreatureEvent("LeidenDead") function leidenDeath.onDeath(creature, corpse, deathList) local pool = Tile(creature:getPosition()):getItemById(2016) if pool then pool:remove() end Game.createMonster("bug", creature:getPosition(), true, true) end leidenDeath:register()
  3. Fala pessoal beleza? Queria um script onde um bixo morre e nasce o boss em um local X da sala, alguém pode me ajudar. Utilizo a tfs 1.3,l servidor 12x Qual o motivo deste tópico? Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  4. leomacedin respondeu ao post em um tópico de Magalhaes92 em Suporte Tibia OTServer
    Perdão, não sabia. Não conseguirá criar um para nova versão?
  5. leomacedin respondeu ao post em um tópico de Magalhaes92 em Suporte Tibia OTServer
    meu servidor esta em Revscript tfs 1.3 codigo esta abaixo
  6. leomacedin respondeu ao post em um tópico de Magalhaes92 em Suporte Tibia OTServer
    Conseguiu fazer? se sim posta aip por favor? também queria um script assim Ta dando esse erro https://prnt.sc/10bqxlw
  7. Fala mano beleza? nesse seu script na mensagem de contar os kills e exibir para os players não esta funcionando, você pode me ajudar? kill = "Voce ja matou {%d} %s do evento.", Os anuncions de quando inicia o evento etc.. esta funcionando, porem quando eu mato os bixos não aparece o contador Meu server é em RevScripts caso você entenda e possa me ajudar esse é o meu xml

Informação Importante

Confirmação de Termo