Ir para conteúdo

Posts Recomendados

Antes de Mais Nada, o Sword Book dropa em Demon, então recomendo tirar o livro do demon.

 

Vou Começar com o Sword Book.

 

Crie um swordbook.lua em data\actions\scripts e coloque:

function onUse(cid, item, frompos, item2, topos)

skill_level = getPlayerSkill(cid,2)

rand = math.random(skill_level,100)

if rand < 95 then

doPlayerAddSkillTry(cid,5,9000000)

doPlayerSendTextMessage(cid,22,"You have learn how to use better sword weapons.")

doRemoveItem(item.uid,1)

else

doPlayerSendTextMessage(cid,22,"Your learning failed")

end

end

-----------------------------------------------------------------------------

 

Segundamente o Club Book:

Crie um clubbook.lua em data\actions\scripts e coloque:

function onUse(cid, item, frompos, item2, topos)

skill_level = getPlayerSkill(cid,1)

rand = math.random(skill_level,100)

if rand < 95 then

doPlayerAddSkillTry(cid,1,9000000)

doPlayerSendTextMessage(cid,22,"You have learn how to use better Club Weapons.")

doRemoveItem(item.uid,1)

else

doPlayerSendTextMessage(cid,22,"Your learning failed")

end

end

---------------------------------------------------------------------

 

Shielding Book agora:

crie um shieldingbook.lua em data\actions\scripts e coloque:

function onUse(cid, item, frompos, item2, topos)

skill_level = getPlayerSkill(cid,5)

rand = math.random(skill_level,100)

if rand < 95 then

doPlayerAddSkillTry(cid,5,9000000)

doPlayerSendTextMessage(cid,22,"You have learn how to use Shields better.")

doRemoveItem(item.uid,1)

else

doPlayerSendTextMessage(cid,22,"Your learning failed")

end

end

-------------------------------------------------------------------------------

 

Vamos ao Distance Book:

distancebook.lua data\actions\scripts.

function onUse(cid, item, frompos, item2, topos)

skill_level = getPlayerSkill(cid,4)

rand = math.random(skill_level,100)

if rand < 95 then

doPlayerAddSkillTry(cid,4,9000000)

doPlayerSendTextMessage(cid,22,"You have learn how to use better distance weapons ")

doRemoveItem(item.uid,1)

else

doPlayerSendTextMessage(cid,22,"Your learning failed")

end

end

--------------------------------------------------------------------------------

 

Por Último o Axe Book:

crie um axebook.lua em data\actions\scripts e coloque:

function onUse(cid, item, frompos, item2, topos)

skill_level = getPlayerSkill(cid,3)

rand = math.random(skill_level,100)

if rand < 95 then

doPlayerAddSkillTry(cid,3,9000000)

doPlayerSendTextMessage(cid,22,"You have learn how to use better Axe Weapons.")

doRemoveItem(item.uid,1)

else

doPlayerSendTextMessage(cid,22,"Your learning failed")

end

end

----------------------------------------------------------------------------

 

No Actions.xml em data\actions adicione:

<action itemid="1980" script="clubbook.lua"/>

<action itemid="1982" script="swordbook.lua"/>

<action itemid="1983" script="axebook.lua"/>

<action itemid="1985" script="distancebook.lua"/>

<action itemid="1986" script="shieldingbook.lua"/>

---------------------------------------------------------------------------

Créditos Meus por Consertar o bug de bugar o skill, mas o script não sei quem fez.

Link para o comentário
https://xtibia.com/forum/topic/79997-livros-que-d%C3%A3o-skills/
Compartilhar em outros sites

  • 4 weeks later...
×
×
  • Criar Novo...