NA

Item Com Magia

Por nandinmlklf, 21 de mai. de 2010 em Archived

tibia
script
otserv
5
1.4k
nandinmlklfN
21 de maio de 2010 às 14:15

Tipo do script:Não sei

Protocolo (versão do Tibia):8.54

Servidor utilizado:Alissow 3.9.0

Nível de experiência:pouquisima

Adicionais/Informações:Assim eu queria que ao equipar serto item tipo uma sword vc pudesse soltar uma certa magia mais que o item continuase la

 

plx fais ai

MatheusGladM
21 de maio de 2010 às 14:31

Se tem como botar a magia ai pra eu ver, ou voce quer que eu faça a magia tambem?

nandinmlklfN
21 de maio de 2010 às 15:15

tipo fais com qualquer magia de area que eu arrumo depois

joaohdJ
21 de maio de 2010 às 15:16

Tente esse script:

 

function onEquip(cid, item, slot)

local spellName = "Light Healing"

     if canPlayerLearnInstantSpell(cid, spellName) then
        if not getPlayerLearnedInstantSpell(cid, spellName) then
           doPlayerLearnInstantSpell(cid, spellName)
           doPlayerSendTextMessage(cid,25,"Now you are able to cast " .. spellName .. ". These words is " .. getInstantSpellWords(spellName) .. ".")
        else
           doPlayerSendCancel(cid,"You already have learned the spell " .. spellName .. ".")
           return FALSE
        end
     else
         doPlayerSendCancel(cid,"You cannot learn the spell " .. spellName .. ".")
         return FALSE
     end
return TRUE
end


function onDeEquip(cid, item, slot)

local spellName = "Light Healing"

   if getPlayerLearnedInstantSpell(cid, spellName) then
      doPlayerUnlearnInstantSpell(cid, spellName)
      doPlayerSendTextMessage(cid,25,"Now you are not able to cast " .. spellName .. ".")
   end
return TRUE
end

 

 

Não se esqueça de adicionar a tag ao seu movements.xml e editar no script o nome da magia. No caso, está configurada para adicionar o Exura. Outra coisa a fazer é mudar na tag de sua magia, em spells.xml, a parte 'needlearn="0"' para 'needlearn="1"'.

 

 

 

flw

Editado Maio 21 por apocarai

nandinmlklfN
22 de maio de 2010 às 10:45

vlw mais onde que o item entra ai?