[Creaturescripts] Script Que Da Melee E Ml Ao Logar Pela Primeira Vez

buzurck
em Lixeira Pública

buzurck

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/05/09Posts: 16Char no Tibia: Jon Keltera

Eae galera, to criando meu proprio mapa de war, muito boladao e diferente

Só falta arrumar esse script para poder colocar o ot on

 

Eu quero um script que der:

 

skill de axe,sword,club,shielding,ml para KNIGHT;

Magic level e shielding para Druid e Sorcerer;

Distance,Shielding, magic level para Paladin.

E tbm gostaria que postasse a tag que eu boto no .xml

 

O script que eu tava tentando fazer funfar era esse que vou postar abaixo:

 

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


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

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

elseif playerVoc == 7 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 70))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 8 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 70))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 70))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 70))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 65))
doPlayerAddMagLevel(cid, 8)
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end

 

Ta dando o seguinte error:

 

06/02/2011 21:43:57] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

 

Alguem arruma isso plix, ou posta um que esteja bom...

brigadao

________

Saymon14

.
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 05/05/10Posts: 544

verifica o id da vocação que ta no script e o id que ta no vocations.xml se é igual

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

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,65)))

setPlayerStorageValue(cid, skillStor, 1)

 

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

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,65)))

setPlayerStorageValue(cid, skillStor, 1)

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

doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 70))

doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))

doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))

setPlayerStorageValue(cid, skillStor, 1)

 

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

doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 70))

doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 70))

doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 70))

doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 65))

doPlayerAddMagLevel(cid, 8)

setPlayerStorageValue(cid, skillStor, 1)

 

Não entro em equipes, já tenho meu projeto, não insista.

 

 

 

 

 

 

Easy Mapper Map Editor 8.60: Clique aqui

[8.60] BeastXHunter: Clique aqui