KR

Spell

Por kratoscyti, 09 de fev. de 2014 em Archived

spell
outfit
script
5
823
kratoscytiK
09 de fevereiro de 2014 às 22:45

Bom Pessoal to com esse script de transform:

 

 

function onCastSpell(cid, var)
local config = {
[398] = {level = 50, newvoc = 399, outfit = 495, eff = 32},
[399] = {level = 100, newvoc = 400, outfit = 496, eff = 32},
[400] = {level = 150, newvoc = 401, outfit = 497, eff = 32},
[401] = {level = 200, newvoc = 402, outfit = 498, eff = 32}
}
trans = config[getPlayerVocation(cid)]
if not trans then
doPlayerSendCancel(cid, "You can not transform.") return false
elseif getPlayerLevel(cid) >= trans.level then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.")
end
doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1)
doPlayerSetVocation(cid, trans.newvoc)
doSendMagicEffect(getCreaturePosition(cid), trans.eff)
doPlayerSendCancel(cid, "You Transformed!")
return true
end

Porém esse script transforma mais quando player desloga a outfit volta,Alguem pode me ajudar?
MasterDinoM
09 de fevereiro de 2014 às 23:04


 

function onCastSpell(cid, var)

local config = {

[398] = {level = 50, newvoc = 399, outfit = 495, eff = 32},

[399] = {level = 100, newvoc = 400, outfit = 496, eff = 32},

[400] = {level = 150, newvoc = 401, outfit = 497, eff = 32},

[401] = {level = 200, newvoc = 402, outfit = 498, eff = 32}

}

trans = config[getPlayerVocation(cid)]

if not trans then

doPlayerSendCancel(cid, "You can not transform.") return false

elseif getPlayerLevel(cid) >= trans.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.")

end

doCreatureChangeOutfit(cid, {lookType = trans.outfit})

doPlayerSetVocation(cid, trans.newvoc)

doSendMagicEffect(getCreaturePosition(cid), trans.eff)

doPlayerSendCancel(cid, "You Transformed!")

return true

end

 

kratoscytiK
09 de fevereiro de 2014 às 23:23

Não ta transformando ta dando o erro:cim6.png Lembrando que a versão e 8.0 ^^

iTwxI
13 de fevereiro de 2014 às 20:24

 

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
[1] = { 1, 2, 66, 208},
}
function onSay(cid, words, param, channel)
local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapa
local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapa
local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapa
local from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapa
local from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapa
local from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapa
if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) then
doPlayerSendCancel(cid, "Você não pode se Transformar nesta área!") return true
end
doPlayerSay(cid, "transformar")
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!")
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.")
end
else
doPlayerSendCancel(cid, "Você não pode se Transformar!")
end
return true
end

 

 

Nao é uma spell é um talkaction, mais se ajudar tamo junto ^^, se precisar de ajuda a editar ai manda pm

narutomaniacosN
13 de fevereiro de 2014 às 23:10

Vlw