Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá pessoal estou com um problema, ultimamente pedi suporte pra retirar alguns erros na distro e tals, eu achei que havia resolvido, porém sem perceber apenas havia apenas diminuido o número de erros e não havia acabado com eles.

 

Erros:

post-44064-0-24776000-1421432264_thumb.p

 

 

Tag XML:

<instant name="Twin Energy Ball" words="twin energy ball" lvl="200" mana="6000" prem="0" range="10" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="LvL200/twin energy ball.lua">

</instant>

 

Spell.lua:

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -35.5, 0)
 
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
 
function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
 
function onCastSpell(cid, var)
local parameters = {cid = cid, var = var, combat1 = combat1}
 
for k = 1, 10 do
addEvent(function()
if isCreature(cid) then
addEvent(onCastSpell1, 1, parameters)
end
end, 1 + ((k-1) * 200))
end
for i = 1, 10 do
addEvent(function()
if isCreature(cid) then
addEvent(twb1,1,cid)
end
end, 1 + ((i-1) * 200))
end
return true
end

 

Se puderem me ajudar ficaria muito grato! Estes erros são muito chatos! rsrs

Link para o post
Compartilhar em outros sites

Troca:

function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
por: 
function twb1(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position1, 53)
    end
end

não respondo pms solicitando suporte em programação/scripting

Link para o post
Compartilhar em outros sites

 

Troca:

function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
por: 
function twb1(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position1, 53)
    end
end

 

 

Deu certinho, o erro do effect parou, porém se um player usar uma magia dessas e morrer na mesma hora, o erro "Creature not found" ainda ocorre. É possível retirar este erro ou não tem como?

Link para o post
Compartilhar em outros sites

Hm, tenta assim:

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -35.5, 0)
 
local function onCastSpell1(parameters)
    if isCreature(parameters.cid) then
        doCombat(parameters.cid, parameters.combat1, parameters.var)
    end
end
 
function twb1(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position1, 53)
    end
end
 
function onCastSpell(cid, var)
    local parameters = {cid = cid, var = var, combat1 = combat1}
    for k = 1, 10 do
        addEvent(function()
            if isCreature(cid) then
                onCastSpell1(parameters)
                twb1(cid)
            end
        end, 1 + ((k-1) * 200))
    end
    return true
end
Editado por zipter98 (veja o histórico de edições)

não respondo pms solicitando suporte em programação/scripting

Link para o post
Compartilhar em outros sites

 

Hm, tenta assim:

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -35.5, 0)
 
local function onCastSpell1(parameters)
    if isCreature(parameters.cid) then
        doCombat(parameters.cid, parameters.combat1, parameters.var)
    end
end
 
function twb1(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position1, 53)
    end
end
 
function onCastSpell(cid, var)
    local parameters = {cid = cid, var = var, combat1 = combat1}
    for k = 1, 10 do
        addEvent(function()
            if isCreature(cid) then
                onCastSpell1(parameters)
                twb1(cid)
            end
        end, 1 + ((k-1) * 200))
    end
    return true
end

 

Eu fiz os testes, o erro Creature not found só ocorre se um jogador morrer no mesmo segundo da spell (Algo muito raro). Mas creio que não prejudicará nada no funcionamento do servidor. Agradeço pela ajuda!  ^^

Link para o post
Compartilhar em outros sites

Sim, mas como eu disse antes, somente se o intervalo da morte da criatura/player e o intervalo da spell for o mesmo.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por L3K0T
      SUMMON SPELLS
       
       
      Como o nome diz é uma spell que sumona até 4 monstros ou podendo adicionar mais, legal pra naruto etc... Então para não perder ou ficar em vão, irei deixar pra vocês e já com as correções.
       
       
      DEMONSTRAÇÃO

      2022-09-01 00-08-30.mp4  
       
      INSTALANDO
      1: primeiro vá em data/spells/scripts e crie um arquivo.lua e adicione isso abaixo dentro dele e em seguida salve.
      function onCastSpell(cid, var) local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 elseif(dir==2)then ppos.y = ppos.y + 1 elseif(dir==3)then ppos.x = ppos.x - 1 elseif(dir==0)then ppos.y = ppos.y - 1 end local summon = getCreatureSummons(cid) local MaximoSummon = 0 if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return false end if (table.maxn(summon) > MaximoSummon) then doPlayerSendTextMessage(cid, 22, "Voce ainda tem summons em batalha!") return false end local clone1 = doConvinceCreature(cid, doCreateMonster("Morgaroth", ppos)) local clone2 = doConvinceCreature(cid, doCreateMonster("Demon", ppos)) local clone3 = doConvinceCreature(cid, doCreateMonster("Terror Bird", ppos)) local clone4 = doConvinceCreature(cid, doCreateMonster("Giant Spider", ppos)) doPlayerSendTextMessage(cid, 22, "Voce summonou 4 criaturas!") end  
       
      2: agora vá em data/spells/ e abra o arquivo spells.xml e coloca isso dentro e salve
       
      <instant name="Sumonar" words="!help" lvl="0" mana="0" aggressive="0" params="1" exhaustion="1000" needlearn="0" event="script" value="arquivo.lua"> </instant>  

      2022-09-01 00-28-08.mp4 Pronto! agora é só usar a imaginação, pode adicionar monstro diferente ou do mesmo quantas vezes quiser.
       
      créditos fonte: @Lenilson e L3K0T
       
       
       
       
       
    • Por Cat
      O OpenCoreMMO é um emulador de servidor MMORPG gratuito e de código aberto escrito em C#.
      Baseia-se no forgotten server (OpenTibia).

       

       Para se conectar ao servidor, você pode usar OTClient ou OpenTibiaUnity para a versão 8.6.

       
      Lista de funcionalidades!
      Leitura da estrutura de arquivos OTB e OTBM Carregando OTBM Tile Area, Towns e Waypoints Carregando Áreas de Spawn LogIn e LogOut Player no jogo Todos os movimentos do jogador Conexão multijogador Spawn e Respawn Monsters Combate PvM Depot Bate-papos   -Guilds   -Canais Públicos   -Canais de pilhagem e morte Lista VIP Combate PvP Sistema NPC Lua Scripting C# Scripting  
       Tecnologias:
      C# .Net 5 Database support: InMemory, MySQL, SQL Server and SQLite Console Debug Logging XUnit Testing  
       
      Amostra:
      [spoiler]

      [/spoiler]
       
      Como rodar?
      Suporte para mysql e sqlite, para rodar em seu PC veja este guia rápido: 
      https://caioavidal.gitbook.io/opencoremmo/how-to-run

       
       
      Acompanhe o projeto em:
       Github:
      https://caioavidal.gitbook.io/opencoremmo/
      https://github.com/caioavidal/OpenCoreMMO
       
       Trello:
      https://trello.com/b/JnOJ9yn5/opencoremmo
       
       TibiaKing:
       
    • Por fezeRa
      Estou com um problema serio, toda vez que acontece esse problema, quando os players morrem/relogam, eles não conseguem mais logar novamente, só conseguem dps que eu reinicio o server. E fora que eles não ficam salvados desde o ultimo save...
      Abaixo segue uma imagem do erro:
       

    • Por YagoNR
      Estou começando um projeto ATS e gostaria de saber qual a melhor distro 8.60, de preferencia com sources, thanks xD!
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo