Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''pet''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 14 registros

  1. Gostaria de fazer um pedido simples (espero que seja simples) um Pet System (Mas tem vários no site), não achei nenhum (se já tiver, manda link que eu removo o tópico) Direto ao assunto: o pet system tem que ser parecido com um pet na vida real, ele fica na house, independente do player estar ou não online, e temos que alimentar ele com X item (configurável), ele nao ataca ninguem, não sai da house, ele apenas fica em casa e come (vida boa)
  2. Bom, eu tenho um sistema de Pet aqui, como funciona? O player clica no item, e o Pet nasce. Mas tem um problema, eu queria que quando o player for summonar o Pet, aparecesse uma msg, dizendo "Venha me ajudar" e que quando o player não precisar mais do Pet, ele clicar novamente e o Pet sumisse, e aparecesse outra msg "não preciso mais de você". Alguém poderia me ajudar? aqui está meu script de Pet:
  3. Servidor: nto 8.54 (não sei exatamente qual a origem, estou editando do completamente) Nivel: manjo um pouco em cada coisa Tipo de script: acho que é em creaturevent Pessoal eu to querendo criar um sistema de pet, em que tenho a função 100% porem, ele é como se fosse um summon, queria que quando esse pet fosse invocado os players n possam ataca-ló, nem quem invocou nem os outros, e tbm os monstros, se possível, se precisar mexer com as sources eu tenho. REP+
  4. Bom gente, agradeço desde já. Quero um sistem de PET, pode ser em MODs ou na pasta DATA do server mesmo.. Assim: Existiriam 2 tipos de PETs, os de distance e os que atacam em melee. Porém, existiriam 4 pets, e cada um para um level de player. X pet é para player level X+, Y pet é para player level Y+, Z pet é para player level Z+ e A pet é para player level A+. Eles upariam de level como os players, porém mais devagar, seu level máximo seria 30. Cada PET teria um "ovo", e para possuir o pet, o player deveria dar use no ovo do respectivo pet, ao dar use no ovo, ele sumiria, e você recebe a mensagem "parabéns, voce habilitou X pet.". Para dar use no ovo, o player deve ser X level+, leveis diferentes para cada ovo. Existiriam os seguintes comandos: Também existiria um NPC que revive o PET X se ele estiver "morto". Você fala: hi revive O npc pergunta qual pet você fala o nome, se você nao possuir ele, o npc fala que vc não tem, se não existir o nome, o npc fala que não existe esse pet. Para reviver ele, você precisaria de X item, ou X valor de coins. Ai depois você fala: yes ou no O player pode ter os 4 pets, mas ele teria que dar use no ovo de cada um. Então precisaria de X level para dar use em todos. Os PETs poderiam usar algumas magias que existissem no server, porém, somente 3 magias. 1 de healar, 1 de ataque em área, 1 de dano com target. A de healar, ele usasse quando a vida dele estivesse com menos de 70%, e a spell healaria dependendo do level do pet, uma porcentagem de life. A de dano em área, o player deveria usar o comando O look dos pets seriam definidos onde vocês quiserem! A cada level que o pet upa, eles ganhariam: X de life e Y de mana e Z de skill de dano. Como existem 4 pets, e cada um com um level, o ganho de life, mana e skill de dano de cada pet, seria configurado um por um, e não o mesmo para todos! Também coloquem algum lugar para configurar o dano, a life e a mana dos pets quando level 1. Se tiver faltando algo, eu edito o post! Se puderem, criem uma spell de healar especialmente para os PETs. Eu gostaria de marcar alguns membros aqui que talvez possam me ajudar, sem querer desmerecer NINGUÉM NO XT: @Night Wolf @zipter98 @luanluciano93 @fireelement @RigBy @Bruno Minervino @Kissy @MudrocK up
  5. Vamos ao que interessa, eu estava ali pedindo ajuda com 1 script, porém nenhum infeliz quiz me ajudar, e os que quizeram ajudar nao conseguiram... o script faz a seguinte função> ele summona o monstro configurado por você... tem exausted escolhida por você, e não pode usar em protectzone, não da erros no distro, você escolhe quantos monstros vai summonar, e você summona o monstro conforme o level! voce que escolhe que monstro aparecera até tal level... é simples o sistema mais ajuda muito quem tiver criatividade.. Proxima update: - Ultilizado por tal vocação {configuravel} - Inutilizavel em arena! vamos ao que interessa, crie um arquivo .lua escrito simplespet.lua na pasta data/actions/scripts do seu ot... e adicione isto dentro dela. Importante: no monstro configuravel tem que estar <flag convinceable="1"/> eu aconselho a tirar a runa que convence monstros do seu ot... ou dificultala para pegar e que seja consumida após o uso! obrigado, qualquer erro encontrato leia o topico novamente... e veja se os seus passos estao certos Enfim, após você acabar isto você vai até o arquivo data/actions/actions.xml e clica com o botao direito vai em editar e adicione 1 tag assim lá: voce decide que item voce colocara Quem quizer alterar o script e colokar outra versão atualizar adicionar algo pode postar que eu atualizo no topico com os creditos obrigado tchau
  6. Makelin1

    New Pet System

    Bom esse system que fiz não e grande coisa mais diferente (acho) bom vamos a ele Crie um arquivo lua em talkactions e coloque function onSay(cid , words, param) local textSay = {"Sim", "Não", "Talves", "Não] intendi vc poderia repetir?"} pet = { ["orc"]= {stor=78551,price=500}, ["troll"]= {stor=78552,price=300}, ["cyclops"]= {stor=78553,price=500}, ["lion"]= {stor=78554,price=300}, ["wolf"]= {stor=78555,price=500}, ["rat"]= {stor=78556,price=300}, ["demon"]= {stor=78557,price=500}, } param = string.lower(param) if words=="!buy" then if doPlayerRemoveMoney(cid,pet[param].price) then setPlayerStorageValue(cid,pet[param].stor,1) else doPlayerSendCancel(cid,"Sorry you no have money or buying pet") end end if words=="!pet" then if #getCreatureSummons(cid) < 1 and pet[param] and getPlayerStorageValue(cid,pet[param].stor) >= 1 then local x = doSummonCreature(param,getCreaturePosition(cid)) doConvinceCreature(cid, x) doCreatureSay(cid,"Go "..getCreatureName .."",TALKTYPE_ORANGE_1) else doPlayerSendCancel(cid,"sorry no have pet") end elseif words=="!remove" then if #getCreatureSummons(cid) > 0 then doRemoveCreature(getCreatureSummons(cid)[1]) doCreatureSay(cid,"Back My Monster",TALKTYPE_ORANGE_1) end elseif words=="!conversar" then if #getCreatureSummons(cid) > 0 then doCreatureSay(cid,textSay[math.random(#texteSay)],TALKTYPE_ORANGE_1) else doPlayerSendCancel(cid,"sorry no have pet summoned") end elseif words=="!fale" then doCreatureSay(getCreatureSummons(cid)[1],param,TALKTYPE_ORANGE_1) end return true end tag: <talkaction words="!pet;!remove;!fale;!conversar;!buy" event="script" value="arquivo.lua" /> !pet nome sumona monster !remove --remove pet !fala text --pet fala !conversar --ele fala uma palavra qualquer !buy nome do pet --compra pet Creditos Mulizeu Smartbox
  7. Ae pessoal! eu queria arruma meu pet system aki! ele pode sumonar quantos pet quiser! eu queria q só podesse sumonar 1 pet ate o antigo morrer! function onUse(cid, item, frompos, item2, topos) local MyCreature = doSummonCreature("super mac",topos) doConvinceCreature(cid, MyCreature) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end return 1 end Ajuda ae!!
  8. Tipo do script: Pet System Protocolo (versão do Tibia): 8.54 Servidor utilizado: TFS 0.3.6 Nível de experiência: Intermediario Adicionais/Informações: Um dia eu estava pensando oque fazer com os coulored eggs e com o hydra egg, que no meu ot estão sem função, entao pensei... que tal eles serem Pet Eggs e dropem de seus respectivos monstros (Hydra egg, dropar de hydra) e ao usar o ovo foce adcionado ao personagem o pet do respectivo ovo, esse pet poderia ser invocado e poder regressar para o personagem falando !pet < para retornar e ser invocado. Resumo: Seria usado um ovo, que ao ser usado desapareceria e adcionaria ao personagem um pet ja que são varios coloured eggs cada um tem que ser um pet, e se o pet morrer ter que falar !revive e pagar 20k para revivelo assim podendo usa-lo novamente, Coloured egg 1: Cave Rat Coloured egg 2: Wolf Coloured egg 3: Dragon Hatchiling Coloured egg 4: Dragon Lord Hatchiling Coloured egg 5: Frost Dragon Hatchiling Hydra egg : Hydra (aváh) Vamo ver quem é que vai conseguir fazer esse script.
  9. Bom! Para Começar , Presiso De Um Monstro Ou Melhor De 6 Monstros . 1ª Coisa === Holy Pet -------- Atk Holy >> Mesmo Se O Pet Não Esteja Encostando No Player Ele Fica Atackando De Loonge Se o Player Abrir Visão o PEt VAI Cola No Target e ATK .Tudo De HOLY OBS : o Addon Dele é Hunter Female Todo Amarelo 2ª Coisa === Energy Pet ---------- atk energy >> MEsma Coisa /\ Addon De Wizard Male Todo ROXO 3ª Coisa === Ice Pet ------------ Attk ICE >> Mesma Coisa Addon Nobleman Female Azul Claro 4ª Coisa === Terra Pet --------- Atk Terra >> ------------------ Addon Oriental Female Todo Verde Claro 5ª Coisa === Fire Pet --------- Atk Fire ->> ------------ Addon Mage Female Todo Vermelho Claro 6ª Coisa === Draug Pet ------- Atk Death >>>> Esse Eu Presiso Que Hite 1k500 Hite Mais e O Addon Vcs Ponhe Warrior Female as cores vcs que sabem Obss : Os Pet holy,terra,energy,fire,ice eles Hitem 800 de monstro 400 de player e o Draug 3k de Monstro 1k500 de PLayer gente Por Favorrrrrrr Arrumen Esses Monstro Estou Aqui Na Espera!!! 1244 Vodkart 760 Alissow 595 Subwat 577 Slicer 518 SkyDangerous 496 Doidin 445 Demonbholder 427 Henrique Moura 415 Oneshot 415 brun123 Por Favor Uns De Vcs Ajudem Aqui Outros Que Não Estão Nessa Lista Podem Me Ajudar Tbm Please +++++++++++++ REP +++++++++++
  10. Bom Espero Que Me Ajudem!! Porfavor ! 1 - eu quero 5 elementos de monstro 1 exp : Holy Pet 2 exp : Energy Pet 3 exp : Fire Pet 4 exp : Ice Pet 5 exp : Terra Pet 2 - Vou dexa um exemplo do 2exp do Energy Pet <?xml version="1.0" encoding="UTF-8"?> <monster name="Pet Energy" nameDescription="a Pet Energy" race="blood" experience="0" speed="2000" manacost="0">"] <health now="25000" max="25000"/> <look type="145" head="88" body="88" legs="88" feet="88" addons="3" corpse="6080"/> <targetchange interval="10000" chance="20"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="0" attack="0"/>"] <attack name="energy" interval="1000" chance="100" radius="0" target="6" min="-420" max="-425">"] <attribute key="shootEffect" value="energy"/> <attribute key="areaEffect" value="energyarea"/> </attack> </attacks> <defenses armor="25" defense="30"/> <elements> <element earthPercent="100"/> <element icePercent="100"/> <element firePercent="100"/> <element energyPercent="100"/> <element physicalPercent="100"/> <element deathPercent="100"/> <element holyPercent="100"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> quero assim ajeitem do modo correto pq esse ta errado e eu nao sei ajeitar do modo correto vamos lá! REP+ Peso Isso Principalmente ao Vodka Ajuda Aqui
  11. Bom Espero Que Me Ajudem!! Porfavor ! 1 - eu quero 5 elementos de monstro 1 exp : Holy Pet 2 exp : Energy Pet 3 exp : Fire Pet 4 exp : Ice Pet 5 exp : Terra Pet 2 - Vou dexa um exemplo do 2exp do Energy Pet <?xml version="1.0" encoding="UTF-8"?> <monster name="Pet Energy" nameDescription="a Pet Energy" race="blood" experience="0" speed="2000" manacost="0">"] <health now="25000" max="25000"/> <look type="145" head="88" body="88" legs="88" feet="88" addons="3" corpse="6080"/> <targetchange interval="10000" chance="20"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="0" attack="0"/>"] <attack name="energy" interval="1000" chance="100" radius="0" target="6" min="-420" max="-425">"] <attribute key="shootEffect" value="energy"/> <attribute key="areaEffect" value="energyarea"/> </attack> </attacks> <defenses armor="25" defense="30"/> <elements> <element earthPercent="100"/> <element icePercent="100"/> <element firePercent="100"/> <element energyPercent="100"/> <element physicalPercent="100"/> <element deathPercent="100"/> <element holyPercent="100"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> quero assim ajeitem do modo correto pq esse ta errado e eu nao sei ajeitar do modo correto vamos lá! REP+ Peso Isso Principalmente ao Vodka Ajuda Aqui
  12. TaurosBR

    Pet System

    Pessoal eu alguem tem 1 script q adiciona pet no ot! mais eu queria escolher o id do mostro q ia vira! e talves ate o attack!
  13. Boomm Vamos Ao Que Enteressa, Eu QUero Pedir Um Sistema De PEt Que Sejam 6 elementos De Pet Holy Pet --- Coloured Eggs o Amarelo Tera Pet --- Coloured Eggs o Verde Ice Pet --- Coloured Eggs o Azul Fire Pet --- Coloured Eggs o Vermelho Energy Pet --- Coloured Eggs o ROXO Phoenix Pet --- Coloured Eggs Do Branco Draug Pet --- Hydra Eggs Bom eu Quero Que De USE nos Eggs E Nasça O Pet. E Que Ele Seja Infinito Até Logar Ou MOrrer. Que Ele Se Teleport Até Se Vc Subir Uma Escada. Ela Va atraz,, Pra ela Nao Poder Ser Usado No PZ, e Quero Que Cada 1 Tenha, 1 ADDON tipo HOLY PET Hunter FUll Female Toda Amarela e assim os Addons, Devido A COr do Eggs Bom os Addons ´´e Com Vcs Presiso disse Mesmo POr Favor Me Ajudem URGENTEEEE Que Cada Player Possa Fazer 1 PET quero Que Ele Seja Imune A TUDO Presiso Disso Mesmo Me Ajudem Plz , Presiso Que Cada Um Dos Pet Hite Igual Ao Nome Deles Holy - Holy > Fire - Fire assim sussesivamente Vamosss La XTIBIA OBS : Coloquem Pra Cada Pet Hita 400 de PLayer POr ae e O Droug Pet Hita 2k e o Phoenix 600 e Ta bom REP+ pra quem AJUDA :S
  14. Nome do Script: Sistema de Pet com Evolução Tipo do Script: Lib Versão Utilizada:9.44 Servidor Utilizado:Crystal Server 2.3 Nível de Experiência:Intermediário Informações Extras: Desejo modificar esse script. Adicionar sistema de evolução. Ex:"Orc - LvL 10 - Orc Spearman - LVL 30 - Orc Warlord "Uma Semana De Rep+ Pra Quem Resolver" http://pastebin.com/1CxBj6CR --Circles AREA_CIRCLE2X2 = { {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {1, 1, 3, 1, 1}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0} } AREA_CIRCLE3X3 = { {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 3, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0, 0} } -- Crosses AREA_CROSS1X1 = { {0, 1, 0}, {1, 3, 1}, {0, 1, 0} } AREA_CROSS5X5 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} } AREA_CROSS6X6 = { {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0} } --Squares AREA_SQUARE1X1 = { {1, 1, 1}, {1, 3, 1}, {1, 1, 1} } -- Walls AREA_WALLFIELD = { {1, 1, 3, 1, 1} } AREADIAGONAL_WALLFIELD = { {0, 0, 0, 0, 1}, {0, 0, 0, 1, 1}, {0, 1, 3, 1, 0}, {1, 1, 0, 0, 0}, {1, 0, 0, 0, 0}, } emoteAttack = true petEmoteAttack = true refillStatsAtLevel = true TYPE_NEAR = 1 TYPE_DISTANCE = 2 petExhaust = 3 --in seconds petSayExhaust = 3 --in seconds petGainTicks = { health = {func = doCreatureAddHealth, time = 3000, count = 1}, mana = {func = doCreatureAddMana, time = 3000, count = 2} } petGainHealth = 30 petGainMana = 30 petExpRate = 1.3 carryItems = 10 petItemsBase = 1250 petItems = {} blockedItems = {6132, 2195} for i = 1, carryItems do table.insert(petItems, petItemsBase + i) end petBase = 6120 petStorages = { pet = petBase + 1000, level = petBase + 2000, exp = petBase + 3000, items = petBase + 4000, isPet = petBase + 5000, isDead = petBase + 6000, exhaust = petBase + 7000, sayExhaust = petBase + 8000, moveExhaust = petBase + 9000, health = petBase + 10000, mana = petBase + 11000, buyed = petBase + 12000 } tables = { pet = {}, level = {}, exp = {}, items = {}, isDead = {}, exhaust = {}, health = {}, mana = {}, buyed = {} } reviveCost = 1000 pets = { [1] = { monster = "orc spearman", vocations = {1, 2, 3, 4}, level = 30, attacks = { [1] = {name = "", level = 30, petLevel = 30, mana = 50, type = TYPE_DISTANCE, range = 10, combat = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_NONE, distEffect = CONST_ANI_SPEAR, damageMin = 0.7, damageMax = 1.0} } }, [2] = { monster = "fire devil", vocations = {1, 2}, level = 60, attacks = { [1] = {name = "Fire Strike", level = 60, petLevel = 60, mana = 100, type = TYPE_DISTANCE, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_FIREDAMAGE, distEffect = CONST_ANI_FIRE, damageMin = 1.5, damageMax = 2.0} } }, [3] = { monster = "minotaur guard", vocations = {3, 4}, level = 60, cost = 50, attacks = { [1] = {name = "Punch", level = 60, petLevel = 60, mana = 55, type = TYPE_NEAR, combat = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_BLOOD, distEffect = CONST_ANI_NONE, damageMin = 1.5, damageMax = 2.0} } }, [4] = { monster = "water elemental", vocations = {2}, level = 95, cost = 15000, attacks = { [1] = {name = "Ice Bomb", level = 100, petLevel = 100, mana = 250, type = TYPE_DISTANCE, range = 3, combat = COMBAT_ICEDAMAGE, effect = CONST_ME_ICEAREA, distEffect = CONST_ANI_ICE, damageMin = 1.5, damageMax = 2.0, area = AREA_CROSS1X1}, [2] = {name = "Poison Strike", level = 95, petLevel = 95, mana = 80, type = TYPE_DISTANCE, range = 8, combat = COMBAT_POISONDAMAGE, effect = CONST_ME_GREENRINGS, distEffect = CONST_ANI_POISON, damageMin = 1.2, damageMax = 1.8} } }, [5] = { monster = "fire elemental", vocations = {1}, level = 95, attacks = { [1] = {name = "Fire Bomb", level = 100, petLevel = 100, mana = 250, type = TYPE_DISTANCE, range = 3, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_FIRE, distEffect = CONST_ANI_FIRE, damageMin = 1.5, damageMax = 2.0, area = AREA_CROSS1X1}, [2] = {name = "Fire Strike", level = 95, petLevel = 95, mana = 80, type = TYPE_DISTANCE, range = 3, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_FIREDAMAGE, distEffect = CONST_ANI_FIRE, damageMin = 1.2, damageMax = 1.8} } }, [6] = { monster = "orc warlord", vocations = {4}, level = 95, attacks = { [1] = {name = "Throw Knife", level = 95, petLevel = 95, mana = 80, type = TYPE_DISTANCE, combat = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_BLOOD, distEffect = CONST_ANI_THROWINGKNIFE, damageMin = 1.5, damageMax = 2.0} } }, [7] = { monster = "golem", vocations = {3}, level = 95, attacks = { [1] = {name = "Throw Stone", level = 95, petLevel = 95, mana = 80, type = TYPE_DISTANCE, combat = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_BLOOD, distEffect = CONST_ANI_LARGEROCK, damageMin = 1.5, damageMax = 2.0} } }, [8] = { monster = "wyrm", vocations = {1, 2, 3, 4}, level = 135 }, [9] = { monster = "dragon lord", vocations = {1, 2, 3, 4}, level = 200, attacks = { [1] = {name = "Fire Bomb", level = 200, petLevel = 200, mana = 300, type = TYPE_DISTANCE, range = 3, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_FIREAREA, distEffect = CONST_ANI_FIRE, damageMin = 1.5, damageMax = 2.0, area = AREA_CROSS1X1}, [2] = {name = "Fire Storm", level = 205, petLevel = 220, mana = 700, type = TYPE_NEAR, range = 8, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_FIREAREA, distEffect = CONST_ANI_FIRE, damageMin = 1.8, damageMax = 2.5, area = AREA_CROSS5X5}, [3] = {name = "Fire Explosion", level = 203, petLevel = 210, mana = 450, type = TYPE_DISTANCE, range = 6, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_EXPLOSIONHIT, distEffect = CONST_ANI_FIRE, damageMin = 1.5, damageMax = 2.1, area = AREA_CIRCLE2X2}, [4] = {name = "Scratch", level = 201, petLevel = 205, mana = 150, type = TYPE_NEAR, range = 1, combat = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_HITAREA, distEffect = CONST_ANI_FIRE, damageMin = 1.3, damageMax = 1.8}, [5] = {name = "Fire Strike", level = 203, petLevel = 210, mana = 100, type = TYPE_DISTANCE, range = 3, combat = COMBAT_FIREDAMAGE, effect = CONST_ME_EXPLOSIONAREA, distEffect = CONST_ANI_FIRE, damageMin = 1.8, damageMax = 1.9} } } } for i = 1, #pets do table.insert(tables.pet, petStorages.pet + i) table.insert(tables.level, petStorages.level + i) table.insert(tables.exp, petStorages.exp + i) table.insert(tables.items, petStorages.items + i) table.insert(tables.isDead, petStorages.isDead + i) table.insert(tables.exhaust, petStorages.exhaust + i) table.insert(tables.health, petStorages.health + i) table.insert(tables.mana, petStorages.mana + i) table.insert(tables.buyed, petStorages.buyed + i) end function gainStat(pid, stat) if pid and pid > 0 and isMonster(pid) then stat.func(pid, stat.count) end addEvent(gainStat, stat.time, pid, stat) end function getLevelByExp(exp) return math.floor((math.sqrt(3) * math.sqrt(243*(exp+1)^2-48600*(exp+1)+3680000)+27 * (exp+1)-2700)^(1/3)/30^(2/3)-(5*10^(2/3))/(3^(1/3)*(math.sqrt(3)*math.sqrt(243*(exp+1)^2-48600*(exp+1)+3680000)+27*(exp+1)-2700)^(1/3))+2) end function getPetInfo(pet) if isNumber(pet) then return pets[pet] or false else for _, v in pairs(pets) do if pet:lower() == v.monster then return v end end end return false end function getPetByLevel(cid) local level = getPlayerLevel(cid) local pet for i = 1, #pets do v = pets[i] if level >= v.level and isInArray(v.vocations, getPlayerVocation(cid)) then pet = v end end return (pet ~= nil and pet or false) end function getAttackFormula(pid, attack) return { min = ((getPetLevel(pid) * 2) * (1 + attack.damageMin) + getPetLevel(pid)) / 2.5, max = ((getPetLevel(pid) * 3) * (1 + attack.damageMax) + getPetLevel(pid)) / 2.5 } end function doAttack(pid, target, param) local pet = getPetInfo(getCreatureName(pid)) if pet then if pet.attacks and pet.attacks[param] then local attack = pet.attacks[param] if target > 0 and pid ~= getCreatureTarget(getCreatureMaster(pid)) then if attack.type and attack.type == TYPE_DISTANCE and getDistanceBetween(getCreaturePosition(pid), getCreaturePosition(target)) > (attack.range or 3) or attack.type == TYPE_NEAR and getDistanceBetween(getCreaturePosition(pid), getCreaturePosition(target)) > (attack.range or 1) then return doPlayerSendCancel(getCreatureMaster(pid), "Target is too far.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end if not isSightClear(getCreaturePosition(pid), getCreaturePosition(target), true) then return doPlayerSendCancel(getCreatureMaster(pid), "There is not enough room.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end else return doPlayerSendCancel(getCreatureMaster(pid), "Please select a target first.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end if getPlayerLevel(getCreatureMaster(pid)) < attack.level then return doPlayerSendCancel(getCreatureMaster(pid), "You need level " .. attack.level .. " or higher to use this attack.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end if getPetLevel(pid) < attack.petLevel then return doPlayerSendCancel(getCreatureMaster(pid), "Your pet needs level " .. attack.petLevel .. " or higher to use this attack.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end if attack.mana and getCreatureMana(pid) < attack.mana then return doPlayerSendCancel(getCreatureMaster(pid), "Your pet does not have enough mana.") and doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end if attack.area then doCastAreaAttack(pid, target, attack.area, attack) else doTargetCombatHealth(pid, target, attack.combat, -getAttackFormula(pid, attack).min, -getAttackFormula(pid, attack).max, attack.effect) end doCreatureAddMana(pid, -attack.mana) if attack.name ~= "" then if emoteAttack then doCreatureSay(getCreatureMaster(pid), getCreatureName(pid) .. ", use " .. attack.name .. "!", TALKTYPE_SAY) end if petEmoteAttack then doCreatureSay(pid, attack.name, TALKTYPE_MONSTER) end end return doSendDistanceShoot(getCreaturePosition(pid), (attack.type == TYPE_DISTANCE and getCreaturePosition(target) or getCreaturePosition(pid)), attack.distEffect) else return doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) end else return doSendMagicEffect(getCreaturePosition(pid), CONST_ME_POFF) and doPlayerSendCancel(getCreatureMaster(pid), "There is a tecnical problem, please contact a gamemaster.") end end function callPet(cid, petId) for i = 1, #tables do for y = 1, #tables[i] do if getCreatureStorage(cid, tables[i][y]) < 0 then doCreatureSetStorage(cid, tables[i][y], 0) end end end local pet = getPetInfoById(petId) if not pet then return doPlayerSendCancel(cid, "Something is wrong.") end if getPlayerLevel(cid) < pet.level then return doPlayerSendCancel(cid, "You need level " .. pet.level .. " or higher to call this pet.") end if pet.cost and pet.cost > 0 then if getCreatureStorage(cid, tables.buyed[petId]) < 1 then return doPlayerSendCancel(cid, "You need to buy this pet first.") and doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end local ret = doCreateMonster(pet.monster, getCreaturePosition(cid)) if getCreatureStorage(cid, tables.level[petId]) < 1 then doCreatureSetStorage(cid, tables.level[petId], pet.level) end if getCreatureStorage(cid, tables.exp[petId]) < 1 then doCreatureSetStorage(cid, tables.exp[petId], getExperienceForLevel(pet.level)) end if getCreatureStorage(cid, tables.level[petId]) < pet.level then doCreatureSetStorage(cid, tables.level[petId], pet.level) elseif getPlayerLevel(cid) * 3 < getCreatureStorage(cid, tables.level[petId]) then doCreatureSetStorage(cid, tables.level[petId], pet.level) doCreatureSetStorage(cid, tables.exp[petId], getExperienceForLevel(pet.level)) end if getLevelByExp(getCreatureStorage(cid, tables.exp[petId])) < getCreatureStorage(cid, tables.level[petId]) then doCreatureSetStorage(cid, tables.exp[petId], getExperienceForLevel(getCreatureStorage(cid, tables.level[petId]))) end if getCreatureStorage(cid, tables.health[petId]) < 1 then doCreatureSetStorage(cid, tables.health[petId], getCreatureStorage(cid, tables.level[petId]) * petGainHealth) end if getCreatureStorage(cid, tables.mana[petId]) < 1 then doCreatureSetStorage(cid, tables.mana[petId], getCreatureStorage(cid, tables.level[petId]) * petGainMana) end doCreatureSetStorage(ret, tables.level[petId], getCreatureStorage(cid, tables.level[petId])) doCreatureSetStorage(ret, tables.exp[petId], getCreatureStorage(cid, tables.exp[petId])) doConvinceCreature(cid, ret) doCreatureSetStorage(ret, petStorages.isPet, 1) doSendMagicEffect(getCreaturePosition(ret), CONST_ME_TELEPORT) setCreatureMaxHealth(ret, getPetLevel(ret) * petGainHealth) doCreatureAddHealth(ret, -getCreatureHealth(ret) + getCreatureStorage(cid, tables.health[petId])) setCreatureMaxMana(ret, getPetLevel(ret) * petGainMana) doCreatureAddMana(ret, -getCreatureMana(ret) + getCreatureStorage(cid, tables.mana[petId])) for _, v in pairs(petGainTicks) do gainStat(ret, v) end return doCreatureSay(cid, "Go pet!", TALKTYPE_SAY) end function doCastAreaAttack(pid, target, area, attack) local center = {} local areaxx = {} center.y = math.floor(#area/2)+1 for y = 1, #area do for x = 1, #area[y] do local number = area[y][x] if number > 0 then center.x = math.floor(table.getn(area[y])/2)+1 if attack.type == TYPE_DISTANCE then table.insert(areaxx, {x = getCreaturePosition(target).x + x - center.x, y = getCreaturePosition(target).y + y - center.y, z = getCreaturePosition(target).z}) else table.insert(areaxx, {x = getCreaturePosition(pid).x + x - center.x, y = getCreaturePosition(pid).y + y - center.y, z = getCreaturePosition(pid).z}) end end end end for i = 1, #areaxx do doAreaCombatHealth(pid, attack.combat, areaxx[i], 0, -getAttackFormula(pid, attack).min, -getAttackFormula(pid, attack).max, attack.effect) end end function isPet(pid) local id = getPetIdByName(getCreatureName(pid)) return getCreatureStorage(pid, petStorages.isPet) > 0 and true or false end function doPetAddExperience(pid, exp) local id = getPetIdByName(getCreatureName(pid)) exp = math.ceil(exp) doCreatureSetStorage(getCreatureMaster(pid), tables.exp[id], getPetExperience(pid) + exp) doSendAnimatedText(getCreaturePosition(pid), exp, getConfigValue("gainExperienceColor")) return true end function getPetExperience(pid) local id = getPetIdByName(getCreatureName(pid)) return getCreatureStorage(getCreatureMaster(pid), tables.exp[id]) end function getPetLevel(pid) local id = getPetIdByName(getCreatureName(pid)) return getCreatureStorage(getCreatureMaster(pid), tables.level[id]) end function doPetSetLevel(pid, level) local id = getPetIdByName(getCreatureName(pid)) doCreatureSetStorage(getCreatureMaster(pid), tables.level[id], level) setCreatureMaxHealth(pid, getPetLevel(pid) * petGainHealth) setCreatureMaxMana(pid, getPetLevel(pid) * petGainMana) return true end function getPlayerPet(cid) local pet if #getCreatureSummons(cid) < 1 then pet = false end for _, it in ipairs(getCreatureSummons(cid)) do if isPet(it) then pet = it break end end return pet end function getPetIdByName(name) local id = 0 for k, it in pairs(pets) do if it.monster:lower() == name:lower() then id = k break end end return (id > 0 and id or false) end function getTopItem(p) p.stackpos = 0 local v = getThingFromPos(p) repeat p.stackpos = p.stackpos + 1 v = getThingFromPos(p) until v.itemid == 0 p.stackpos = p.stackpos - 1 return getThingFromPos(p) end function getPetInfoById(pet) for k, v in pairs(pets) do if k == pet then return v end end return false end if not getCreatureStorage then getCreatureStorage = getPlayerStorageValue doCreatureSetStorage = doPlayerSetStorageValue end Socorro!
×
×
  • Criar Novo...