Ir para conteúdo

Featured Replies

Postado

TFS 1.3 

 

 

Estou tendo estes erros ao usar o dodge/critical system no meu tfs 1.3, alguem pode me ajudar?

 

[Warning - Event::checkScript] Can not load script: scripts/other/dodge.lua
data/actions/scripts/other/dodge.lua:1: '=' expected near 'onUse'
[Warning - Event::checkScript] Can not load script: scripts/others/login.lua
data/creaturescripts/scripts/others/login.lua:225: '=' expected near 'player'

 

 

 

tag ao final do login.php

Spoiler

    

-- Dodge System
if player:getDodgeLevel() == -1 then
    player:setDodgeLevel(0) 
end

    
    return true
end

 

--

 

actions dodge.lua

 

Spoiler

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getDodgeLevel() < DODGE.LEVEL_MAX then
        item:remove(1)
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
        player:setDodgeLevel(player:getDodgeLevel() + 1)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você aumentou sua skill de dodge para [" .. player:getDodgeLevel() .. "/" .. DODGE.LEVEL_MAX .. "].")
    elseif player:getDodgeLevel() >= DODGE.LEVEL_MAX then
        player:sendTextMessage(MESSAGE_STATUS_WARNING, "Você alcancou o máximo de seu DODGE Skill.\nParabéns!!!!")
        return false
    end
    return true
end

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Postado
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
	if player:getDodgeLevel() >= DODGE.LEVEL_MAX then
		player:sendTextMessage(MESSAGE_STATUS_WARNING, "Você alcançou o máximo de seu DODGE Skill. \nParabéns!!!!")
		return true
	end
	
	item:remove(1)
	player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
	player:setDodgeLevel(math.max(0, player:getDodgeLevel()) + 1)
	player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você aumentou sua skill de dodge para  ["..player:getDodgeLevel().. "/" ..DODGE.LEVEL_MAX.. "].")
	return true
end

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo