OP

[Encerrado] Como configurar StartSkills - TFS 0.4 dev 3777

Por opsdan, 28 de fev. de 2018 em Tópicos Sem Resposta

8
1.1k
opsdanO
28 de fevereiro de 2018 às 22:20

Amigos, boa noite.

 

Ando com um problema que esta me impedindo de colocar meu enforced online. Ja tentei de tudo, e estou ficando desanimado :/

Creio que o problema seja simples: Nao consigo configurar as Skills iniciais!

Por mais que eu coloque as skills que eu quero no startskill.lua, os players nascem bugados.

 

Meu tfs é o 0.4 dev 3777 8.6, e eu uso SQL, por acc/manager simples.

 

Segue aqui minha startskill.lua:

 

function onLogin(cid)

local playerVoc = getPlayerVocation(cid)

local reqTries = getPlayerRequiredSkillTries

local skillStor = 56364

local gotSkills = getPlayerStorageValue(cid, 56364)

 
 

if playerVoc == 1 and gotSkills == -1 then

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,70)))

setPlayerStorageValue(cid, skillStor, 1)

 

elseif playerVoc == 2 and gotSkills == -1 then

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,70)))

setPlayerStorageValue(cid, skillStor, 1)

 

elseif playerVoc == 3 and gotSkills == -1 then

doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 75))

doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 70))

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,20)))

setPlayerStorageValue(cid, skillStor, 1)

 

elseif playerVoc == 4 and gotSkills == -1 then

doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 80))

doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 80))

doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 80))

doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 70))

doPlayerAddMagLevel(cid, 9)

setPlayerStorageValue(cid, skillStor, 1)

 

end

return TRUE

end

 

Por favor, me ajudem!

Valeu

 

opsdanO
01 de março de 2018 às 18:42

Ninguem?

opsdanO
02 de março de 2018 às 12:22

???

QwizerQ
02 de março de 2018 às 16:42

bugado como?

opsdanO
02 de março de 2018 às 19:09
2 horas atrás, Qwizer disse:

 

Por exemplo, eu coloco pro kina nascer com skill 80, e ele nasce com skill 12...

 

Sabe o que pode ser?

QwizerQ
02 de março de 2018 às 22:25
3 horas atrás, opsdan disse:

Por exemplo, eu coloco pro kina nascer com skill 80, e ele nasce com skill 12...

 

Sabe o que pode ser?

vou testar o script

 

opsdanO
03 de março de 2018 às 14:17

Gente, problema RESOLVIDO!

 

Não sei exatamente o porque isso acontece, mas eu alterei as skills colocando numeros acima do que eu queria.

Por exemplo, eu queria skill inicial 80 no knight, dai eu coloquei 115. Não sei por qual motivo, a skill ficou como queria.

 

Ficou assim ó:

 

Citar

 

function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)


if playerVoc == 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,100)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,100)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 115))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 85))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 107))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 107))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 107))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 107))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,8)))
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end


 

 

1 mês depois...
StigalS
19 de abril de 2018 às 17:12
A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta