Ir para conteúdo

pokemonfox123

Artesão
  • Total de itens

    107
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    pokemonfox123 recebeu reputação de Chinchar156 em Sistema de Pet   
    Ola Galera do Xtibia aki venho pra Mostra um sitema de pet
     
    Obs: o Sistema não e meu mais eu vou ensina a botalo e editalo
     
    Creditos:
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
     
    Ta Vamos la:
     
    Esse Sistema de pet ede Action
     
     
    Primeiro Vai na pasta data\actions\script e cria um arquivo com nome pet, e coloke isso dentro
     
     
     
    ta depois vamos no arquivo Action Xml e adicione essa tag
     
     
     
     
    Vc pode mudar o Id do item qui vai sair o pet O meu e 11205 mais vc pode mudar a gosto
     
    ta vou ensinar a editalo
     
    Você esta vendo isso a baixo
     
     
     
     
    e simples trocar o Montros e adicionar novos você pode fazer assim
     
     
     
     
    Obs:Para o pet não atacar vc vc vai ter qui ir la em Data/Montros ir no Monstro qui vc adicionou e mudar isso
     
     
     
     
    Onde Tem Zero vc vai Mudar pra 1 vai ficar assim
     
     
     
     
    E Pronto
    Imagens
    http://imageshack.us...9/19714900.png/
     
    Creditos
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
  2. Upvote
    pokemonfox123 recebeu reputação de BorgesRicardo em Sistema de Pet   
    Ola Galera do Xtibia aki venho pra Mostra um sitema de pet
     
    Obs: o Sistema não e meu mais eu vou ensina a botalo e editalo
     
    Creditos:
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
     
    Ta Vamos la:
     
    Esse Sistema de pet ede Action
     
     
    Primeiro Vai na pasta data\actions\script e cria um arquivo com nome pet, e coloke isso dentro
     
     
     
    ta depois vamos no arquivo Action Xml e adicione essa tag
     
     
     
     
    Vc pode mudar o Id do item qui vai sair o pet O meu e 11205 mais vc pode mudar a gosto
     
    ta vou ensinar a editalo
     
    Você esta vendo isso a baixo
     
     
     
     
    e simples trocar o Montros e adicionar novos você pode fazer assim
     
     
     
     
    Obs:Para o pet não atacar vc vc vai ter qui ir la em Data/Montros ir no Monstro qui vc adicionou e mudar isso
     
     
     
     
    Onde Tem Zero vc vai Mudar pra 1 vai ficar assim
     
     
     
     
    E Pronto
    Imagens
    http://imageshack.us...9/19714900.png/
     
    Creditos
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
  3. Upvote
    pokemonfox123 deu reputação a binhofox123 em Pedido de Editor de Post   
    Ola Pessoal Esse e o Meu Primeiro Topico Si Estive No Lugar errado Mil Desculpas
     
    Bom Eu Queria Um Editor der Post [Oque e Isso] Seria isso
     

     
    Uploaded with ImageShack.us
     
    [Pra que eu Quero Isso]
    Eu Quero Para Imcorborar o Meu Saite Qui eu Estou Fazendo
     
    Si Alguem Puder Ajudar EU Já Agradesso
  4. Upvote
    pokemonfox123 recebeu reputação de binhofox123 em Sistema de Pet   
    Ola Galera do Xtibia aki venho pra Mostra um sitema de pet
     
    Obs: o Sistema não e meu mais eu vou ensina a botalo e editalo
     
    Creditos:
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
     
    Ta Vamos la:
     
    Esse Sistema de pet ede Action
     
     
    Primeiro Vai na pasta data\actions\script e cria um arquivo com nome pet, e coloke isso dentro
     
     
     
    ta depois vamos no arquivo Action Xml e adicione essa tag
     
     
     
     
    Vc pode mudar o Id do item qui vai sair o pet O meu e 11205 mais vc pode mudar a gosto
     
    ta vou ensinar a editalo
     
    Você esta vendo isso a baixo
     
     
     
     
    e simples trocar o Montros e adicionar novos você pode fazer assim
     
     
     
     
    Obs:Para o pet não atacar vc vc vai ter qui ir la em Data/Montros ir no Monstro qui vc adicionou e mudar isso
     
     
     
     
    Onde Tem Zero vc vai Mudar pra 1 vai ficar assim
     
     
     
     
    E Pronto
    Imagens
    http://imageshack.us...9/19714900.png/
     
    Creditos
    Snokiuthu: Por fazelo
     
    Pokemonfox123: por repostalo e editalo
  5. Upvote
    pokemonfox123 recebeu reputação de binhofox123 em Sistema de Pet   
    Aff Alguem Fala Algo Sobre O sistema Por favor
  6. Downvote
    pokemonfox123 recebeu reputação de SkyLigh em Novo Sistema De /ir   
    Ola Xtibia Venho Mostrar Meu Sistema de /ir Qui Fis
    Vamos la
     
    Ta Vano seu ot Data/talkactions/Scripts
     
    Crie Um Bloco De Notas Com o Nome de Teleporte
    Cole Isso Dentro
     
     
     
     
    Depois Adicione Essa Tag No Arquivo Xml
     
     
     
    Depois Esso Falar /ir Nome do Local E Pronto !!!
  7. Upvote
    pokemonfox123 deu reputação a wesleyt10 em Show off bobo   
    a sim xD
    eu fiz como se fosse ela menor usei como base tbm.
    fiz o movimento da minha sprite voando esta em todas posiçoes
    mas vou colocar só voando pra frente

  8. Upvote
    pokemonfox123 deu reputação a wesleyt10 em Show off bobo   
    olá galera vo fazer um show off noob aki
    espero que gostem algumas sprites ja foram vistas por aki

     
     
     

    (BIOHAZARD)

     
     
     
     
    nature (esse foi meu primeiro )

    paredes

     
     
    Tentei deixar essa com aparencia do tibia 9.6
    mas.. falta terminar

    Essa fiz so para treinar mesmo

     
     
     
     
    Sprites que irei usar no meu projeto de bluedragon
    (elas irao sofrer algumas melhorias)


    alguns movimentos e como vai ficaria num cliente!!!

    Fiz um remake e todos os movimentos da sprite acima

  9. Downvote
    pokemonfox123 recebeu reputação de Roksas em [Arquivado]Por que Não   
    Desculpa pelo português Mais agente Vé ai Varios ots com Novas Sprites
  10. Downvote
    pokemonfox123 recebeu reputação de Roksas em [Arquivado]Por que Não   
    Ola Galera Do Xtibia Aqui Venho pra Dexa Minha DUVIDA
     
    Por que ate Hoje Nimguem Criou Um Ot Inspirado em Cavaleiros do Zodiaco
    Veio Vejo ot de Naruto Pokemon Agora Vai Lança Um de Avatar E Porque não Cavaleiros do zodiaco
     
     
    Poderia ser assim Cavaleiro de Bronze lvl 20 Cavaleiro de prata lvl 100 Cavaleiro de Ouro lvl 200 e Cavaleiro seleste lvl 500 Isso e Um assemplo
     
    Poderia Ter né
     
     
    Vllw ai Galera Essa e Minha Duvida Si Vocês Quizeren Fazer Um Servidor de Cavaleiros do Zodiaco esso Min Avizar
     
    Email;Klebessongomes@hotmail.com
     
    Facebook:Binhozinho gomes
  11. Downvote
    pokemonfox123 recebeu reputação de Roksas em Novo Sistema De /ir   
    Ola Xtibia Venho Mostrar Meu Sistema de /ir Qui Fis
    Vamos la
     
    Ta Vano seu ot Data/talkactions/Scripts
     
    Crie Um Bloco De Notas Com o Nome de Teleporte
    Cole Isso Dentro
     
     
     
     
    Depois Adicione Essa Tag No Arquivo Xml
     
     
     
    Depois Esso Falar /ir Nome do Local E Pronto !!!
  12. Downvote
    pokemonfox123 recebeu reputação de Roksas em [Encerrado]Cavaleiros do Zodiaco   
    Ola Xtibia Venho Hoje A Vocês Fala Sobre Um Projeto em Que Presisso de Uma Equipe Muito Boa.
     
    1:O Projeto e Baseado Na Historia Bem Conhecida Pelos Fans de Animes de Cavaleiros do Zodiaco
     
    2:Eu Vejo ai Varios Ots Inspirados em Animes Ex: Naruto,Avatar,Harry Potter,Tibia Gta,Resident IVel,Entre Outros
     
    3: O Projeto sera Uma Coisa Seri Não Quero Nada de Infantilidades
     
    4: Si Quizer Fazer Parte dessa Ideia Desse Suas Descriçõens
     
     
     
     
    Meu Email:klebesongomes@hotmail.com
     
    Facebook:Binhozinhogomes
     
     
    Imagens
     

     
    Uploaded with ImageShack.us
    Muito Obrigado Pela Colaboração
  13. Upvote
    pokemonfox123 deu reputação a Desnecessario em [Encerrado]Cavaleiros do Zodiaco   
    1° - Crie outra conta , uma conta com 4 rep - não agrada muito a galera..
     
    2° - Se ja tiver feito algo poste imagens de agrado para os recrutas
  14. Upvote
    pokemonfox123 recebeu reputação de malaria25 em [Encerrado]Cavaleiros do Zodiaco   
    Ola Xtibia Venho Hoje A Vocês Fala Sobre Um Projeto em Que Presisso de Uma Equipe Muito Boa.
     
    1:O Projeto e Baseado Na Historia Bem Conhecida Pelos Fans de Animes de Cavaleiros do Zodiaco
     
    2:Eu Vejo ai Varios Ots Inspirados em Animes Ex: Naruto,Avatar,Harry Potter,Tibia Gta,Resident IVel,Entre Outros
     
    3: O Projeto sera Uma Coisa Seri Não Quero Nada de Infantilidades
     
    4: Si Quizer Fazer Parte dessa Ideia Desse Suas Descriçõens
     
     
     
     
    Meu Email:klebesongomes@hotmail.com
     
    Facebook:Binhozinhogomes
     
     
    Imagens
     

     
    Uploaded with ImageShack.us
    Muito Obrigado Pela Colaboração
  15. Downvote
    pokemonfox123 recebeu reputação de Erimyth em Creaturescript não funciona   
    Topico Fechado Duvida Sanada
  16. Upvote
    pokemonfox123 recebeu reputação de Loockup em Aula Deserto #1 (OÁSIS)   
    Topico Organizado Bem explicado Bom mesmo
  17. Upvote
    pokemonfox123 deu reputação a Oneshot em Fire Aura   
    Nome: Fire Aura
    Autor: Oneshot
    Tipo: Magia
     

     
    Faz tempo que eu não faço magias, então eu resolvi escrever qualquer coisa e deu nisso, uma aura que fica circundando o jogador por X tempo causando dano.
     

    Crie um arquivo chamado fire aura.lua, e coloque o conteúdo abaixo:
     

    local offsets = { [0] = {{0, 0}, {1, 0}, {1, 1}, {1, 2}, {0, 2}, {-1, 2}, {-1, 1}, {-1, 0}}, [1] = {{0, 0}, {0, 1}, {-1, 1}, {-2, 1}, {-2, 0}, {-2, -1}, {-1, -1}, {0, -1}}, [2] = {{0, 0}, {-1, 0}, {-1, -1}, {-1, -2}, {0, -2}, {1, -2}, {1, -1}, {1, 0}}, [3] = {{0, 0}, {0, -1}, {1, -1}, {2, -1}, {2, 0}, {2, 1}, {1, 1}, {0, 1}} } local storage = 88888 local k = 1 local duration = 30 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 10, 10, 2.4, 2.4) function onCastAura(cid, lastDirection) local position = getPositionByDirection(getThingPosition(cid), lastDirection, 1) local offset = offsets[lastDirection][(k > #offsets[lastDirection] and ((k % #offsets[lastDirection]) == 0 and #offsets[lastDirection] or (k % #offsets[lastDirection])) or k)] local tmp = {x = position.x + offset[1], y = position.y + offset[2], z = position.z} doCombat(cid, combat, positionToVariant(tmp)) doCreatureSetLookDirection(cid, lastDirection) if os.time() < getCreatureStorage(cid, storage) then addEvent(onCastAura, 100, cid, getCreatureLookDirection(cid)) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Aura effect ended.") mayNotMove(cid, false) end k = k + 1 end function onCastSpell(cid, var) doCreatureSetStorage(cid, storage, os.time() + duration) mayNotMove(cid, true) onCastAura(cid, getCreatureLookDirection(cid)) return true end
     
    No spells.xml, adicione uma linha:
     

    <instant name="Fire Aura" words="fire aura" lvl="100" mana="550" needlearn="0" event="script" value="fire aura.lua"/>
     
    A magia tem uma duração de 30 segundos, porém essa duração é configurável. Como ainda não criei uma lógica relacionando o movimento do jogador com a aura, então resolvi travar o movimento do jogador enquanto a magia é executada.
     
    Abaixo a demonstração em GIF dela.
     



     
    O script está bem pogado, talvez eu consiga entender melhor o padrão e melhorar a construção do código.
     
    Mude aqui efeito e tipo de dano se quiser, para criar outras auras:
     

    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 10, 10, 2.4, 2.4)
     

     
    Abraços.
  18. Upvote
    pokemonfox123 deu reputação a Alemaooxd em Presente para os Players Online !   
    Testei em Azeroth 9.60 e em Pokémon Dash Adventure ! Ambos funcionaram corretamente!
     
     
    Gostou? Dá um REP+ aii Serve como incentivo! Abraço!
  19. Upvote
    pokemonfox123 deu reputação a Vmspk em [9.60] Azeroth RPG   
    Azeroth Server



    Updated 28/01/2013: v2.0



    by Vmspk


     

    Este servidor foi disponibilizado para você gratuitamente, nunca retire os créditos


     



     
     
    Versões Anteriores:
     
    v1.0 [8.70]: http://www.xtibia.co...server-updated/
    v1.1 [8.60]: http://www.xtibia.co...oth-rpg-reborn/
     
     
     
     
     

     
    Versão: 9.60
    Distro: TFS 0.4
    Mapa Base: Yourots Edited e Mix Yourots
     
     

    Features:
     
     
    > 7 Cidades:
     
    Azeroth
    Avalon
    Zatur
    Liberty Bay
    Gloria
    Sand Trap
    Tiquanda
     
    > Mapa RPG bem detalhado para Ots Low e Mid rate.
    > Inúmeras invasões automáticas, Low e High lvl (ou iniciadas pelo comando /raid "nome").
    > NPCs de Travel/Boat diferentes para cada cidade.
    > Mais de 100 quests (além das principais) espalhadas pelo mapa.
    > Quests especiais com NPCs
    > Arena PvP sem perda de items.
    > Sistema de Guerras pelo Castelo [entre guilds] (mais detalhes abaixo)
    > Sistema de Refinamento e Slot (mais detalhes abaixo).
    > Sistema de Mineração (mais detalhes abaixo)
    > Scripts e sistemas aprimorados para o servidor
    > Distro SEM erro algum
    > Equipamentos 9.60 funcionando corretamente
    > Novas Hunts
    > Raids de bosses 9.60
    > Montarias por quest
     

    > Principais Quests:
     
    Annihilator
    Blue Legs
    Pits of Inferno
    MMS
    The Inquisition
    The Death
    FireWalker Boots
    Demon Helmet
    Draken
    Hell Conquer
    Prismatic Armory
    Deepling Abismal
     

     
    > 27 Raids Automáticas e configuradas:
     
     
     
     

     
    > Sistema de Guerras pelo Castelo [Honor Castle, a oeste de Azeroth]
     
    Evento automático. Quando a guerra é anunciada as guilds podem batalhar pelo controle do castelo, dando use no monumento do último andar e permanecendo assim até a guerra acabar. O último jogador a ter o controle do castelo antes do tempo acabar será o vencedor, e sua guild se tornará dona do castelo. Todos os membros da Guild ganharão uma recompensa e poderão acessar o mapa do subsolo. Os membros de outras Guilds serão teleportados para o templo e não poderão acessar o castelo.
     
    O sistema envia mensagens a todos antes de o evento começar, quando começar, quando o dono do castelo muda, antes de se finalizar e ao finalizar, relatando o conquistador do castelo e a guild vencedora.
     
     

     
     
     
     
     
     
     
     
     
     
     

    Imagens:


     



     

     
     
    Raids
     
     
     
     
    Honor Castle War
     
     
     
     
    Upgrade & Slot System
     
     
     
     

    > Histórico:
     
     
    V 0.2
     
     
     
    V 0.3
     
     
     
    V 0.4
     
     
     
    V 1.0
     
     
    V 1.1
     
     
     
     
    V 2.0
     
     
     
     
     

     
    Não há teleports diretos para hunts ou quests.
    Não há items ou monstros editados(além dos trainers).
    Não há sistema VIP, VIP 2, VIP 3, VIP 345456364.
    Não há raids com monstros excessivamente fortes nas cidades iniciais.
     
     
     
    Créditos:
    < Unknow YourOts Edited >< Mix Yourots Team >< Crystal Server Team >< Tryller >< Mock >< TFS Team >< TonyHanks >< Centera World >< SmoOker >< Mappers Xtibia e OtservBr >< Vmspk >
     
    (Este servidor foi disponibilizado para você gratuitamente, nunca retire os créditos)
     
     

     
     
    DOWNLOADS
     
     
    > Opcionais
     


    Utilitários - Source


    *Utilitários inclui: SQLite Studio + Otland Ipchanger


     
     
    > Servidor
     
     
     
     
     
     
     
     
     
     
     
     



    Azeroth Server v2.0





    [MEDIAFIRE]


     
     

    Para entrar no servidor sem usar a internet, ponha no ipchanger localhost



    Se você estiver usando sqlite, vá até o config.lua e mude ingameGuildManagement = false para ingameGuildManagement = true


     
     
    > Scan
     
     
     
     
     
     

     
     
     
     
     
     
     
     
     
     
     

    Acc do GOD: vmspk/222222


     

    Comandos: !war para executar a guerra pelo castelo manualmente, !reset para interromper o funcionamento da war e !castle para limpar todos os dados, ou seja, o castelo volta a ser terra de ninguém.



    !info para saber mais sobre as novidades do Azeroth Server. Editável na pasta do Ot, em Notícias. Comando !bless e !rank disponíveis.



    Para saber os IDs das pedras e outras coisas vá ao Histórico, na versão 1.0.


     
     
    Se acha que ter um OtServ é só baixar, abrir e largar lá, ou ainda editar chars e equipamentos para você mesmo jogar e fazer o que quiser, garanto-lhe que não vai durar 2 dias. Conheça o mapa, crie eventos, interaja com os jogadores, faça torneios Pvp, marque datas para a Honor Castle, faça updates no mapa, crie monstros, hunts e quests, dê suporte e, o mais importante, mantenha o HELP aberto, sempre.
     
     
    Contato: vmspk@hotmail.com
     
     
     
    Os arquivos dos ots 9.60 estavam muito errados e incompletos, ou melhor, podres. Não duvido que a maioria desses 9.60 postados aqui ou nos outros fóruns estejam infestados de bugs e coisas que não funcionam. Loots errados, monstros copiados, escadas sem registros, novos equipamentos sem movements (propriedades não faziam efeito), bordas de mapas 9.60 fora do lugar, scripts simples como os de Locked Doors em conflito com a lib, etc, etc. Tive um trampo do cão pra arrumar tudo isso. Do meu suor eu digo a vocês, dou-lhes o melhor servidor 9.60 (pelo menos por enquanto)
     
     
     
    Conheça também o 4Fun Server 9.1
     
     
     
     
     
     
     
     
     
     
     
     
     



  20. Upvote
    pokemonfox123 deu reputação a Oneshot em Pet System OOP   
    Pet System OOP


    Boa tarde, pessoal.

    Depois de ver muitos sistemas de pet para Tibia, resolvi desenvolver o meu próprio sistema de pets. O diferencial do meu sistema é que ele é orientado a objetos. Sim, ele trata o pet do jogador como um objeto em Lua e suas ações como métodos.

    Essa ainda é uma versão básica, que irei aprimorar aos poucos, igual fiz com meu Forge System e Refine System.

    Por se tratar de uma biblioteca orientada a objetos, ele pode ser usado por qualquer scripter em diversos sistemas, e se bem adaptado, dá até para fazer um Poketibia orientado a objetos. Aliás, os comandos estão bastante semelhantes a Pokétibia.

    Instalação

    1. Crie um arquivo em data/lib com o nome pet-system.lua e cole o conteúdo abaixo:

    -- This script is part of Pet System -- Copyright (C) 2013 Oneshot -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- storages for pet system PET_UID = 80001 PET_SPECIE = 80002 PET_LEVEL = 80003 PET_EXPERIENCE = 80004 PET_HEALTH = 80005 PET_HEALTHMAX = 80006 PET_MANA = 80007 PET_MANAMAX = 80008 PET_EXHAUST = 80009 PET_ALIVE = 80010 Pets = {} -- class for pet species PetSpecie = { type = "", basehp = 0, basemp = 0, gainhp = 0, gainmp = 0, spells = {}, evolution = "", evolve = 0, } -- class for pets Pet = { it = nil, attributes = nil, level = 0, experience = 0, health = 0, healthmax = 0, mana = 0, manamax = 0, } -- create new instances of PetSpecie function PetSpecie:new(type, basehp, basemp, gainhp, gainmp, spells, evolution, evolve) local new_specie = { type = type, basehp = basehp, basemp = basemp, gainhp = gainhp, gainmp = gainmp, spells = spells, evolution = evolution, evolve = evolve, } local obj = setmetatable(new_specie, {__index = self}) Pets[type:lower()] = obj return obj end -- create new instances of Pet function PetSpecie:create() local new_pet = { it = nil, attributes = self, level = 1, experience = 0, health = self.basehp, healthmax = self.basehp, mana = self.basemp, manamax = self.basemp, } return setmetatable(new_pet, {__index = Pet}) end -- summon a player pet for the first time function Pet:hatch(cid) if getCreatureStorage(cid, PET_SPECIE) ~= -1 then return doPlayerSendCancel(cid, "You already have a pet.") end local pet = doCreateMonster(self.attributes.type, getCreaturePosition(cid)) if not pet then return false end if not doConvinceCreature(cid, pet) then doRemoveCreature(pet) return false end self:setit(pet) setCreatureMaxHealth(pet, self.healthmax) doCreatureAddHealth(pet, self.healthmax) doCreatureSetStorage(cid, PET_SPECIE, self.attributes.type) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your new pet has born.") self:save() doSendMagicEffect(getCreaturePosition(pet), CONST_ME_HOLYDAMAGE) return self end -- make player pet say something function Pet:say(strt) doCreatureSay(self.it, strt, TALKTYPE_ORANGE_1) end -- gather a summoned player pet back function Pet:back() self:save() doSendMagicEffect(self:position(), CONST_ME_POFF) doCreatureSay(getCreatureMaster(self.it), "It's enough, ".. getCreatureName(self.it)) doRemoveCreature(self.it) end -- free a player pet forever function Pet:release() local cid = getCreatureMaster(self.it) doCreatureSay(cid, "Good bye, ".. getCreatureName(self.it) .."... :'(") doCreatureSetStorage(cid, PET_UID, -1) doCreatureSetStorage(cid, PET_SPECIE, -1) doCreatureSetStorage(cid, PET_LEVEL, -1) doCreatureSetStorage(cid, PET_EXPERIENCE, -1) doCreatureSetStorage(cid, PET_HEALTH, -1) doCreatureSetStorage(cid, PET_HEALTHMAX, -1) doCreatureSetStorage(cid, PET_MANA, -1) doCreatureSetStorage(cid, PET_MANAMAX, -1) doSendMagicEffect(self:position(), CONST_ME_POFF) doRemoveCreature(self.it) end -- add experience to player pet function Pet:addexperience(value) local prevLevel = self.level local nextLevelExp = getExperienceForLevel(self.level + 1) self.experience = self.experience + value while self.experience >= nextLevelExp do self.healthmax = self.healthmax + self.attributes.gainhp self.manamax = self.manamax + self.attributes.gainmp self.level = self.level + 1 nextLevelExp = getExperienceForLevel(self.level + 1) end if prevLevel ~= self.level then self.mana = self.manamax self.health = self.healthmax doPlayerSendTextMessage(getCreatureMaster(self.it), MESSAGE_STATUS_CONSOLE_BLUE, "Your pet advanced from level ".. prevLevel .." to level ".. self.level ..".") setCreatureMaxHealth(self.it, self.healthmax) doCreatureAddHealth(self.it, getCreatureMaxHealth(self.it)) self:save() if self.attributes.evolution then if self.attributes.evolve and self.level >= self.attributes.evolve then doCreatureSay(getCreatureMaster(self.it), "What's happening?!") addEvent(function() local cid = getCreatureMaster(self.it) local position = self:position() doRemoveCreature(self.it) local pet = doCreateMonster(self.attributes.evolution, position) if not doConvinceCreature(cid, pet) then doRemoveCreature(pet) call_pet(cid) return end doCreatureSetStorage(cid, PET_UID, pet) setCreatureMaxHealth(pet, self.healthmax) doCreatureAddHealth(pet, getCreatureMaxHealth(pet)) doSendMagicEffect(getCreaturePosition(pet), CONST_ME_MORTAREA) doCreatureSetStorage(cid, PET_SPECIE, self.attributes.evolution) end, 100) end end end end -- make pet cast a spell function Pet:cast(index) local cid = getCreatureMaster(self.it) if not self.attributes.spells[index] then return doPlayerSendCancel(cid, "This spell is unknown.") end local spell = self.attributes.spells[index] if self.level < spell.level then doPlayerSendCancel(cid, "Your pet doesn't have enough level to cast this spell.") return end if self.mana < spell.mana then doPlayerSendCancel(cid, "Your pet doesn't have enough mana to cast this spell.") return end if getCreatureStorage(cid, PET_EXHAUST) > os.clock() then doSendMagicEffect(self:position(), CONST_ME_POFF) doPlayerSendCancel(cid, "Your pet is exhausted.") return end if spell.target then local target = getCreatureTarget(self.it) if target == 0 then doPlayerSendCancel(cid, "First, select a target.") return end spell.range = spell.range or 1 if getDistanceBetween(self:position(), getCreaturePosition(target)) > spell.range then doPlayerSendCancel(cid, "Too far to cast spell.") return end doSendDistanceShoot(self:position(), getCreaturePosition(target), spell.shooteffect) doTargetCombatHealth(self.it, target, spell.type, -spell.min, -spell.max, spell.effect) else doAreaCombatHealth(self.it, spell.type, self:position(), (spell.area or 0), -min, -max, spell.effect) end self.mana = self.mana - spell.mana doCreatureSetStorage(cid, PET_EXHAUST, os.clock() + (spell.exhaust / 1000)) doCreatureSay(cid, getCreatureName(self.it) ..", use ".. spell.name .."!") self:say(spell.name) end -- set pet uid function Pet:setit(uid) self.it = uid end -- get player pet position function Pet:position() return getCreaturePosition(self.it) end -- move player pet to a direction function Pet:move(direction) local toPosition = getPosByDir(self:position(), direction, 1) if getCreatureStorage(getCreatureMaster(self.it), PET_EXHAUST) > os.clock() then doSendMagicEffect(self:position(), CONST_ME_POFF) doPlayerSendCancel(cid, "Your pet is exhausted.") return end if queryTileAddThing(self.it, toPosition) == RETURNVALUE_NOERROR then doMoveCreature(self.it, direction) doCreatureSetStorage(cid, PET_EXHAUST, os.clock() + 0.5) doCreatureSay(cid, "Move, ".. getCreatureName(self.it) .."!") end end -- save player pet attributes function Pet:save() local cid = getCreatureMaster(self.it) doCreatureSetStorage(cid, PET_UID, self.it) doCreatureSetStorage(cid, PET_SPECIE, getCreatureName(self.it)) doCreatureSetStorage(cid, PET_LEVEL, self.level) doCreatureSetStorage(cid, PET_EXPERIENCE, self.experience) doCreatureSetStorage(cid, PET_HEALTH, self.health) doCreatureSetStorage(cid, PET_HEALTHMAX, self.healthmax) doCreatureSetStorage(cid, PET_MANA, self.mana) doCreatureSetStorage(cid, PET_MANAMAX, self.manamax) end -- get player pet and return instance function get_pet(cid) local uid, it = getCreatureStorage(cid, PET_UID) for _, pet in ipairs(getCreatureSummons(cid)) do if pet == uid then it = pet break end end if not it then return false end local this_pet = { it = it, attributes = Pets[getCreatureName(it):lower()], level = getCreatureStorage(cid, PET_LEVEL), experience = getCreatureStorage(cid, PET_EXPERIENCE), health = getCreatureHealth(it), healthmax = getCreatureMaxHealth(it), mana = getCreatureStorage(cid, PET_MANA), manamax = getCreatureStorage(cid, PET_MANAMAX), } return setmetatable(this_pet, {__index = Pet}) end -- summon a existing player pet function call_pet(cid) if get_pet(cid) then return doPlayerSendCancel(cid, "You cannot summon your pet more than one time.") end if getCreatureStorage(cid, PET_SPECIE) == -1 then return doPlayerSendCancel(cid, "You don't have a pet.") end if getCreatureStorage(cid, PET_ALIVE) == 0 then return doPlayerSendCancel(cid, "You need to revive your pet") end local pet = doCreateMonster(getCreatureStorage(cid, PET_SPECIE), getCreaturePosition(cid)) if not pet then return false end if not doConvinceCreature(cid, pet) then doRemoveCreature(pet) return false end local health, healthmax = getCreatureStorage(cid, PET_HEALTH), getCreatureStorage(cid, PET_HEALTHMAX) setCreatureMaxHealth(pet, healthmax) doCreatureAddHealth(pet, healthmax) doCreatureAddHealth(pet, (health - healthmax)) doCreatureSay(cid, "Go, ".. getCreatureName(pet) .."!") doSendMagicEffect(getCreaturePosition(pet), CONST_ME_MAGIC_GREEN) doCreatureSetStorage(cid, PET_UID, pet) return true end -- is pet function is_pet(cid) return getCreatureMaster(cid) == 0 and false or isPlayer(getCreatureMaster(cid)) end dofile(getDataDir() .."/lib/pet-spells.lua") Pet_Rat = PetSpecie:new("Rat", 20, 0, 5, 5, {[1] = Rock_Throw, [2] = Dark_Bite}, "Cave Rat", 14) Pet_Cave_Rat = PetSpecie:new("Cave Rat", 40, 20, 10, 10, {[1] = Dark_Bite}, "Munster", 32) Pet_Munster = PetSpecie:new("Munster", 100, 50, 20, 20, {[1] = Dark_Bite}, false, false) 2. Crie um arquivo em data/lib com o nome pet-spells.lua e cole o código abaixo:

    -- This script is part of Pet System -- Copyright (C) 2013 Oneshot -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. dofile("data/spells/lib/spells.lua") Dark_Bite = { name = "Dark Bite", level = 1, mana = 100, type = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_BLOCKHIT, shooteffect = CONST_ANI_SMALLSTONE, target = true, range = 1, min = 300, max = 500, area = 0, exhaust = 1000, } Rock_Throw = { name = "Rock Throw", level = 1, mana = 10, type = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_BLOCKHIT, shooteffect = CONST_ANI_NONE, target = true, range = 1, min = 20, max = 25, area = 0, exhaust = 1000, } 3. Crie um arquivo em data/talkactions/scripts, chamado pet-talkactions.lua e cole o conteúdo abaixo:

    -- This script is part of Pet System -- Copyright (C) 2013 Oneshot -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. function onSay(cid, words, param, channel) param = string.explode(param, ":") if param[1]:lower() == "go" then if getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "You cannot call your pet at protection zone.") end local pet = get_pet(cid) if pet then return doPlayerSendCancel(cid, "You cannot call your pet two times.") end call_pet(cid) return true elseif param[1]:lower() == "back" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end pet:back() return true elseif param[1]:lower() == "release" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end pet:release() return true elseif param[1]:lower() == "cast" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end local index = tonumber(param[2]) or 1 pet:cast(index) return true elseif param[1]:lower() == "say" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end pet:say(param[2]) return true elseif param[1]:lower() == "move" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end if not isInArray({"north", "south", "east", "west"}, param[2]:lower()) then return doPlayerSendCancel(cid, "Invalid direction.") end pet:move((_G[param[2]:upper()] or NORTH)) return true elseif param[1]:lower() == "addexp" then local pet = get_pet(cid) if not pet then return doPlayerSendCancel(cid, "Please call your pet first.") end if getPlayerGroupId(cid) < 3 then return doPlayerSendCancel(cid, "You cannot use this command.") end pet:addexperience(tonumber(param[2]) or 0) return true end return true end 4. No talkactions.xml

    <talkaction words="/pet" event="script" value="pet-talkactions.lua"/> 5. Crie um arquivo em data/creaturescripts/scripts com o nome pet-creaturescripts.lua e adicione o conteúdo abaixo:

    -- This script is part of Pet System -- Copyright (C) 2013 Oneshot -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. function onKill(cid, target, lastHit) local pet = get_pet(cid) if not isMonster(target) or getMonsterInfo(getCreatureName(target)) and getMonsterInfo(getCreatureName(target)).experience == 0 then return true end if not pet then return true end pet:addexperience(getMonsterInfo(getCreatureName(target)).experience) return true end function onDeath(cid, corpse, deathList) if not is_pet(cid) then return true end local master = getCreatureMaster(cid) doPlayerSendTextMessage(master, MESSAGE_EVENT_ADVANCE, "Your pet is dead.") doCreatureSetStorage(master, PET_ALIVE, 0) doCreatureSetStorage(master, PET_HEALTH, getCreatureMaxHealth(cid)) return true end 6. No arquivo login.lua de data/creaturescripts/scripts, adicione:

    registerCreatureEvent(cid, "PetKill") 7. No arquivo creaturescripts.xml, adicione:

    <event type="kill" name="PetKill" event="script" value="pet-creaturescripts.lua"/> <event type="death" name="PetDeath" event="script" value="pet-creaturescripts.lua"/> 8. Em cada arquivo XML de cada monstro que servirá como pet, adicione:

    <script> <event name="PetDeath"/> </script> 9. Mude o flag convinceable de cada monstro que será um tipo de pet.

    <flag convinceable="1"/> 10. Crie um arquivo chamado pet trainer.lua em data/npc/scripts, adicione:

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local petState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local PetPrices = { ["rat"] = {1000, 200}, } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if msgcontains(msg, "sell") then local say = "I can offer you these pet species: " for pet_name, k in pairs(PetPrices) do local first = true if Pets[pet_name] then say = say .. (first == true and "" or ", ") .."{".. pet_name .. "}" first = false end end selfSay(say, cid) talkState[talkUser] = 1 elseif msgcontains(msg, "revive") then if getCreatureStorage(cid, PET_SPECIE) == -1 then selfSay("You don't have a pet", cid) return true end if getCreatureStorage(cid, PET_ALIVE) == 0 then if doPlayerRemoveMoney(cid, PetPrices[getCreatureStorage(cid, PET_SPECIE):lower()][2]) then selfSay("Your pet is now alive.", cid) doCreatureSetStorage(cid, PET_ALIVE, 1) else selfSay("Sorry, you need ".. PetPrices[getCreatureStorage(cid, PET_SPECIE)][2] .." gold.", cid) end else selfSay("Sorry, your pet is alive.", cid) end elseif talkState[talkUser] == 1 then if PetPrices[msg] then selfSay("A good choice, so do you want to buy a ".. msg .." pet? It will cost ".. PetPrices[msg][1] .." gold.", cid) talkState[talkUser] = 2 petState[talkUser] = msg else selfSay("Sorry, I don't know this pet specie", cid) end elseif talkState[talkUser] == 2 then if msgcontains(msg, "yes") then if get_pet(cid) or getCreatureStorage(cid, PET_SPECIE) ~= -1 then selfSay("Sorry, you already have a pet.", cid) return true end local pet = petState[talkUser] if getPlayerMoney(cid) < PetPrices[pet][1] then selfSay("Sorry, you don't have enough money", cid) return true end selfSay("This is your new pet, take care of it.", cid) Pets[pet]:create():hatch(cid) elseif msgcontains(msg, "no") then selfSay("Then not.", cid) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) 11. Crie um arquivo chamado Pet Trainer.xml em data/npc, adicione:

    <?xml version="1.0" encoding="UTF-8"?> <npc name="Pet Trainer" script="pet trainer.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|, I {sell} and {revive} pets."/> </parameters> </npc> Configuração

    O Pet System OOP é todo orientado a objetos. Para criar novas raças de pet é muito, mas muito simples mesmo. Basta uma linha:

    PetSpecie:new("Rat", 20, 0, 5, 5, {[1] = Rock_Throw, [2] = Dark_Bite}, "Cave Rat", 14) Como segue o modelo abaixo:

    PetSpecie:new(NOME_DO_MONSTRO, HP_INICIAL, MP_INICIAL, HP_POR_LEVEL, MP_POR_LEVEL, {[1] = MAGIA_1, [2] = MAGIA_2, [3] = MAGIA_3, ...}, NOME_DA_EVOLUÇÃO, LEVEL_DA_EVOLUÇÃO) Caso você não queira que o pet evolua, coloque os dois parâmetros como false.

    E para criar novas magias, é só seguir o mesmo modelo das duas magias padrão dentro de pet-spells.lua.

    Demonstração



    Este sistema está no Github sob a licença Gnu GPL v3.

    Você pode baixar os scripts aqui.

    Abraços.
  21. Upvote
    pokemonfox123 deu reputação a eduardo190696 em Vocation Pet System   
    Sistema por talkactions
     
    Descrição

    !back - remove o pet

    Level minimo e maximo -- para sumonar o pet

    Maximo Summons -- Só pode sumonar 1 pet

    tilepz -- em protec zone não pode summonar
     
    Talkactions/scripts

    function onSay(cid, words, param, itemEx, params) if isCreature(cid) then if words == "!back" then doRemoveCreature(x) return True end end local summons = getCreatureSummons(cid) local monster = { ["dragon lord hatchling"] = { Level = 10, Levelmax = 30, Voc = 1, Vocp = 5 }, ["dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 2, Vocp = 6 }, ["frost dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 3, Vocp = 7 }, ["dark dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 4, Vocp = 8 } } for k,v in pairs(monster) do if getPlayerVocation(cid) == v.Voc or getPlayerVocation(cid) == v.Vocp then if getPlayerLevel(cid) >= v.Level and getPlayerLevel(cid) <= v.Levelmax then if (table.maxn(summons) < 1)then if getTilePzInfo(getCreaturePosition(cid)) == false then x = doSummonCreature(k, getCreaturePosition(cid)) doConvinceCreature(cid, x) doCreatureSay(cid, "Go to me ,".. k,1) else doPlayerSendCancel(cid, "Sorry, You cannot create Element Pet in pz.") end else doPlayerSendCancel(cid, "Sorry, You can not create more than one Element Pet.") end else doPlayerSendCancel(cid, "Sorry, You no have Level for creat your Element Pet.") end end end return true end
    Talkactions.xml

    <talkaction words="!criar" script="vocationsummon.lua"/> <talkaction words="!back" script="vocationsummon.lua"/>
     
    Editando
     

    ["Nome do Monster"] = { Level = Level Minimo, Levelmax = Level Maximo, Voc = Vocação, Vocp = Promotion },
     
    não esqueça de editar a flag

    <flag convinceable="1"/>
    no monster
     
    e no ultimo monster da tabela não deve ter virgula no final
     
    Tirando Lvl Max
    Procure por

    if getPlayerLevel(cid) >= v.Level and getPlayerLevel(cid) <= v.Levelmax then
    e Deixa assim

    if getPlayerLevel(cid) >= v.Level then
     
    Gosto ? Da ++rep não cai o dedo
  22. Downvote
    pokemonfox123 recebeu reputação de Erimyth em Detalhamento De Templos .   
    Mano Ta paresendo Um Baiak Total
  23. Downvote
    pokemonfox123 recebeu reputação de vital900 em Tecnicas Para Cachoeiras   
    Poxa Super Mano Bem Detalhado ai
  24. Upvote
    pokemonfox123 deu reputação a Lordfire em Criando E Editando Monstros   
    Crie um arquivo do bloco de notas na sua pasta monster, renomeie-o para o nome do seu monstro, e nele escreva tudo o que está nos quotes:
    Explicando: excenssial, diz o formato do arquivo (NÃO modifique)
     
     
    Explicando
    monster name="Lord Voldemort" nome do monstro
    level="400" level do animal (quanto maior, mais forte)
    maglevel="3000" mlvl do animal, quanto maior, mais forte as magias
    experience="180000" experiencia que o animal da
    pushable="0" se o animal poderá ser empurrado (0 não, 1 sim)
    armor="40" defesa do animal contra melee
    defense="50" defesa do animal contra qualquer tipo de ataque
    canpushitems="1" se o animal empurra caixas e mesas (0 não, 1 sim)
    changetarget="200" probabilidade de o animal mudar de alvo (quanto maior, mais chances)
    speed="478" velocidade do animal (quanto maior, mais rapido)
    <health now="8800" max="9000"/> vida inicial e vida total do animal
    <look type="9" head="20" body="30" legs="40" feet="50" corpse="3065" race="2"/> roupa e cores do animal
    combat targetdistance="3" distancia de onde o animal atacará (em sqm)
    runonhealth="177" velocidade do animal, na hora em que ele irá se curar
     
     
    Explicando: ataques do animal. Para adicionar um, copie e cole algum:
    -- Para adicionar um ataque a distância, use este: <attack type="distance" name="nome da munição (sem espaços)" exhaustion="500" cycleticks="5000" probability="70"/>;
    -- Para adicionar uma runa, use este: <attack type="rune" name="spell da runa (a spell, não a runa)" exhaustion="500" cycleticks="5000" probability="70"/>;
    -- Para uma magia instantânea, use este: <attack type="instant" name="fala da spell" exhaustion="500" cycleticks="5000" probability="70"/>;
    -- Para um ataque melee, use este: <attack type="melee" mindamage="dano mínimo" maxdamage="dano máximo"/>.
     
     
    Explicando: Imunidades do animal. Este animal é imune a tudo que é possível.
    -- Energy: imunidade a campos ou magias de energia
    -- Fire: imunidade a campos ou magias de fogo
    -- Poison: imunidade a campos ou magias de veneno
    -- Paralyze: imunidade a ataques de paralização
    -- Drunk: imunidade a "sugamento" de vida
    -- Invisible: imunidade a magia Utana Vid (invisibilidade)
     
     
    Explicando: falas do animal
    -- Para adicionar uma fala, use: <voice sentence="fala do animal"/>
     
     
    Explicando: Loot do monstro. O <inside> é porque o item é uma backpack ou uma bag, e os itens estarão dentro. O chance="1000" é a chance do item cair. O countmax="10" é a quantidade máxima de um item contável.
    -- Para adicionar um item não contável (exemplo: crown helmet), use: <item id="2491" chance="1000"/>
    -- Para adicionar um item contável (exemplo: platinum coins), use: <item id="2152" countmax="50" chance1="1428" chancemax="0"/>
     
     
    Explicação: summons do monstro. Em maxSummons="5", coloque o numero de summons que seu monstro poderá convocar.
    -- Para adicionar um summon, use: <summon name="nome do monstro" chance="1000"/>
    (Usei monstros do 7.9, em 7.8, nem pense em usar estes)
     
     
    Explicação: a tag do final do monstro, excenssial!
     
    Agora vá no arquivo monsters.xml
    adicione uma nova linha assim:
     
    Não recomendo modificar nada mais que eu não expliquei...
    As vezes, quando você sumona o monstro, debuga ou cai o ot...
     
    Créditos: 100% Lordfire
     
    //Lord
  25. Upvote
    pokemonfox123 recebeu reputação de Karolaynerox em [Oficial] Refugia (8.60) 26/08/2012 0.0.8   
    Serve muito massa Vllw ai
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...