-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 741 visualizações
-
- 0 respostas
- 1384 visualizações
-
- 3 respostas
- 3315 visualizações
-
- 0 respostas
- 1719 visualizações
-
- 2 respostas
- 1600 visualizações
-
Pergunta
tonynamoral 27
fala ai galera , eu tenho 1 script aqui , que está entrando em conflito com o outro.
Error :
Primeiro SCRIPT : Skillsids.lua
local function doPlayerSetSkill(pid, skill, amount)
local player = getPlayerByGUID(pid)
if isCreature(player) then doRemoveCreature(player, true) end
db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";")
return true
end
local function doPlayerSetMagic(pid, amount)
local player = getPlayerByGUID(pid)
if isCreature(player) then doRemoveCreature(player, true) end
db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = "..pid)
return true
end
function onTextEdit(cid, item, newText)
local skillTable = { --[id do item] = id da skill,
[2400] = {id = 0, count = 1, add = "none"}, -- Strenght
[2404] = {id = 1, count = 3, add = "speed"}, -- Agility
[2403] = {id = 2, count = 20, add = "health"}, -- Vitality
[2402] = {id = 3, count = 15, add = "mana"}, -- Energy
[2401] = {id = 4, count = 1, add = "none"}, -- Range
[2405] = {id = 5, count = 1, add = "none"}, -- Defense
}
local maxSkills = 100
local skillId = skillTable[item.itemid]
local guid = getPlayerGUID(cid)
local points = getPlayerMagLevel(cid)
local skill = getPlayerSkillLevel(cid, skillId.id)
if not skillId then return true end
local value = tonumber(newText)
if not value or value < 0 then
doPlayerSendCancel(cid, "Por favor, insira um número válido.") return false
elseif getPlayerPz(cid) then
doPlayerSendCancel(cid, "Você não pode estar em PZ.") return false
elseif points < value then
doPlayerSendCancel(cid, "Você não tem points suficientes.") return false
elseif skill >= maxSkills then
doPlayerSendCancel(cid, "Sua skill já está no máximo.") return false
end
local newValue = math.min(skill + value, maxSkills)
if skillId.add == "none" then
elseif skillId.add == "speed" then
doChangeSpeed(cid, getCreatureSpeed(cid)+(value*skillId.count))
elseif skillId.add == "health" then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+(value*skillId.count))
elseif skillId.add == "mana" then
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+(value*skillId.count))
end
doPlayerSetSkill(guid, skillId.id, newValue)
doPlayerSetMagic(guid, points - newValue + skill)
return false
end
Eu gostaria que voces podessem me falar qual é o error e solucionar pra eu *--*
Editado por tonynamoralLink para o comentário
https://xtibia.com/forum/topic/203594-galera-me-ajuda-2-scripts-meus-estao-entrando-em-conflito/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados